diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-09-01 09:48:00 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 11:02:14 -0600 |
commit | 7b6b4b245f5dd1545c73a11dac87db41a1ab9384 (patch) | |
tree | 5a9ce6c3b4b1c11b07b196ea2b5d46a758a886c6 /drivers/usb | |
parent | 2df9769a20d7f6947a9ea6374ec54e3834fe6d2b (diff) |
usb: misc: usbtest: using the same data format among write/compare/output
Using the same data format "buf[j] = (u8)(i + j)" among
write, compare buf, and console output stage.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 819b4b1f327b..cac93b77f9a7 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -1720,7 +1720,7 @@ static int ctrl_out(struct usbtest_dev *dev, for (i = 0; i < count; i++) { /* write patterned data */ for (j = 0; j < len; j++) - buf[j] = i + j; + buf[j] = (u8)(i + j); retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x5b, USB_DIR_OUT|USB_TYPE_VENDOR, 0, 0, buf, len, USB_CTRL_SET_TIMEOUT); @@ -1750,9 +1750,9 @@ static int ctrl_out(struct usbtest_dev *dev, /* fail if we can't verify */ for (j = 0; j < len; j++) { - if (buf[j] != (u8) (i + j)) { + if (buf[j] != (u8)(i + j)) { ERROR(dev, "ctrl_out, byte %d is %d not %d\n", - j, buf[j], (u8) i + j); + j, buf[j], (u8)(i + j)); retval = -EBADMSG; break; } |