diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-25 14:30:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-25 15:06:55 -0400 |
commit | 751dc8c7fa706c6bafa0eeee88f22f59987157e0 (patch) | |
tree | 274a4aaebdeb551baacb5189de475de34de2d920 /drivers/media/dvb-frontends/dib0090.c | |
parent | 13122f98c6479ddbfc308eb4253f84aaf4a2b45e (diff) |
[media] dib0090: Fix a warning at dib0090_set_EFUSE
The check if the values for c, h and n are within the range is
always true, as, if one of this values is out of range, the
previous "if" clauses will default to a value within the
range.
That fixes the following warning:
drivers/media/dvb-frontends/dib0090.c: In function 'dib0090_set_EFUSE':
drivers/media/dvb-frontends/dib0090.c:1545:5: warning: comparison is always true due to limited range of data type [-Wtype-limits]
and makes the code easier to read.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/dib0090.c')
-rw-r--r-- | drivers/media/dvb-frontends/dib0090.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c index f9916b8434b7..3ee22ff76315 100644 --- a/drivers/media/dvb-frontends/dib0090.c +++ b/drivers/media/dvb-frontends/dib0090.c | |||
@@ -1540,13 +1540,9 @@ static void dib0090_set_EFUSE(struct dib0090_state *state) | |||
1540 | if ((n >= POLY_MAX) || (n <= POLY_MIN)) | 1540 | if ((n >= POLY_MAX) || (n <= POLY_MIN)) |
1541 | n = 3; | 1541 | n = 3; |
1542 | 1542 | ||
1543 | if ((c >= CAP_VALUE_MIN) && (c <= CAP_VALUE_MAX) | 1543 | dib0090_write_reg(state, 0x13, (h << 10)); |
1544 | && (h >= HR_MIN) && (h <= HR_MAX) | 1544 | e2 = (n << 11) | ((h >> 2)<<6) | c; |
1545 | && (n >= POLY_MIN) && (n <= POLY_MAX)) { | 1545 | dib0090_write_reg(state, 0x2, e2); /* Load the BB_2 */ |
1546 | dib0090_write_reg(state, 0x13, (h << 10)); | ||
1547 | e2 = (n << 11) | ((h >> 2)<<6) | c; | ||
1548 | dib0090_write_reg(state, 0x2, e2); /* Load the BB_2 */ | ||
1549 | } | ||
1550 | } | 1546 | } |
1551 | } | 1547 | } |
1552 | 1548 | ||