linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: iio: dac: Fix sparse warning
@ 2016-09-23 19:20 Sandhya Bankar
  2016-09-24 16:18 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Sandhya Bankar @ 2016-09-23 19:20 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23, knaack.h, pmeerw, linux-iio

Fixing below warnings:

drivers/iio/dac/ad5592r.c:58:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:58:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:58:41:    got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:62:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:62:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:62:41:    got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:92:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:92:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:92:41:    got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:110:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:110:41:    expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:110:41:    got restricted __be16 *<noident>

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/iio/dac/ad5592r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5592r.c b/drivers/iio/dac/ad5592r.c
index 0b235a2..6eed5b7 100644
--- a/drivers/iio/dac/ad5592r.c
+++ b/drivers/iio/dac/ad5592r.c
@@ -17,7 +17,7 @@
 #define AD5592R_GPIO_READBACK_EN	BIT(10)
 #define AD5592R_LDAC_READBACK_EN	BIT(6)
 
-static int ad5592r_spi_wnop_r16(struct ad5592r_state *st, u16 *buf)
+static int ad5592r_spi_wnop_r16(struct ad5592r_state *st, __be16 *buf)
 {
 	struct spi_device *spi = container_of(st->dev, struct spi_device, dev);
 	struct spi_transfer t = {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: iio: dac: Fix sparse warning
  2016-09-23 19:20 [PATCH] drivers: iio: dac: Fix sparse warning Sandhya Bankar
@ 2016-09-24 16:18 ` Jonathan Cameron
  2016-09-26  9:26   ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2016-09-24 16:18 UTC (permalink / raw)
  To: Sandhya Bankar, lars, Michael.Hennerich, knaack.h, pmeerw,
	linux-iio

On 23/09/16 20:20, Sandhya Bankar wrote:
> Fixing below warnings:
> 
> drivers/iio/dac/ad5592r.c:58:41: warning: incorrect type in argument 2 (different base types)
> drivers/iio/dac/ad5592r.c:58:41:    expected unsigned short [usertype] *buf
> drivers/iio/dac/ad5592r.c:58:41:    got restricted __be16 *<noident>
> drivers/iio/dac/ad5592r.c:62:41: warning: incorrect type in argument 2 (different base types)
> drivers/iio/dac/ad5592r.c:62:41:    expected unsigned short [usertype] *buf
> drivers/iio/dac/ad5592r.c:62:41:    got restricted __be16 *<noident>
> drivers/iio/dac/ad5592r.c:92:41: warning: incorrect type in argument 2 (different base types)
> drivers/iio/dac/ad5592r.c:92:41:    expected unsigned short [usertype] *buf
> drivers/iio/dac/ad5592r.c:92:41:    got restricted __be16 *<noident>
> drivers/iio/dac/ad5592r.c:110:41: warning: incorrect type in argument 2 (different base types)
> drivers/iio/dac/ad5592r.c:110:41:    expected unsigned short [usertype] *buf
> drivers/iio/dac/ad5592r.c:110:41:    got restricted __be16 *<noident>
> 
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Looks good to me.  Lars, will be a while before I send next pull if
you want to comment on this as well.

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

Thanks,

Jonathan
> ---
>  drivers/iio/dac/ad5592r.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad5592r.c b/drivers/iio/dac/ad5592r.c
> index 0b235a2..6eed5b7 100644
> --- a/drivers/iio/dac/ad5592r.c
> +++ b/drivers/iio/dac/ad5592r.c
> @@ -17,7 +17,7 @@
>  #define AD5592R_GPIO_READBACK_EN	BIT(10)
>  #define AD5592R_LDAC_READBACK_EN	BIT(6)
>  
> -static int ad5592r_spi_wnop_r16(struct ad5592r_state *st, u16 *buf)
> +static int ad5592r_spi_wnop_r16(struct ad5592r_state *st, __be16 *buf)
>  {
>  	struct spi_device *spi = container_of(st->dev, struct spi_device, dev);
>  	struct spi_transfer t = {
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: iio: dac: Fix sparse warning
  2016-09-24 16:18 ` Jonathan Cameron
@ 2016-09-26  9:26   ` Lars-Peter Clausen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars-Peter Clausen @ 2016-09-26  9:26 UTC (permalink / raw)
  To: Jonathan Cameron, Sandhya Bankar, Michael.Hennerich, knaack.h,
	pmeerw, linux-iio

On 09/24/2016 06:18 PM, Jonathan Cameron wrote:
> On 23/09/16 20:20, Sandhya Bankar wrote:
>> Fixing below warnings:
>>
>> drivers/iio/dac/ad5592r.c:58:41: warning: incorrect type in argument 2 (different base types)
>> drivers/iio/dac/ad5592r.c:58:41:    expected unsigned short [usertype] *buf
>> drivers/iio/dac/ad5592r.c:58:41:    got restricted __be16 *<noident>
>> drivers/iio/dac/ad5592r.c:62:41: warning: incorrect type in argument 2 (different base types)
>> drivers/iio/dac/ad5592r.c:62:41:    expected unsigned short [usertype] *buf
>> drivers/iio/dac/ad5592r.c:62:41:    got restricted __be16 *<noident>
>> drivers/iio/dac/ad5592r.c:92:41: warning: incorrect type in argument 2 (different base types)
>> drivers/iio/dac/ad5592r.c:92:41:    expected unsigned short [usertype] *buf
>> drivers/iio/dac/ad5592r.c:92:41:    got restricted __be16 *<noident>
>> drivers/iio/dac/ad5592r.c:110:41: warning: incorrect type in argument 2 (different base types)
>> drivers/iio/dac/ad5592r.c:110:41:    expected unsigned short [usertype] *buf
>> drivers/iio/dac/ad5592r.c:110:41:    got restricted __be16 *<noident>
>>
>> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> Looks good to me.  Lars, will be a while before I send next pull if
> you want to comment on this as well.

Looks good, thanks.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-26  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 19:20 [PATCH] drivers: iio: dac: Fix sparse warning Sandhya Bankar
2016-09-24 16:18 ` Jonathan Cameron
2016-09-26  9:26   ` Lars-Peter Clausen

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).