Home
last modified time | relevance | path

Searched hist:"5 f58ac04" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/media/i2c/
H A Drdacm21.c5f58ac04 Fri Mar 19 11:41:39 CDT 2021 Jacopo Mondi <jacopo+renesas@jmondi.org> media: i2c: rdamc21: Fix warning on u8 cast

Sparse reports a warning on a cast to u8 of a 16 bits constant.

drivers/media/i2c/rdacm21.c:348:62: warning: cast truncates bits
from constant value (300a becomes a)

Even if the behaviour is intended, silence the sparse warning replacing
the cast with a bitwise & operation.

Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module")
Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>