* [PATCH] Input: atmel_mxt_ts - Set byte_offset as signed
@ 2026-05-04 10:55 Ricardo Ribalda
2026-05-04 17:00 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda @ 2026-05-04 10:55 UTC (permalink / raw)
To: Nick Dyer, Dmitry Torokhov
Cc: linux-input, linux-kernel, linux-media, Ricardo Ribalda
The calculations done to obtain byte_offset can result into a negative
number, fix its type.
This patch fixes the following sparse error:
drivers/input/touchscreen/atmel_mxt_ts.c:1481:44: warning: unsigned value that used to be signed checked against zero?
drivers/input/touchscreen/atmel_mxt_ts.c:1479:49: signed value source
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 87c6a10381f2..26ba82fb60b6 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1397,7 +1397,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;
+ unsigned int type, instance, size;
+ int byte_offset;
int offset;
int ret;
int i;
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260504-fix-sparse-3bfa6ba62e5b
Best regards,
--
Ricardo Ribalda <ribalda@chromium.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: atmel_mxt_ts - Set byte_offset as signed
2026-05-04 10:55 [PATCH] Input: atmel_mxt_ts - Set byte_offset as signed Ricardo Ribalda
@ 2026-05-04 17:00 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2026-05-04 17:00 UTC (permalink / raw)
To: Ricardo Ribalda; +Cc: Nick Dyer, linux-input, linux-kernel, linux-media
On Mon, May 04, 2026 at 10:55:03AM +0000, Ricardo Ribalda wrote:
> The calculations done to obtain byte_offset can result into a negative
> number, fix its type.
>
> This patch fixes the following sparse error:
>
> drivers/input/touchscreen/atmel_mxt_ts.c:1481:44: warning: unsigned value that used to be signed checked against zero?
> drivers/input/touchscreen/atmel_mxt_ts.c:1479:49: signed value source
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-04 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 10:55 [PATCH] Input: atmel_mxt_ts - Set byte_offset as signed Ricardo Ribalda
2026-05-04 17:00 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox