Skip to contentSkip to conversation

Input: atmel_mxt_ts - correct local variable type

PATCH New Dmitry Osipenko 1 participant 1 message Jan 23, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: atmel_mxt_ts - correct local variable type

GCC produces this warning when kernel compiled using make W=1:

warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (byte_offset >= 0 && byte_offset < cfg->mem_size) {

---
 drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/touchscreen/atmel_mxt_ts.c +2 -2
index ae60442efda0..bd0fc4b08608 100644
@@ -1287,8 +1287,8 @@ static int mxt_prepare_cfg_mem(struct mxt_data *data, struct mxt_cfg *cfg)
 {
 	struct device *dev = &data->client->dev;
 	struct mxt_object *object;
-	unsigned int type, instance, size, byte_offset;
-	int offset;
+	unsigned int type, instance, size;
+	int offset, byte_offset;
 	int ret;
 	int i;
 	u16 reg;
Signature · 1 line
2.24.0