This fixes the following checkpatch.pl warnings: (many locations) CHECK:SPACING: No space is necessary after a cast core/config.c:332: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) Signed-off-by: Robert Greener <rob@xxxxxxxxxxxxxx> --- drivers/usb/core/config.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 3bf04fdf850a..9717f89bcb6f 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -31,7 +31,7 @@ static int find_next_descriptor(unsigned char *buffer, int size, /* Find the next descriptor of type dt1 or dt2 */ while (size > 0) { - h = (struct usb_descriptor_header *) buffer; + h = (struct usb_descriptor_header *)buffer; if (h->bDescriptorType == dt1 || h->bDescriptorType == dt2) break; buffer += h->bLength; @@ -57,7 +57,7 @@ static void usb_parse_ssp_isoc_endpoint_companion(struct device *ddev, * The SuperSpeedPlus Isoc endpoint companion descriptor immediately * follows the SuperSpeed Endpoint Companion descriptor */ - desc = (struct usb_ssp_isoc_ep_comp_descriptor *) buffer; + desc = (struct usb_ssp_isoc_ep_comp_descriptor *)buffer; if (desc->bDescriptorType != USB_DT_SSP_ISOC_ENDPOINT_COMP || size < USB_DT_SSP_ISOC_EP_COMP_SIZE) { dev_warn(ddev, @@ -78,7 +78,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, /* The SuperSpeed endpoint companion descriptor is supposed to * be the first thing immediately following the endpoint descriptor. */ - desc = (struct usb_ss_ep_comp_descriptor *) buffer; + desc = (struct usb_ss_ep_comp_descriptor *)buffer; if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP || size < USB_DT_SS_EP_COMP_SIZE) { @@ -261,7 +261,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, unsigned int maxp; const unsigned short *maxpacket_maxes; - d = (struct usb_endpoint_descriptor *) buffer; + d = (struct usb_endpoint_descriptor *)buffer; buffer += d->bLength; size -= d->bLength; @@ -329,7 +329,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, * descriptors. Try to fix those and fall back to an * 8-ms default value otherwise. */ - n = fls(d->bInterval*8); + n = fls(d->bInterval * 8); if (n == 0) n = 7; /* 8 ms = 2^(7-1) uframes */ j = 16; @@ -505,7 +505,7 @@ static int usb_parse_interface(struct device *ddev, int cfgno, int len, retval; int num_ep, num_ep_orig; - d = (struct usb_interface_descriptor *) buffer; + d = (struct usb_interface_descriptor *)buffer; buffer += d->bLength; size -= d->bLength; @@ -574,7 +574,7 @@ static int usb_parse_interface(struct device *ddev, int cfgno, /* Parse all the endpoint descriptors */ n = 0; while (size > 0) { - if (((struct usb_descriptor_header *) buffer)->bDescriptorType + if (((struct usb_descriptor_header *)buffer)->bDescriptorType == USB_DT_INTERFACE) break; retval = usb_parse_endpoint(ddev, cfgno, config, inum, asnum, @@ -654,7 +654,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx, break; } - header = (struct usb_descriptor_header *) buffer2; + header = (struct usb_descriptor_header *)buffer2; if ((header->bLength > size2) || (header->bLength < 2)) { dev_warn(ddev, "config %d has an invalid descriptor of length %d, skipping remainder of the config\n", @@ -666,7 +666,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx, struct usb_interface_descriptor *d; int inum; - d = (struct usb_interface_descriptor *) header; + d = (struct usb_interface_descriptor *)header; if (d->bLength < USB_DT_INTERFACE_SIZE) { dev_warn(ddev, "config %d has an invalid interface descriptor of length %d, skipping\n", @@ -912,7 +912,7 @@ int usb_get_configuration(struct usb_device *dev) result = -EINVAL; goto err; } - length = max((int) le16_to_cpu(desc->wTotalLength), + length = max((int)le16_to_cpu(desc->wTotalLength), USB_DT_CONFIG_SIZE); /* Now that we know the length, get the whole thing */ -- 2.32.0