Skip to content

Commit

Permalink
Input: cyttsp4 - silence shift wrap warning
Browse files Browse the repository at this point in the history
"*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>
  • Loading branch information
Dan Carpenter authored and Dmitry Torokhov committed Jul 3, 2013
1 parent 27eb2c4 commit 0fb82ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/cyttsp4_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0fb82ec

Please sign in to comment.