staging: comedi: usbdux: fix more sparse endianness warnings
authorChase Southwood <chase.southwood@gmail.com>
Sun, 31 Aug 2014 19:44:23 +0000 (14:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Sep 2014 17:40:03 +0000 (10:40 -0700)
Sparse shows a couple of warnings like:

drivers/staging/comedi/drivers/usbdux.c:889:20: warning: incorrect type in assignment (different base types)
drivers/staging/comedi/drivers/usbdux.c:889:20:    expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/comedi/drivers/usbdux.c:889:20:    got restricted __le16 [usertype] <noident>

This is the result of a couple of calls to cpu_to_le16() being assigned to
uint16_t typed variables.  Switch the types of these variables/pointers to
__le16 accordingly.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Suggested-by: Ian Abbott <abbotti@mev.co.uk>
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 86c2c27fcb9263ff5d67a8ef5d296c2b2fa91887..8eb2742e6fef6a4ca373e42c9ee6a04fc3f7729d 100644 (file)
@@ -868,7 +868,7 @@ static int usbdux_ao_insn_write(struct comedi_device *dev,
        struct usbdux_private *devpriv = dev->private;
        unsigned int chan = CR_CHAN(insn->chanspec);
        unsigned int val = s->readback[chan];
-       uint16_t *p = (uint16_t *)&devpriv->dux_commands[2];
+       __le16 *p = (__le16 *)&devpriv->dux_commands[2];
        int ret = -EBUSY;
        int i;
 
@@ -1180,7 +1180,7 @@ static int usbdux_counter_write(struct comedi_device *dev,
 {
        struct usbdux_private *devpriv = dev->private;
        unsigned int chan = CR_CHAN(insn->chanspec);
-       uint16_t *p = (uint16_t *)&devpriv->dux_commands[2];
+       __le16 *p = (__le16 *)&devpriv->dux_commands[2];
        int ret = 0;
        int i;