* [PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl
@ 2015-08-15 4:41 Chase Metzger
2015-08-15 5:10 ` Lars Melin
0 siblings, 1 reply; 4+ messages in thread
From: Chase Metzger @ 2015-08-15 4:41 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern, Petr Mladek, Peter Chen,
Felipe Balbi, Chase Metzger, Matthew Garrett, Robert Schlabbach,
Zhuang Jin Can, linux-usb, linux-kernel
Removed some checkpatch.pl warnings saying there was an unwanted space between
function names and their arguments.
Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
---
drivers/usb/core/hub.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 38cb6d3..b9cab51 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4218,7 +4218,7 @@ static int hub_enable_device(struct usb_device *udev)
* but it is still necessary to lock the port.
*/
static int
-hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
+hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
int retry_counter)
{
struct usb_device *hdev = hub->hdev;
@@ -4522,7 +4522,7 @@ fail:
}
static void
-check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
+check_highspeed(struct usb_hub *hub, struct usb_device *udev, int port1)
{
struct usb_qualifier_descriptor *qual;
int status;
@@ -4530,11 +4530,11 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
if (udev->quirks & USB_QUIRK_DEVICE_QUALIFIER)
return;
- qual = kmalloc (sizeof *qual, GFP_KERNEL);
+ qual = kmalloc(sizeof *qual, GFP_KERNEL);
if (qual == NULL)
return;
- status = usb_get_descriptor (udev, USB_DT_DEVICE_QUALIFIER, 0,
+ status = usb_get_descriptor udev, USB_DT_DEVICE_QUALIFIER, 0,
qual, sizeof *qual);
if (status == sizeof *qual) {
dev_info(&udev->dev, "not running at top speed; "
@@ -4550,7 +4550,7 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
}
static unsigned
-hub_power_remaining (struct usb_hub *hub)
+hub_power_remaining(struct usb_hub *hub)
{
struct usb_device *hdev = hub->hdev;
int remaining;
@@ -4737,7 +4737,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200
&& udev->speed == USB_SPEED_FULL
&& highspeed_hubs != 0)
- check_highspeed (hub, udev, port1);
+ check_highspeed(hub, udev, port1);
/* Store the parent's children[] pointer. At this point
* udev becomes globally accessible, although presumably
@@ -5111,7 +5111,7 @@ static const struct usb_device_id hub_id_table[] = {
{ } /* Terminating entry */
};
-MODULE_DEVICE_TABLE (usb, hub_id_table);
+MODULE_DEVICE_TABLE(usb, hub_id_table);
static struct usb_driver hub_driver = {
.name = "hub",
@@ -5223,7 +5223,7 @@ static int descriptors_changed(struct usb_device *udev,
changed = 1;
break;
}
- if (memcmp (buf, udev->rawdescriptors[index], old_length)
+ if (memcmp(buf, udev->rawdescriptors[index], old_length)
!= 0) {
dev_dbg(&udev->dev, "config index %d changed (#%d)\n",
index,
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl
2015-08-15 4:41 [PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl Chase Metzger
@ 2015-08-15 5:10 ` Lars Melin
0 siblings, 0 replies; 4+ messages in thread
From: Lars Melin @ 2015-08-15 5:10 UTC (permalink / raw)
To: Chase Metzger, Greg Kroah-Hartman, Alan Stern, Petr Mladek,
Peter Chen, Felipe Balbi, Matthew Garrett, Robert Schlabbach,
Zhuang Jin Can, linux-usb, linux-kernel
On 2015-08-15 11:41, Chase Metzger wrote:
> Removed some checkpatch.pl warnings saying there was an unwanted space between
> function names and their arguments.
>
> Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
> ---
> drivers/usb/core/hub.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 38cb6d3..b9cab51 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -4218,7 +4218,7 @@ static int hub_enable_device(struct usb_device *udev)
> * but it is still necessary to lock the port.
> */
> static int
> -hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
> +hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
> int retry_counter)
> {
> struct usb_device *hdev = hub->hdev;
> @@ -4522,7 +4522,7 @@ fail:
> }
>
> static void
> -check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
> +check_highspeed(struct usb_hub *hub, struct usb_device *udev, int port1)
> {
> struct usb_qualifier_descriptor *qual;
> int status;
> @@ -4530,11 +4530,11 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
> if (udev->quirks & USB_QUIRK_DEVICE_QUALIFIER)
> return;
>
> - qual = kmalloc (sizeof *qual, GFP_KERNEL);
> + qual = kmalloc(sizeof *qual, GFP_KERNEL);
> if (qual == NULL)
> return;
>
> - status = usb_get_descriptor (udev, USB_DT_DEVICE_QUALIFIER, 0,
> + status = usb_get_descriptor udev, USB_DT_DEVICE_QUALIFIER, 0,
> qual, sizeof *qual);
If you had test compiled you would have got an unbalanced parenthesis
error here. So you didn't test your patch..
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl
@ 2015-08-19 3:36 Chase Metzger
0 siblings, 0 replies; 4+ messages in thread
From: Chase Metzger @ 2015-08-19 3:36 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern, Petr Mladek, Peter Chen,
Felipe Balbi, Chase Metzger, Lu Baolu, Robert Schlabbach,
Matthew Garrett, Zhuang Jin Can, linux-usb, linux-kernel
Removed some checkpatch.pl warnings saying there was an unwanted space
between function names and their arguments.
Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
---
drivers/usb/core/hub.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 431839b..169e3d8 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4222,7 +4222,7 @@ static int hub_enable_device(struct usb_device *udev)
* but it is still necessary to lock the port.
*/
static int
-hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
+hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
int retry_counter)
{
struct usb_device *hdev = hub->hdev;
@@ -4526,7 +4526,7 @@ fail:
}
static void
-check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
+check_highspeed(struct usb_hub *hub, struct usb_device *udev, int port1)
{
struct usb_qualifier_descriptor *qual;
int status;
@@ -4534,11 +4534,11 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
if (udev->quirks & USB_QUIRK_DEVICE_QUALIFIER)
return;
- qual = kmalloc (sizeof *qual, GFP_KERNEL);
+ qual = kmalloc(sizeof *qual, GFP_KERNEL);
if (qual == NULL)
return;
- status = usb_get_descriptor (udev, USB_DT_DEVICE_QUALIFIER, 0,
+ status = usb_get_descriptor(udev, USB_DT_DEVICE_QUALIFIER, 0,
qual, sizeof *qual);
if (status == sizeof *qual) {
dev_info(&udev->dev, "not running at top speed; "
@@ -4554,7 +4554,7 @@ check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
}
static unsigned
-hub_power_remaining (struct usb_hub *hub)
+hub_power_remaining(struct usb_hub *hub)
{
struct usb_device *hdev = hub->hdev;
int remaining;
@@ -4741,7 +4741,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200
&& udev->speed == USB_SPEED_FULL
&& highspeed_hubs != 0)
- check_highspeed (hub, udev, port1);
+ check_highspeed(hub, udev, port1);
/* Store the parent's children[] pointer. At this point
* udev becomes globally accessible, although presumably
@@ -5115,7 +5115,7 @@ static const struct usb_device_id hub_id_table[] = {
{ } /* Terminating entry */
};
-MODULE_DEVICE_TABLE (usb, hub_id_table);
+MODULE_DEVICE_TABLE(usb, hub_id_table);
static struct usb_driver hub_driver = {
.name = "hub",
@@ -5227,7 +5227,7 @@ static int descriptors_changed(struct usb_device *udev,
changed = 1;
break;
}
- if (memcmp (buf, udev->rawdescriptors[index], old_length)
+ if (memcmp(buf, udev->rawdescriptors[index], old_length)
!= 0) {
dev_dbg(&udev->dev, "config index %d changed (#%d)\n",
index,
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl
@ 2015-08-12 4:34 Chase Metzger
0 siblings, 0 replies; 4+ messages in thread
From: Chase Metzger @ 2015-08-12 4:34 UTC (permalink / raw)
To: gregkh
Cc: stern, linux-usb, linux-kernel, baolu.lu, pmladek, jin.can.zhuang,
peter.chen, Chase Metzger
Removed some checkpatch.pl warnings saying there was an unwanted space between
function names and their arguments.
Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
---
drivers/usb/core/hub.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 9387cc20..38cb6d3 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1442,8 +1442,8 @@ static int hub_configure(struct usb_hub *hub,
break;
}
- spin_lock_init (&hub->tt.lock);
- INIT_LIST_HEAD (&hub->tt.clear_list);
+ spin_lock_init(&hub->tt.lock);
+ INIT_LIST_HEAD(&hub->tt.clear_list);
INIT_WORK(&hub->tt.clear_work, hub_tt_work);
switch (hdev->descriptor.bDeviceProtocol) {
case USB_HUB_PR_FS:
@@ -1632,7 +1632,7 @@ static int hub_configure(struct usb_hub *hub,
return 0;
fail:
- dev_err (hub_dev, "config failed, %s (err %d)\n",
+ dev_err(hub_dev, "config failed, %s (err %d)\n",
message, ret);
/* hub_disconnect() frees urb and descriptor */
return ret;
@@ -1775,7 +1775,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
if ((desc->desc.bInterfaceSubClass != 0) &&
(desc->desc.bInterfaceSubClass != 1)) {
descriptor_error:
- dev_err (&intf->dev, "bad descriptor, ignoring hub\n");
+ dev_err(&intf->dev, "bad descriptor, ignoring hub\n");
return -EIO;
}
@@ -1790,11 +1790,11 @@ descriptor_error:
goto descriptor_error;
/* We found a hub */
- dev_info (&intf->dev, "USB hub found\n");
+ dev_info(&intf->dev, "USB hub found\n");
hub = kzalloc(sizeof(*hub), GFP_KERNEL);
if (!hub) {
- dev_dbg (&intf->dev, "couldn't kmalloc hub struct\n");
+ dev_dbg(&intf->dev, "couldn't kmalloc hub struct\n");
return -ENOMEM;
}
@@ -1807,7 +1807,7 @@ descriptor_error:
usb_get_intf(intf);
usb_get_dev(hdev);
- usb_set_intfdata (intf, hub);
+ usb_set_intfdata(intf, hub);
intf->needs_remote_wakeup = 1;
pm_suspend_ignore_children(&intf->dev, true);
@@ -1820,14 +1820,14 @@ descriptor_error:
if (hub_configure(hub, endpoint) >= 0)
return 0;
- hub_disconnect (intf);
+ hub_disconnect(intf);
return -ENODEV;
}
static int
hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data)
{
- struct usb_device *hdev = interface_to_usbdev (intf);
+ struct usb_device *hdev = interface_to_usbdev(intf);
struct usb_hub *hub = usb_hub_to_struct_hub(hdev);
/* assert ifno == 0 (part of hub spec) */
@@ -2143,7 +2143,7 @@ void usb_disconnect(struct usb_device **pdev)
* cleaning up all state associated with the current configuration
* so that the hardware is now fully quiesced.
*/
- dev_dbg (&udev->dev, "unregistering device\n");
+ dev_dbg(&udev->dev, "unregistering device\n");
usb_disable_device(udev, 0);
usb_hcd_synchronize_unlinks(udev);
@@ -2242,7 +2242,7 @@ static int usb_enumerate_device_otg(struct usb_device *udev)
struct usb_bus *bus = udev->bus;
/* descriptor may appear anywhere in config */
- if (__usb_get_extra_descriptor (udev->rawdescriptors[0],
+ if (__usb_get_extra_descriptor(udev->rawdescriptors[0],
le16_to_cpu(udev->config[0].desc.wTotalLength),
USB_DT_OTG, (void **) &desc) == 0) {
if (desc->bmAttributes & USB_OTG_HNP) {
@@ -3526,7 +3526,7 @@ static int check_ports_changed(struct usb_hub *hub)
static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
{
- struct usb_hub *hub = usb_get_intfdata (intf);
+ struct usb_hub *hub = usb_get_intfdata(intf);
struct usb_device *hdev = hub->hdev;
unsigned port1;
int status;
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-19 3:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-15 4:41 [PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl Chase Metzger
2015-08-15 5:10 ` Lars Melin
-- strict thread matches above, loose matches on Subject: below --
2015-08-19 3:36 Chase Metzger
2015-08-12 4:34 Chase Metzger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox