]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: comedi: usbdux: fix sparse endianness warnings
authorChase Southwood <chase.southwood@gmail.com>
Sat, 30 Aug 2014 01:40:32 +0000 (20:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:29:20 +0000 (13:29 -0700)
Sparse has many warnings like:

drivers/staging/comedi/drivers/usbdux.c:366:32: warning: cast to
restricted __le16

on lines on which devpriv->in_buf or devpriv->insn_buf are passed to
le16_to_cpu().  This suggests that both of these variables should actually
be of type __le16.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbdux.c

index 184dee222619216579e569c8c14e334f7554c5df..86c2c27fcb9263ff5d67a8ef5d296c2b2fa91887 100644 (file)
@@ -196,9 +196,9 @@ struct usbdux_private {
        /* size of the PWM buffer which holds the bit pattern */
        int pwm_buf_sz;
        /* input buffer for the ISO-transfer */
-       uint16_t *in_buf;
+       __le16 *in_buf;
        /* input buffer for single insn */
-       uint16_t *insn_buf;
+       __le16 *insn_buf;
 
        unsigned int high_speed:1;
        unsigned int ai_cmd_running:1;