linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: fengguang.wu@intel.com, lars@metafoo.de,
	Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH] iio:adc:ad7298 Mark the rx and tx buffers as big endian.
Date: Sun, 18 Nov 2012 13:47:00 +0000	[thread overview]
Message-ID: <1353246420-13723-1-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <50A8E5DF.7000607@kernel.org>

Sparse shows that these two buffers should be __be16
rather than unsigned short when one enables endian
checks.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: fengguang.wu@intel.com
---
 drivers/iio/adc/ad7298.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
index 441a9a2..2691ad9 100644
--- a/drivers/iio/adc/ad7298.c
+++ b/drivers/iio/adc/ad7298.c
@@ -54,8 +54,8 @@ struct ad7298_state {
 	 * DMA (thus cache coherency maintenance) requires the
 	 * transfer buffers to live in their own cache lines.
 	 */
-	unsigned short			rx_buf[12] ____cacheline_aligned;
-	unsigned short			tx_buf[2];
+	__be16			rx_buf[12] ____cacheline_aligned;
+	__be16			tx_buf[2];
 };
 
 #define AD7298_V_CHAN(index)						\
-- 
1.8.0

  reply	other threads:[~2012-11-18 13:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50a787d6.NK04zL7PgCPbLOrx%fengguang.wu@intel.com>
2012-11-18 13:42 ` [iio:togreg 24/24] drivers/iio/adc/ad7298.c:125:23: sparse: incorrect type in assignment (different base types) Jonathan Cameron
2012-11-18 13:47   ` Jonathan Cameron [this message]
2012-11-18 14:19   ` Lars-Peter Clausen
2012-11-18 18:36     ` Jonathan Cameron
2012-11-18 18:48       ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353246420-13723-1-git-send-email-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=fengguang.wu@intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).