[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE1909015F8DF9@mi8nycmail19.Mi8.com>
Date: Wed, 15 Apr 2009 21:44:44 -0400
From: "H Hartley Sweeten" <hartleys@...ionengravers.com>
To: <linux-kernel@...r.kernel.org>
Subject: [PATCH] usb/core/hub.c: fix sparse warnings
Fix sparse warning in drivers/usb/core/hub.c.
warning: symbol 'temp' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
---
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index be86ae3..8ab98c9 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -457,13 +457,13 @@ static void hub_tt_kevent (struct work_struct
*work)
spin_lock_irqsave (&hub->tt.lock, flags);
while (--limit && !list_empty (&hub->tt.clear_list)) {
- struct list_head *temp;
+ struct list_head *next;
struct usb_tt_clear *clear;
struct usb_device *hdev = hub->hdev;
int status;
- temp = hub->tt.clear_list.next;
- clear = list_entry (temp, struct usb_tt_clear,
clear_list);
+ next = hub->tt.clear_list.next;
+ clear = list_entry (next, struct usb_tt_clear,
clear_list);
list_del (&clear->clear_list);
/* drop lock so HCD can concurrently report other TT
errors */
@@ -518,7 +518,7 @@ void usb_hub_tt_clear_buffer (struct usb_device
*udev, int pipe)
: (USB_ENDPOINT_XFER_BULK << 11);
if (usb_pipein (pipe))
clear->devinfo |= 1 << 15;
-
+
/* tell keventd to clear state for this TT */
spin_lock_irqsave (&tt->lock, flags);
list_add_tail (&clear->clear_list, &tt->clear_list);
@@ -571,7 +571,7 @@ static int hub_hub_status(struct usb_hub *hub,
"%s failed (err = %d)\n", __func__, ret);
else {
*status = le16_to_cpu(hub->status->hub.wHubStatus);
- *change = le16_to_cpu(hub->status->hub.wHubChange);
+ *change = le16_to_cpu(hub->status->hub.wHubChange);
ret = 0;
}
mutex_unlock(&hub->status_mutex);
@@ -2330,7 +2330,7 @@ static inline int remote_wakeup(struct usb_device
*udev)
* Between connect detection and reset signaling there must be a delay
* of 100ms at least for debounce and power-settling. The
corresponding
* timer shall restart whenever the downstream port detects a
disconnect.
- *
+ *
* Apparently there are some bluetooth and irda-dongles and a number of
* low-speed devices for which this debounce period may last over a
second.
* Not covered by the spec - but easy to deal with.
@@ -2490,7 +2490,7 @@ hub_port_init (struct usb_hub *hub, struct
usb_device *udev, int port1,
default:
goto fail;
}
-
+
type = "";
switch (udev->speed) {
case USB_SPEED_LOW: speed = "low"; break;
@@ -2516,7 +2516,7 @@ hub_port_init (struct usb_hub *hub, struct
usb_device *udev, int port1,
udev->tt = &hub->tt;
udev->ttport = port1;
}
-
+
/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
* Because device hardware and firmware is sometimes buggy in
* this area, and this is how Linux has done it for ages.
@@ -2647,7 +2647,7 @@ hub_port_init (struct usb_hub *hub, struct
usb_device *udev, int port1,
udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i);
usb_ep0_reinit(udev);
}
-
+
retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE);
if (retval < (signed)sizeof(udev->descriptor)) {
dev_err(&udev->dev, "device descriptor read/all, error
%d\n",
@@ -2894,7 +2894,7 @@ static void hub_port_connect_change(struct usb_hub
*hub, int port1,
goto loop_disable;
}
}
-
+
/* check for devices running slower than they could */
if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200
&& udev->speed == USB_SPEED_FULL
@@ -2951,7 +2951,7 @@ loop:
!(hcd->driver->port_handed_over)(hcd, port1))
dev_err(hub_dev, "unable to enumerate USB device on port
%d\n",
port1);
-
+
done:
hub_port_disable(hub, port1, 1);
if (hcd->driver->relinquish_port && !hub->hdev->parent)
@@ -3077,7 +3077,7 @@ static void hub_events(void)
* EM interference sometimes causes
badly
* shielded USB devices to be shutdown
by
* the hub, this hack enables them
again.
- * Works at least with mouse driver.
+ * Works at least with mouse driver.
*/
if (!(portstatus & USB_PORT_STAT_ENABLE)
&& !connect_change
@@ -3112,7 +3112,7 @@ static void hub_events(void)
"resume on port %d, status
%d\n",
i, ret);
}
-
+
if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
dev_err (hub_dev,
"over-current change on port
%d\n",
@@ -3386,7 +3386,7 @@ static int usb_reset_and_verify_device(struct
usb_device *udev)
if (ret < 0)
goto re_enumerate;
-
+
/* Device might have changed firmware (DFU or similar) */
if (descriptors_changed(udev, &descriptor)) {
dev_info(&udev->dev, "device firmware changed\n");
@@ -3440,7 +3440,7 @@ static int usb_reset_and_verify_device(struct
usb_device *udev)
done:
return 0;
-
+
re_enumerate:
hub_port_logical_disconnect(parent_hub, port1);
return -ENODEV;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists