Commit fdc67bd4 authored by Colin Ian King's avatar Colin Ian King Committed by Hans Verkuil

media: vivid: remove redundant assignment to variable checksum

Variable checksum is assigned a value that is never read, it is assigned
a new value in a following for-loop. The assignment is redundant and can
be removed.

Cleans up clang scan build warning:
drivers/media/test-drivers/vivid/vivid-vbi-gen.c:197:2: warning: Value
stored to 'checksum' is never read [deadcode.DeadStores]
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent fec94f8c
...@@ -194,7 +194,6 @@ static void vivid_vbi_gen_set_time_of_day(u8 *packet) ...@@ -194,7 +194,6 @@ static void vivid_vbi_gen_set_time_of_day(u8 *packet)
for (checksum = i = 0; i <= 8; i++) for (checksum = i = 0; i <= 8; i++)
checksum += packet[i] & 0x7f; checksum += packet[i] & 0x7f;
packet[9] = calc_parity(0x100 - checksum); packet[9] = calc_parity(0x100 - checksum);
checksum = 0;
packet[10] = calc_parity(0x07); packet[10] = calc_parity(0x07);
packet[11] = calc_parity(0x04); packet[11] = calc_parity(0x04);
if (sys_tz.tz_minuteswest >= 0) if (sys_tz.tz_minuteswest >= 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment