diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 3e91d3e98ee8..1fdd88f382cc 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -437,7 +437,7 @@ alloc_sglist(int nents, int max, int vary) | |||
437 | if (max == 0) | 437 | if (max == 0) |
438 | return NULL; | 438 | return NULL; |
439 | 439 | ||
440 | sg = kmalloc_array(nents, sizeof *sg, GFP_KERNEL); | 440 | sg = kmalloc_array(nents, sizeof(*sg), GFP_KERNEL); |
441 | if (!sg) | 441 | if (!sg) |
442 | return NULL; | 442 | return NULL; |
443 | sg_init_table(sg, nents); | 443 | sg_init_table(sg, nents); |
@@ -573,7 +573,7 @@ static int is_good_config(struct usbtest_dev *tdev, int len) | |||
573 | { | 573 | { |
574 | struct usb_config_descriptor *config; | 574 | struct usb_config_descriptor *config; |
575 | 575 | ||
576 | if (len < sizeof *config) | 576 | if (len < sizeof(*config)) |
577 | return 0; | 577 | return 0; |
578 | config = (struct usb_config_descriptor *) tdev->buf; | 578 | config = (struct usb_config_descriptor *) tdev->buf; |
579 | 579 | ||
@@ -683,8 +683,8 @@ static int ch9_postconfig(struct usbtest_dev *dev) | |||
683 | 683 | ||
684 | /* there's always [9.4.3] a device descriptor [9.6.1] */ | 684 | /* there's always [9.4.3] a device descriptor [9.6.1] */ |
685 | retval = usb_get_descriptor(udev, USB_DT_DEVICE, 0, | 685 | retval = usb_get_descriptor(udev, USB_DT_DEVICE, 0, |
686 | dev->buf, sizeof udev->descriptor); | 686 | dev->buf, sizeof(udev->descriptor)); |
687 | if (retval != sizeof udev->descriptor) { | 687 | if (retval != sizeof(udev->descriptor)) { |
688 | dev_err(&iface->dev, "dev descriptor --> %d\n", retval); | 688 | dev_err(&iface->dev, "dev descriptor --> %d\n", retval); |
689 | return (retval < 0) ? retval : -EDOM; | 689 | return (retval < 0) ? retval : -EDOM; |
690 | } | 690 | } |
@@ -954,7 +954,7 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param) | |||
954 | * device, but some are chosen to trigger protocol stalls | 954 | * device, but some are chosen to trigger protocol stalls |
955 | * or short reads. | 955 | * or short reads. |
956 | */ | 956 | */ |
957 | memset(&req, 0, sizeof req); | 957 | memset(&req, 0, sizeof(req)); |
958 | req.bRequest = USB_REQ_GET_DESCRIPTOR; | 958 | req.bRequest = USB_REQ_GET_DESCRIPTOR; |
959 | req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE; | 959 | req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE; |
960 | 960 | ||
@@ -1074,7 +1074,7 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param) | |||
1074 | if (!u) | 1074 | if (!u) |
1075 | goto cleanup; | 1075 | goto cleanup; |
1076 | 1076 | ||
1077 | reqp = kmalloc(sizeof *reqp, GFP_KERNEL); | 1077 | reqp = kmalloc(sizeof(*reqp), GFP_KERNEL); |
1078 | if (!reqp) | 1078 | if (!reqp) |
1079 | goto cleanup; | 1079 | goto cleanup; |
1080 | reqp->setup = req; | 1080 | reqp->setup = req; |
@@ -1667,13 +1667,13 @@ test_iso_queue(struct usbtest_dev *dev, struct usbtest_param *param, | |||
1667 | if (param->sglen > 10) | 1667 | if (param->sglen > 10) |
1668 | return -EDOM; | 1668 | return -EDOM; |
1669 | 1669 | ||
1670 | memset(&context, 0, sizeof context); | 1670 | memset(&context, 0, sizeof(context)); |
1671 | context.count = param->iterations * param->sglen; | 1671 | context.count = param->iterations * param->sglen; |
1672 | context.dev = dev; | 1672 | context.dev = dev; |
1673 | init_completion(&context.done); | 1673 | init_completion(&context.done); |
1674 | spin_lock_init(&context.lock); | 1674 | spin_lock_init(&context.lock); |
1675 | 1675 | ||
1676 | memset(urbs, 0, sizeof urbs); | 1676 | memset(urbs, 0, sizeof(urbs)); |
1677 | udev = testdev_to_usbdev(dev); | 1677 | udev = testdev_to_usbdev(dev); |
1678 | dev_info(&dev->intf->dev, | 1678 | dev_info(&dev->intf->dev, |
1679 | "... iso period %d %sframes, wMaxPacket %04x\n", | 1679 | "... iso period %d %sframes, wMaxPacket %04x\n", |