All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Input: atmel_mxt_ts - correct local variable type
@ 2020-01-23 17:39 Dmitry Osipenko
  0 siblings, 0 replies; only message in thread
From: Dmitry Osipenko @ 2020-01-23 17:39 UTC (permalink / raw)
  To: Nick Dyer, Dmitry Torokhov; +Cc: linux-input, linux-kernel

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) {

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index ae60442efda0..bd0fc4b08608 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -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;
-- 
2.24.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-23 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 17:39 [PATCH v1] Input: atmel_mxt_ts - correct local variable type Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.