[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410-smatch-v1-6-785d009a852b@chromium.org>
Date: Wed, 10 Apr 2024 21:54:43 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Yasunari Takiguchi <Yasunari.Takiguchi@...y.com>,
Jean-Christophe Trotin <jean-christophe.trotin@...s.st.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Hans Verkuil <hverkuil-cisco@...all.nl>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
Ricardo Ribalda <ribalda@...omium.org>
Subject: [PATCH 6/6] media: touchscreen: sur40: convert le16 to cpu before
use
Smatch found this issue:
drivers/input/touchscreen/sur40.c:424:55: warning: incorrect type in argument 2 (different base types)
drivers/input/touchscreen/sur40.c:424:55: expected int key
drivers/input/touchscreen/sur40.c:424:55: got restricted __le16 [usertype] blob_id
Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
drivers/input/touchscreen/sur40.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
index ae3aab4283370..5f2cf8881e724 100644
--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -421,7 +421,7 @@ static void sur40_report_blob(struct sur40_blob *blob, struct input_dev *input)
if (blob->type != SUR40_TOUCH)
return;
- slotnum = input_mt_get_slot_by_key(input, blob->blob_id);
+ slotnum = input_mt_get_slot_by_key(input, le16_to_cpu(blob->blob_id));
if (slotnum < 0 || slotnum >= MAX_CONTACTS)
return;
--
2.44.0.478.gd926399ef9-goog
Powered by blists - more mailing lists