[media] max2175: remove an useless comparision
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 20 Jun 2017 10:11:15 +0000 (07:11 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 20 Jun 2017 10:11:15 +0000 (07:11 -0300)
load is an unsigned integer. So, it is always bigger or equal
to zero, as reported by gcc:

drivers/media/i2c/max2175.c: In function 'max2175_refout_load_to_bits':
drivers/media/i2c/max2175.c:1272:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  if (load >= 0 && load <= 40)
           ^~

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/max2175.c

index 0d28a80f8ed23cf2e56cefcebfb4a07cc6f7d60d..a4736a8a7792f3d9cf8c9235b524ea1f1a0175c4 100644 (file)
@@ -1269,7 +1269,7 @@ static const struct v4l2_ctrl_config max2175_na_rx_mode = {
 static int max2175_refout_load_to_bits(struct i2c_client *client, u32 load,
                                       u32 *bits)
 {
-       if (load >= 0 && load <= 40)
+       if (load <= 40)
                *bits = load / 10;
        else if (load >= 60 && load <= 70)
                *bits = load / 10 - 1;