Skip to content

Commit ae8bb9b

Browse files
larsclausenjic23
authored andcommitted
iio:ad5791: Mark transfer buffers as __be32
Fixes the following warnings from sparse: drivers/iio/dac/ad5791.c:114:18: warning: incorrect type in assignment (different base types) drivers/iio/dac/ad5791.c:114:18: expected unsigned int [unsigned] [usertype] d32 drivers/iio/dac/ad5791.c:114:18: got restricted __be32 [usertype] <noident> drivers/iio/dac/ad5791.c:142:21: warning: incorrect type in assignment (different base types) drivers/iio/dac/ad5791.c:142:21: expected unsigned int [unsigned] [usertype] d32 drivers/iio/dac/ad5791.c:142:21: got restricted __be32 [usertype] <noident> drivers/iio/dac/ad5791.c:144:21: warning: incorrect type in assignment (different base types) drivers/iio/dac/ad5791.c:144:21: expected unsigned int [unsigned] [usertype] d32 drivers/iio/dac/ad5791.c:144:21: got restricted __be32 [usertype] <noident> drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32 drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32 drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32 drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32 drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32 drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent edc05f2 commit ae8bb9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/iio/dac/ad5791.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ enum ad5791_supported_device_ids {
107107
static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val)
108108
{
109109
union {
110-
u32 d32;
110+
__be32 d32;
111111
u8 d8[4];
112112
} data;
113113

@@ -121,7 +121,7 @@ static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val)
121121
static int ad5791_spi_read(struct spi_device *spi, u8 addr, u32 *val)
122122
{
123123
union {
124-
u32 d32;
124+
__be32 d32;
125125
u8 d8[4];
126126
} data[3];
127127
int ret;

0 commit comments

Comments
 (0)