[PATCH 06/15] iio:ad5791: Mark transfer buffers as __be32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/iio/dac/ad5791.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
index d64acbd..1e7f4cd 100644
--- a/drivers/iio/dac/ad5791.c
+++ b/drivers/iio/dac/ad5791.c
@@ -107,7 +107,7 @@ enum ad5791_supported_device_ids {
 static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val)
 {
 	union {
-		u32 d32;
+		__be32 d32;
 		u8 d8[4];
 	} data;
 
@@ -121,7 +121,7 @@ static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val)
 static int ad5791_spi_read(struct spi_device *spi, u8 addr, u32 *val)
 {
 	union {
-		u32 d32;
+		__be32 d32;
 		u8 d8[4];
 	} data[3];
 	int ret;
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux