projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7be3733
)
media: i2c/ov02a10.c: add cast to fix type mismatch
author
Hans Verkuil
<hverkuil-cisco@xs4all.nl>
Wed, 20 Jan 2021 09:27:08 +0000
(10:27 +0100)
committer
Mauro Carvalho Chehab
<mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 07:39:30 +0000
(08:39 +0100)
By adding this cast '(__force __le16)' this sparse warning
is fixed:
drivers/media/i2c/ov02a10.c:391:19: warning: cast to restricted __le16
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov02a10.c
patch
|
blob
|
history
diff --git
a/drivers/media/i2c/ov02a10.c
b/drivers/media/i2c/ov02a10.c
index 8683ffd3287a0293315c29b36238d928b31b5375..60b4bc64533495c7c79badea2ef2958aa1e71d66 100644
(file)
--- a/
drivers/media/i2c/ov02a10.c
+++ b/
drivers/media/i2c/ov02a10.c
@@
-388,7
+388,7
@@
static int ov02a10_check_sensor_id(struct ov02a10 *ov02a10)
if (ret < 0)
return ret;
- chip_id = le16_to_cpu(ret);
+ chip_id = le16_to_cpu(
(__force __le16)
ret);
if ((chip_id & OV02A10_ID_MASK) != OV02A10_ID) {
dev_err(&client->dev, "unexpected sensor id(0x%04x)\n", chip_id);