Input: adxl34x - fix sparse warning
Dmitry Torokhov
maintainerPATCH 1/1 Input: adxl34x - fix sparse warning
This fixes the following warning from sparse:
CC [M] drivers/input/misc/adxl34x.o
CHECK drivers/input/misc/adxl34x.cdrivers/input/misc/adxl34x.c:245:29: warning: cast to restricted __le16 drivers/input/misc/adxl34x.c:248:29: warning: cast to restricted __le16 drivers/input/misc/adxl34x.c:251:29: warning: cast to restricted __le16
--- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/adxl34x.c +1 -1
@@ -237,7 +237,7 @@ static const struct adxl34x_platform_data adxl34x_default_init = {static void adxl34x_get_triple (struct adxl34x *ac,struct axis_triple *axis) { -short buf[3 ]; +__le16 buf[3 ]; ac->bops->read_block (ac->dev,DATAX0 ,DATAZ1 -DATAX0 +1 , buf);
Signature · 5 lines
2.33.0.882.g93a45727a2-goog -- Dmitry
Quoted 7 lines · Dmitry Torokhov
This fixes the following warning from sparse:
CC [M]
drivers/input/misc/adxl34x.o
CHECKdrivers/input/misc/adxl34x.cdrivers/input/misc/adxl34x.c:245:29: warning: cast to restricted__le16drivers/input/misc/adxl34x.c:248:29: warning: cast to restricted__le16drivers/input/misc/adxl34x.c:251:29: warning: cast to restricted__le16
This was introduced (I think) in commit
e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers"). Is this worth a Fixes: line, or mentioning in the commit log?
Other than that:
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Quoted 10 lines
-----Original Message-----
From: Dmitry Torokhov <[email protected]>
Sent: Mittwoch, 13. Oktober 2021 04:47
To: Hennerich, Michael <[email protected]>
Cc: Uwe Kleine-König <[email protected]>; linux- [email protected]; [email protected]
Subject: [PATCH] Input: adxl34x - fix sparse warningThis fixes the following warning from sparse:
Quoted 7 lines
CC [M]
drivers/input/misc/adxl34x.o
CHECKdrivers/input/misc/adxl34x.cdrivers/input/misc/adxl34x.c:245:29: warning: cast to restricted__le16drivers/input/misc/adxl34x.c:248:29: warning: cast to restricted__le16drivers/input/misc/adxl34x.c:251:29: warning: cast to restricted__le16Signed-off-by Dmitry Torokhov <[email protected]>
Quoted 23 lines
--- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/misc/adxl34x.c index renamed from drivers/input/misc/adxl34x.c +0
-0
34beac80e6f0..a4af314392a9100644drivers/input/misc/adxl34x.c +1
-2@@ -237,7 +237,7 @@ static const struct adxl34x_platform_data adxl34x_default_init = {static void adxl34x_get_triple (struct adxl34x *ac,struct axis_triple *axis) { -short buf[3 ]; +__le16 buf[3 ]; ac->bops->read_block (ac->dev,DATAX0 ,DATAZ1 -DATAX0 +1 , buf); --2.33.0.882.g93a45727a2-goog
--
Dmitry