From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Hennerich <michael.hennerich@analog.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Input: adxl34x - fix sparse warning
Date: Tue, 12 Oct 2021 19:46:37 -0700 [thread overview]
Message-ID: <YWZIjb91d6aAwgss@google.com> (raw)
This fixes the following warning from sparse:
CC [M] drivers/input/misc/adxl34x.o
CHECK drivers/input/misc/adxl34x.c
drivers/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
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/misc/adxl34x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 34beac80e6f0..a4af314392a9 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -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
next reply other threads:[~2021-10-13 2:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 2:46 Dmitry Torokhov [this message]
2021-10-13 7:41 ` [PATCH] Input: adxl34x - fix sparse warning Uwe Kleine-König
2021-10-15 15:20 ` Hennerich, Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YWZIjb91d6aAwgss@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.