Input: cyttsp4 - silence shift wrap warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Jul 2013 03:32:39 +0000 (20:32 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 3 Jul 2013 03:39:17 +0000 (20:39 -0700)
"*max" is a size_t (long) type but "1" is an int so static checkers
complain that the shift could wrap.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/cyttsp4_core.c

index 963da052c15e98108ac4fb5c5992201a348abf6a..7aa4a349a07ef86f8051970604ed94713c474f98 100644 (file)
@@ -153,7 +153,7 @@ static int cyttsp4_hw_reset(struct cyttsp4 *cd)
  */
 static int cyttsp4_bits_2_bytes(unsigned int nbits, size_t *max)
 {
-       *max = 1 << nbits;
+       *max = 1UL << nbits;
        return (nbits + 7) / 8;
 }