i2c: rk3x: Fix sparse warning
authorDavid Wu <david.wu@rock-chips.com>
Thu, 22 Sep 2016 11:29:23 +0000 (19:29 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 22 Sep 2016 17:50:15 +0000 (19:50 +0200)
This patch fixes the following sparse warning:
drivers/i2c/busses/i2c-rk3x.c:888:17: warning: cast truncates bits from constant value (ffffffffff00 becomes ffffff00)

Reported-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rk3x.c

index 3b87afe82f6394922ac6bff2a06d57d041128023..dbbdbece778afbb76b7add35ff4a26e36d60cb54 100644 (file)
@@ -58,7 +58,7 @@ enum {
 #define REG_CON_LASTACK   BIT(5) /* 1: send NACK after last received byte */
 #define REG_CON_ACTACK    BIT(6) /* 1: stop if NACK is received */
 
-#define REG_CON_TUNING_MASK GENMASK(15, 8)
+#define REG_CON_TUNING_MASK GENMASK_ULL(15, 8)
 
 #define REG_CON_SDA_CFG(cfg) ((cfg) << 8)
 #define REG_CON_STA_CFG(cfg) ((cfg) << 12)