summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/l64781.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-10-27 19:14:01 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-28 09:38:44 (GMT)
commit830e4b55b02b8a2638958e4249eba71797940ee5 (patch)
tree06266c34cf84b9a4e5092df3534ff4fdbbdda495 /drivers/media/dvb-frontends/l64781.c
parent5a70972e142b182fb9375b9060a4dd9fad47fadf (diff)
downloadlinux-fsl-qoriq-830e4b55b02b8a2638958e4249eba71797940ee5.tar.xz
[media] dvb-frontends: get rid of some "always false" warnings
On gcc, enums are generally unsigned, except if a negative value is declared. Due to that, warnings may happen there: drivers/media/dvb-frontends/cx22700.c:142:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/dvb-frontends/cx22700.c:155:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/dvb-frontends/cx24123.c:341:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/dvb-frontends/l64781.c:183:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/dvb-frontends/l64781.c:187:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/dvb-frontends/mt312.c:552:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/dvb-frontends/mt312.c:560:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] As other compilers might be using signed values, the better is to keep the checks there, casting the value to avoid the warning. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/l64781.c')
-rw-r--r--drivers/media/dvb-frontends/l64781.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/l64781.c b/drivers/media/dvb-frontends/l64781.c
index 36fcf55..ddf866c 100644
--- a/drivers/media/dvb-frontends/l64781.c
+++ b/drivers/media/dvb-frontends/l64781.c
@@ -180,11 +180,11 @@ static int apply_frontend_param(struct dvb_frontend *fe)
p->transmission_mode != TRANSMISSION_MODE_8K)
return -EINVAL;
- if (p->guard_interval < GUARD_INTERVAL_1_32 ||
+ if ((int)p->guard_interval < GUARD_INTERVAL_1_32 ||
p->guard_interval > GUARD_INTERVAL_1_4)
return -EINVAL;
- if (p->hierarchy < HIERARCHY_NONE ||
+ if ((int)p->hierarchy < HIERARCHY_NONE ||
p->hierarchy > HIERARCHY_4)
return -EINVAL;