[PATCH 5/5] dib0090: Fix a warning at dib0090_set_EFUSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/media/dvb-frontends/dib0090.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c
index f9916b8..3ee22ff 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)
 		if ((n >= POLY_MAX) || (n <= POLY_MIN))
 			n = 3;
 
-		if ((c >= CAP_VALUE_MIN) && (c <= CAP_VALUE_MAX)
-				&& (h >= HR_MIN) && (h <= HR_MAX)
-				&& (n >= POLY_MIN) && (n <= POLY_MAX)) {
-			dib0090_write_reg(state, 0x13, (h << 10));
-			e2 = (n << 11) | ((h >> 2)<<6) | c;
-			dib0090_write_reg(state, 0x2, e2); /* Load the BB_2 */
-		}
+		dib0090_write_reg(state, 0x13, (h << 10));
+		e2 = (n << 11) | ((h >> 2)<<6) | c;
+		dib0090_write_reg(state, 0x2, e2); /* Load the BB_2 */
 	}
 }
 
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux