drivers: iio: dac: Fix sparse warning
Subsystems (2)
PATCH 1/1 drivers: iio: dac: Fix sparse warning
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] *bufdrivers/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] *bufdrivers/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] *bufdrivers/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] *bufdrivers/iio/dac/ad5592r.c:110:41: got restricted __be16 *<noident>
--- drivers/iio/dac/ad5592r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5592r.c +1 -1
@@ -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 = {
Signature · 1 line
1.8.3.1
Quoted 15 lines · Sandhya Bankar
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] *bufdrivers/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] *bufdrivers/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] *bufdrivers/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] *bufdrivers/iio/dac/ad5592r.c:110:41: got restricted__be16*<noident>
Quoted 1 line
Signed-off-by Sandhya Bankar <[email protected]>
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
Quoted 18 lines
--- drivers/iio/dac/ad5592r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/dac/ad5592r.c +1
-1@@ -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 = {
Lars-Peter Clausen
Acked-byQuoted 16 lines · Jonathan Cameron
Quoted 15 lines · Sandhya Bankar
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] *bufdrivers/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] *bufdrivers/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] *bufdrivers/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] *bufdrivers/iio/dac/ad5592r.c:110:41: got restricted__be16*<noident>
Quoted 3 lines
Quoted 1 line
Signed-off-by Sandhya Bankar <[email protected]>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.