From: Jonathan Cameron <jic23@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-iio@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH] iio:adc:mcp320x: Tidy up endian types in type cast.
Date: Thu, 17 Oct 2019 22:48:24 +0100 [thread overview]
Message-ID: <20191017224824.1541b5d3@archlinux> (raw)
In-Reply-To: <20191013105201.waluu7myfn7bcmmn@wunner.de>
On Sun, 13 Oct 2019 12:52:01 +0200
Lukas Wunner <lukas@wunner.de> wrote:
> On Sun, Oct 13, 2019 at 10:05:42AM +0100, jic23@kernel.org wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Fixes the sparse warning:
> > drivers/iio/adc/mcp320x.c:167:41: warning: incorrect type in argument 1 (different base types)
> > drivers/iio/adc/mcp320x.c:167:41: expected restricted __be32 const [usertype] *p
> > drivers/iio/adc/mcp320x.c:167:41: got unsigned int [usertype] *<noident>
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Reviewed-by: Lukas Wunner <lukas@wunner.de>
Applied.
Thanks,
Jonathan
>
> Thanks,
>
> Lukas
>
>
> > ---
> > drivers/iio/adc/mcp320x.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
> > index 38bf10085696..465c7625a55a 100644
> > --- a/drivers/iio/adc/mcp320x.c
> > +++ b/drivers/iio/adc/mcp320x.c
> > @@ -164,7 +164,7 @@ static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel,
> > case mcp3550_60:
> > case mcp3551:
> > case mcp3553: {
> > - u32 raw = be32_to_cpup((u32 *)adc->rx_buf);
> > + u32 raw = be32_to_cpup((__be32 *)adc->rx_buf);
> >
> > if (!(adc->spi->mode & SPI_CPOL))
> > raw <<= 1; /* strip Data Ready bit in SPI mode 0,0 */
> > --
> > 2.23.0
prev parent reply other threads:[~2019-10-17 21:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-13 9:05 [PATCH] iio:adc:mcp320x: Tidy up endian types in type cast jic23
2019-10-13 10:52 ` Lukas Wunner
2019-10-17 21:48 ` Jonathan Cameron [this message]
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=20191017224824.1541b5d3@archlinux \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=linux-iio@vger.kernel.org \
--cc=lukas@wunner.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox