lkml.org 
[lkml]   [2014]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments
On Wed, 17 Sep 2014, Petr Mladek wrote:

> USB hub has started to use a workqueue instead of kthread. Let's update
> the documentation and comments here and there.
>
> This patch mostly just replaces "khubd" with "hub_wq". There are only few
> exceptions where the whole sentence was updated. These more complicated
> changes can be found in the following files:
>
> Documentation/usb/hotplug.txt
> drivers/net/usb/usbnet.c
> drivers/usb/core/hcd.c
> drivers/usb/host/ohci-hcd.c
> drivers/usb/host/xhci.c

Okay, here's a real issue.

> @@ -2042,7 +2042,7 @@ static void choose_devnum(struct usb_device *udev)
> int devnum;
> struct usb_bus *bus = udev->bus;
>
> - /* If khubd ever becomes multithreaded, this will need a lock */
> + /* If hub_wq ever becomes multithreaded, this will need a lock */
> if (udev->wusb) {
> devnum = udev->portnum + 1;
> BUG_ON(test_bit(devnum, bus->devmap.devicemap));

You probably didn't notice when changing this comment. But in fact,
workqueues _are_ multithreaded. Therefore you need to add a lock to
this routine.

Still, apart from these relatively minor issues, the series looks good.

Alan Stern



\
 
 \ /
  Last update: 2014-09-17 20:01    [W:0.110 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site