lkml.org 
[lkml]   [2015]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers/usb/core: hcd.c: Added parenthesis' to sizeof
Date
Removed all warnings generated by checkpatch.pl about sizeof not having parenthesis'.

Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
---
drivers/usb/core/hcd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 557f2b8..601476c7 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -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;
@@ -578,16 +578,16 @@ static int rh_call_control(struct usb_hcd *hcd, struct urb *urb)
switch (hcd->speed) {
case HCD_USB3:
bufp = ss_rh_config_descriptor;
- len = sizeof ss_rh_config_descriptor;
+ len = sizeof(ss_rh_config_descriptor);
break;
case HCD_USB25:
case HCD_USB2:
bufp = hs_rh_config_descriptor;
- len = sizeof hs_rh_config_descriptor;
+ len = sizeof(hs_rh_config_descriptor);
break;
case HCD_USB11:
bufp = fs_rh_config_descriptor;
- len = sizeof fs_rh_config_descriptor;
+ len = sizeof(fs_rh_config_descriptor);
break;
default:
goto error;
@@ -1008,7 +1008,7 @@ static int register_root_hub(struct usb_hcd *hcd)
usb_dev->devnum = devnum;
usb_dev->bus->devnum_next = devnum + 1;
memset(&usb_dev->bus->devmap.devicemap, 0,
- sizeof usb_dev->bus->devmap.devicemap);
+ sizeof(usb_dev->bus->devmap.devicemap));
set_bit(devnum, usb_dev->bus->devmap.devicemap);
usb_set_device_state(usb_dev, USB_STATE_ADDRESS);

@@ -1016,7 +1016,7 @@ static int register_root_hub(struct usb_hcd *hcd)

usb_dev->ep0.desc.wMaxPacketSize = cpu_to_le16(64);
retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE);
- if (retval != sizeof usb_dev->descriptor) {
+ if (retval != sizeof(usb_dev->descriptor)) {
mutex_unlock(&usb_bus_list_lock);
dev_dbg(parent_dev, "can't read %s device descriptor %d\n",
dev_name(&usb_dev->dev), retval);
--
1.9.1


\
 
 \ /
  Last update: 2015-04-11 13:21    [W:2.081 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site