public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: comedi: usbduxsigma: fix sparse endianness warnings
@ 2014-08-30  1:40 Chase Southwood
  2014-08-30 10:43 ` Ian Abbott
  0 siblings, 1 reply; 2+ messages in thread
From: Chase Southwood @ 2014-08-30  1:40 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, hsweeten, devel, linux-kernel, Chase Southwood

Sparse has many warnings like:

drivers/staging/comedi/drivers/usbduxsigma.c:293:21: warning: cast to
restricted __be32

on lines on which devpriv->in_buf is passed to be32_to_cpu().  This
suggests that this variable should actually be of type __be32.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
This is, as usual, compile tested only.  I tried to verify as best as I
could that this is a sane change, but I am unable to test on the hardware.

 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c
index 94a09c1..e9b11e8 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -157,7 +157,7 @@ struct usbduxsigma_private {
 	/* size of the PWM buffer which holds the bit pattern */
 	int pwm_buf_sz;
 	/* input buffer for the ISO-transfer */
-	uint32_t *in_buf;
+	__be32 *in_buf;
 	/* input buffer for single insn */
 	uint8_t *insn_buf;
 
-- 
2.1.0


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

* Re: [PATCH] staging: comedi: usbduxsigma: fix sparse endianness warnings
  2014-08-30  1:40 [PATCH] staging: comedi: usbduxsigma: fix sparse endianness warnings Chase Southwood
@ 2014-08-30 10:43 ` Ian Abbott
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Abbott @ 2014-08-30 10:43 UTC (permalink / raw)
  To: Chase Southwood, gregkh; +Cc: hsweeten, devel, linux-kernel

On 30/08/14 02:40, Chase Southwood wrote:
> Sparse has many warnings like:
>
> drivers/staging/comedi/drivers/usbduxsigma.c:293:21: warning: cast to
> restricted __be32
>
> on lines on which devpriv->in_buf is passed to be32_to_cpu().  This
> suggests that this variable should actually be of type __be32.
>
> Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
> Cc: Ian Abbott <abbotti@mev.co.uk>
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> ---
> This is, as usual, compile tested only.  I tried to verify as best as I
> could that this is a sane change, but I am unable to test on the hardware.

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

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

end of thread, other threads:[~2014-08-30 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-30  1:40 [PATCH] staging: comedi: usbduxsigma: fix sparse endianness warnings Chase Southwood
2014-08-30 10:43 ` Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox