From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>, mranostay@gmail.com
Subject: [PATCH] iio:light:apds9960 Fix sparse endian warnings.
Date: Wed, 23 Sep 2015 20:36:02 +0100 [thread overview]
Message-ID: <1443036962-30729-1-git-send-email-jic23@kernel.org> (raw)
This patch is a tidy up of warnings from the autobuilder.
>> drivers/iio/light/apds9960.c:495:32: sparse: cast to restricted __le16
drivers/iio/light/apds9960.c:635:24: sparse: cast to restricted __le16
>> drivers/iio/light/apds9960.c:672:21: sparse: incorrect type in assignment (different base types)
drivers/iio/light/apds9960.c:672:21: expected unsigned short [unsigned] [usertype] buf
drivers/iio/light/apds9960.c:672:21: got restricted __le16 [usertype] <noident>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: mranostay@gmail.com
---
drivers/iio/light/apds9960.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index bf80ce47926b..7d269ef9e062 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -472,7 +472,7 @@ static int apds9960_read_raw(struct iio_dev *indio_dev,
int *val, int *val2, long mask)
{
struct apds9960_data *data = iio_priv(indio_dev);
- u16 buf;
+ __le16 buf;
int ret = -EINVAL;
if (data->gesture_mode_running)
@@ -613,7 +613,7 @@ static int apds9960_read_event(struct iio_dev *indio_dev,
int *val, int *val2)
{
u8 reg;
- u16 buf;
+ __le16 buf;
int ret = 0;
struct apds9960_data *data = iio_priv(indio_dev);
@@ -649,7 +649,7 @@ static int apds9960_write_event(struct iio_dev *indio_dev,
int val, int val2)
{
u8 reg;
- u16 buf;
+ __le16 buf;
int ret = 0;
struct apds9960_data *data = iio_priv(indio_dev);
--
2.5.1
next reply other threads:[~2015-09-23 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 19:36 Jonathan Cameron [this message]
2015-10-12 17:22 ` [PATCH] iio:light:apds9960 Fix sparse endian warnings Jonathan Cameron
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=1443036962-30729-1-git-send-email-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=mranostay@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).