summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ls1x.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 16:15:54 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 20:13:49 +0200
commit746f7ae0e9ca500f8be888675d88befed5740413 (patch)
tree0851360d535b8d169d2c7b1cf864f63c7ab386ef /drivers/rtc/rtc-ls1x.c
parent[media] dib8000: store dtv_property_cache in a temp var (diff)
downloadlinux-746f7ae0e9ca500f8be888675d88befed5740413.tar.xz
linux-746f7ae0e9ca500f8be888675d88befed5740413.zip
[media] dib8000: Fix sub-channel range
isdbt_sb_subchannel is unsigned with 8 bits. So, it will never be -1. Instead, any value bigger than 13 is invalid. As is, the current code generates the following warnings: drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_set_isdbt_common_channel': drivers/media/dvb-frontends/dib8000.c:2358:3: warning: comparison is always true due to limited range of data type [-Wtype-limits] drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_tune': drivers/media/dvb-frontends/dib8000.c:3107:8: warning: comparison is always false due to limited range of data type [-Wtype-limits] drivers/media/dvb-frontends/dib8000.c:3153:9: warning: comparison is always false due to limited range of data type [-Wtype-limits] drivers/media/dvb-frontends/dib8000.c:3160:5: warning: comparison is always false It should also be noticed that ARIB STD-B31, item "3.15.6.8 Number of segments" at TMCC table defines the value 15 for unused segment, and 14 as reserved. So, better to change the check to consider any value bigger than 13 to mean that sub-channels should be disabled, fixing the warning and doing the right thing even if an invalid value is filled by userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/rtc/rtc-ls1x.c')
0 files changed, 0 insertions, 0 deletions