linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/15] iio:ad5504: Mark transfer buffers as __be16
@ 2013-11-25 12:41 Lars-Peter Clausen
  2013-11-25 12:41 ` [PATCH 02/15] iio:ad5504: Do not store transfer buffers on the stack Lars-Peter Clausen
                   ` (14 more replies)
  0 siblings, 15 replies; 38+ messages in thread
From: Lars-Peter Clausen @ 2013-11-25 12:41 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen

Fixes the following warnings from sparse:
	drivers/iio/dac/ad5504.c:71:19: warning: incorrect type in initializer (different base types)
	drivers/iio/dac/ad5504.c:71:19:    expected unsigned short [unsigned] [usertype] tmp
	drivers/iio/dac/ad5504.c:71:19:    got restricted __be16 [usertype] <noident>
	drivers/iio/dac/ad5504.c:80:19: warning: incorrect type in initializer (different base types)
	drivers/iio/dac/ad5504.c:80:19:    expected unsigned short [unsigned] [usertype] tmp
	drivers/iio/dac/ad5504.c:80:19:    got restricted __be16 [usertype] <noident>
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5504.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
index c0957a9..6cd0dd6 100644
--- a/drivers/iio/dac/ad5504.c
+++ b/drivers/iio/dac/ad5504.c
@@ -68,7 +68,7 @@ enum ad5504_supported_device_ids {
 
 static int ad5504_spi_write(struct spi_device *spi, u8 addr, u16 val)
 {
-	u16 tmp = cpu_to_be16(AD5504_CMD_WRITE |
+	__be16 tmp = cpu_to_be16(AD5504_CMD_WRITE |
 			      AD5504_ADDR(addr) |
 			      (val & AD5504_RES_MASK));
 
@@ -77,8 +77,8 @@ static int ad5504_spi_write(struct spi_device *spi, u8 addr, u16 val)
 
 static int ad5504_spi_read(struct spi_device *spi, u8 addr)
 {
-	u16 tmp = cpu_to_be16(AD5504_CMD_READ | AD5504_ADDR(addr));
-	u16 val;
+	__be16 tmp = cpu_to_be16(AD5504_CMD_READ | AD5504_ADDR(addr));
+	__be16 val;
 	int ret;
 	struct spi_transfer	t = {
 			.tx_buf		= &tmp,
-- 
1.8.0

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

end of thread, other threads:[~2013-12-22 17:43 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 12:41 [PATCH 01/15] iio:ad5504: Mark transfer buffers as __be16 Lars-Peter Clausen
2013-11-25 12:41 ` [PATCH 02/15] iio:ad5504: Do not store transfer buffers on the stack Lars-Peter Clausen
2013-11-30 11:07   ` Jonathan Cameron
2013-11-25 12:41 ` [PATCH 03/15] iio:ad5421: Mark transfer buffer as __be32 Lars-Peter Clausen
2013-11-30 11:07   ` Jonathan Cameron
2013-11-25 12:41 ` [PATCH 04/15] iio:ad5686: " Lars-Peter Clausen
2013-11-30 11:07   ` Jonathan Cameron
2013-11-25 12:41 ` [PATCH 05/15] iio:ad5755: " Lars-Peter Clausen
2013-11-30 11:08   ` Jonathan Cameron
2013-11-25 12:41 ` [PATCH 06/15] iio:ad5791: Mark transfer buffers " Lars-Peter Clausen
2013-11-30 11:08   ` Jonathan Cameron
2013-11-25 12:41 ` [PATCH 07/15] iio:ad5791: Do not store transfer buffers on the stack Lars-Peter Clausen
2013-11-30 11:09   ` Jonathan Cameron
2013-12-22 17:36     ` Jonathan Cameron
2013-12-22 17:40       ` Lars-Peter Clausen
2013-12-22 17:43         ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 08/15] iio:ad7266: Mark transfer buffer as __be16 Lars-Peter Clausen
2013-11-30 11:10   ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 09/15] iio:vcnl4000: " Lars-Peter Clausen
2013-11-30 11:11   ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 10/15] staging:iio:ad7280a: Mark transfer buffer as __be32 Lars-Peter Clausen
2013-11-30 11:12   ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 11/15] staging:iio:ad7280a: Do not store transfer buffer on the stack Lars-Peter Clausen
2013-11-30 11:12   ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 12/15] staging:iio:ad7746: Mark transfer buffer as __be32 Lars-Peter Clausen
2013-11-30 11:13   ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 13/15] staging:iio:ad7746: Do not store the transfer buffer on the stack Lars-Peter Clausen
2013-11-30 11:13   ` Jonathan Cameron
2013-12-22 17:22     ` Jonathan Cameron
2013-11-25 12:42 ` [PATCH 14/15] staging:iio:ad9832: Mark transfer buffers as __be16 Lars-Peter Clausen
2013-11-30 11:14   ` Jonathan Cameron
2013-12-03 10:27     ` Lars-Peter Clausen
2013-12-03 14:56       ` Jonathan Cameron
2013-12-03 20:09         ` Jonathan Cameron
2013-12-03 20:11           ` Lars-Peter Clausen
2013-11-25 12:42 ` [PATCH 15/15] staging:iio:ad9834: Mark transfer buffers as __b16 Lars-Peter Clausen
2013-11-30 11:14   ` Jonathan Cameron
2013-11-30 11:03 ` [PATCH 01/15] iio:ad5504: Mark transfer buffers as __be16 Jonathan Cameron

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