media: rc: clean up leader pulse/space for manchester encoding
The IR rc6 encoder sends the header using manchester encoding using 0 bits, which causes the following: UBSAN: Undefined behaviour in drivers/media/rc/rc-ir-raw.c:247:6 shift exponent 4294967295 is too large for 64-bit type 'long long unsigned int' So, allow the leader code to send a pulse and space and remove the unused pulse_space_start field. Cc: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
这个提交包含在:
@@ -173,16 +173,14 @@ out:
|
||||
}
|
||||
|
||||
static const struct ir_raw_timings_manchester ir_rc5_timings = {
|
||||
.leader = RC5_UNIT,
|
||||
.pulse_space_start = 0,
|
||||
.leader_pulse = RC5_UNIT,
|
||||
.clock = RC5_UNIT,
|
||||
.trailer_space = RC5_UNIT * 10,
|
||||
};
|
||||
|
||||
static const struct ir_raw_timings_manchester ir_rc5x_timings[2] = {
|
||||
{
|
||||
.leader = RC5_UNIT,
|
||||
.pulse_space_start = 0,
|
||||
.leader_pulse = RC5_UNIT,
|
||||
.clock = RC5_UNIT,
|
||||
.trailer_space = RC5X_SPACE,
|
||||
},
|
||||
@@ -193,8 +191,7 @@ static const struct ir_raw_timings_manchester ir_rc5x_timings[2] = {
|
||||
};
|
||||
|
||||
static const struct ir_raw_timings_manchester ir_rc5_sz_timings = {
|
||||
.leader = RC5_UNIT,
|
||||
.pulse_space_start = 0,
|
||||
.leader_pulse = RC5_UNIT,
|
||||
.clock = RC5_UNIT,
|
||||
.trailer_space = RC5_UNIT * 10,
|
||||
};
|
||||
|
在新工单中引用
屏蔽一个用户