Re: [PATCH] drivers/usb/core: hcd.c: Removed all space warnings from checkpatch.pl

2015-04-11 Thread Joe Perches
On Sat, 2015-04-11 at 03:04 -0700, Chase Metzger wrote:
 Removed all(except false positives, from calculations) space prohibited 
 warnings generated by
 checkpatch.pl.

False positives?  Please describe them.

The only thing I believe you elided was the
use of a BitTime macro which in my opinion
should be used as a function.

drivers/usb/core/hcd.c: tmp = (67667L * (31L + 10L * BitTime 
(bytecount))) / 1000L;

as it is in the include file:

include/linux/usb/hcd.h:+ (2083UL * (3 + BitTime(bytes/1000 \


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/usb/core: hcd.c: Removed all space warnings from checkpatch.pl

2015-04-11 Thread Chase Metzger
Removed all(except false positives, from calculations) space prohibited 
warnings generated by
checkpatch.pl.

Signed-off-by: Chase Metzger chasemetzge...@gmail.com
---
 drivers/usb/core/hcd.c | 168 -
 1 file changed, 84 insertions(+), 84 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 45a915c..557f2b8 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -90,8 +90,8 @@ unsigned long usb_hcds_loaded;
 EXPORT_SYMBOL_GPL(usb_hcds_loaded);
 
 /* host controllers we manage */
-LIST_HEAD (usb_bus_list);
-EXPORT_SYMBOL_GPL (usb_bus_list);
+LIST_HEAD(usb_bus_list);
+EXPORT_SYMBOL_GPL(usb_bus_list);
 
 /* used when allocating bus numbers */
 #define USB_MAXBUS 64
@@ -99,7 +99,7 @@ static DECLARE_BITMAP(busmap, USB_MAXBUS);
 
 /* used when updating list of hcds */
 DEFINE_MUTEX(usb_bus_list_lock);   /* exported only for usbfs */
-EXPORT_SYMBOL_GPL (usb_bus_list_lock);
+EXPORT_SYMBOL_GPL(usb_bus_list_lock);
 
 /* used for controlling access to virtual root hubs */
 static DEFINE_SPINLOCK(hcd_root_hub_lock);
@@ -447,7 +447,7 @@ rh_string(int id, struct usb_hcd const *hcd, u8 *data, 
unsigned len)
break;
case 3:
/* Manufacturer */
-   snprintf (buf, sizeof buf, %s %s %s, init_utsname()-sysname,
+   snprintf(buf, sizeof buf, %s %s %s, init_utsname()-sysname,
init_utsname()-release, hcd-driver-description);
s = buf;
break;
@@ -461,7 +461,7 @@ rh_string(int id, struct usb_hcd const *hcd, u8 *data, 
unsigned len)
 
 
 /* Root hub control transfers execute synchronously */
-static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
+static int rh_call_control(struct usb_hcd *hcd, struct urb *urb)
 {
struct usb_ctrlrequest *cmd;
u16 typeReq, wValue, wIndex, wLength;
@@ -485,9 +485,9 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb 
*urb)
 
cmd = (struct usb_ctrlrequest *) urb-setup_packet;
typeReq  = (cmd-bRequestType  8) | cmd-bRequest;
-   wValue   = le16_to_cpu (cmd-wValue);
-   wIndex   = le16_to_cpu (cmd-wIndex);
-   wLength  = le16_to_cpu (cmd-wLength);
+   wValue   = le16_to_cpu(cmd-wValue);
+   wIndex   = le16_to_cpu(cmd-wIndex);
+   wLength  = le16_to_cpu(cmd-wLength);
 
if (wLength  urb-transfer_buffer_length)
goto error;
@@ -616,7 +616,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb 
*urb)
break;
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
/* wValue == urb-dev-devaddr */
-   dev_dbg (hcd-self.controller, root hub device address %d\n,
+   dev_dbg(hcd-self.controller, root hub device address %d\n,
wValue);
break;
 
@@ -632,7 +632,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb 
*urb)
/* FALLTHROUGH */
case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
case EndpointOutRequest | USB_REQ_SET_FEATURE:
-   dev_dbg (hcd-self.controller, no endpoint features yet\n);
+   dev_dbg(hcd-self.controller, no endpoint features yet\n);
break;
 
/* CLASS REQUESTS (and errors) */
@@ -646,13 +646,13 @@ nongeneric:
len = 4;
break;
case GetHubDescriptor:
-   len = sizeof (struct usb_hub_descriptor);
+   len = sizeof(struct usb_hub_descriptor);
break;
case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
/* len is returned by hub_control */
break;
}
-   status = hcd-driver-hub_control (hcd,
+   status = hcd-driver-hub_control(hcd,
typeReq, wValue, wIndex,
tbuf, wLength);
 
@@ -668,7 +668,7 @@ error:
if (status  0) {
len = 0;
if (status != -EPIPE) {
-   dev_dbg (hcd-self.controller,
+   dev_dbg(hcd-self.controller,
CTRL: TypeReq=0x%x val=0x%x 
idx=0x%x len=%d == %d\n,
typeReq, wValue, wIndex,
@@ -684,11 +684,11 @@ error:
len = urb-transfer_buffer_length;
urb-actual_length = len;
/* always USB_DIR_IN, toward host */
-   memcpy (ubuf, bufp, len);
+   memcpy(ubuf, bufp, len);
 
/* report whether RH hardware supports remote wakeup */
if (patch_wakeup 
-   len  offsetof (struct usb_config_descriptor,
+   len  offsetof(struct usb_config_descriptor,