All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
	gregkh@linuxfoundation.org
Cc: Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net,
	linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: iio: Fix sparse endian warning
Date: Mon, 28 Mar 2016 15:37:54 +0100	[thread overview]
Message-ID: <56F941C2.7020609@kernel.org> (raw)
In-Reply-To: <1458731194-11597-1-git-send-email-ksenija.stanojevic@gmail.com>

On 23/03/16 11:06, Ksenija Stanojevic wrote:
> Fix following sparse warning:
> warning: cast to restricted __be16
> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Subject amended to include the driver name.  I do tend to let some through
without whilst being lazy, but it really should give a hint of the scope
of the patch.  I'll be more vigorous about this in future!

Applied to the togreg branch of iio.git, initially pushed out as staging
for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/adc/ad7606_spi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/adc/ad7606_spi.c b/drivers/staging/iio/adc/ad7606_spi.c
> index d873a51..825da07 100644
> --- a/drivers/staging/iio/adc/ad7606_spi.c
> +++ b/drivers/staging/iio/adc/ad7606_spi.c
> @@ -21,7 +21,8 @@ static int ad7606_spi_read_block(struct device *dev,
>  {
>  	struct spi_device *spi = to_spi_device(dev);
>  	int i, ret;
> -	unsigned short *data = buf;
> +	unsigned short *data;
> +	__be16 *bdata = buf;
>  
>  	ret = spi_read(spi, buf, count * 2);
>  	if (ret < 0) {
> @@ -30,7 +31,7 @@ static int ad7606_spi_read_block(struct device *dev,
>  	}
>  
>  	for (i = 0; i < count; i++)
> -		data[i] = be16_to_cpu(data[i]);
> +		data[i] = be16_to_cpu(bdata[i]);
>  
>  	return 0;
>  }
> 

  reply	other threads:[~2016-03-28 14:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 11:06 [PATCH] Staging: iio: Fix sparse endian warning Ksenija Stanojevic
2016-03-28 14:37 ` Jonathan Cameron [this message]
2016-05-22  7:56 Geert Uytterhoeven
2016-05-22  7:56 ` Geert Uytterhoeven

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=56F941C2.7020609@kernel.org \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=knaack.h@gmx.de \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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.