Skip to contentSkip to conversation

usb: hub: remove redundant declarations

PATCH In review Kris Borer 2 participants 2 messages Aug 21, 2015 USB

lore
Share & tools
lore

Kris Borer

author
#0 lore raw

PATCH 1/1 usb: hub: remove redundant declarations

Fix two occurrences of the Sparse warning:

warning: symbol XXX shadows an earlier one

---
 drivers/usb/core/hub.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/core/hub.c +1 -2
index 431839b..a0db6a4 100644
@@ -1070,7 +1070,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
 		 * for HUB_POST_RESET, but it's easier not to.
 		 */
 		if (type == HUB_INIT) {
-			unsigned delay = hub_power_on_good_delay(hub);
+			delay = hub_power_on_good_delay(hub);
 
 			hub_power_on(hub, false);
 			INIT_DELAYED_WORK(&hub->init_work, hub_init_func2);
@@ -1404,7 +1404,6 @@ static int hub_configure(struct usb_hub *hub,
 	/* FIXME for USB 3.0, skip for now */
 	if ((wHubCharacteristics & HUB_CHAR_COMPOUND) &&
 			!(hub_is_superspeed(hdev))) {
-		int	i;
 		char	portstr[USB_MAXCHILDREN + 1];
 
 		for (i = 0; i < maxchild; i++)
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Kris Borer

Fix two occurrences of the Sparse warning:

warning: symbol XXX shadows an earlier one

Quoted 28 lines
---
 drivers/usb/core/hub.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/core/hub.c +1 -2
index 431839b..a0db6a4 100644
@@ -1070,7 +1070,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
 		 * for HUB_POST_RESET, but it's easier not to.
 		 */
 		if (type == HUB_INIT) {
-			unsigned delay = hub_power_on_good_delay(hub);
+			delay = hub_power_on_good_delay(hub);
 
 			hub_power_on(hub, false);
 			INIT_DELAYED_WORK(&hub->init_work, hub_init_func2);
@@ -1404,7 +1404,6 @@ static int hub_configure(struct usb_hub *hub,
 	/* FIXME for USB 3.0, skip for now */
 	if ((wHubCharacteristics & HUB_CHAR_COMPOUND) &&
 			!(hub_is_superspeed(hdev))) {
-		int	i;
 		char	portstr[USB_MAXCHILDREN + 1];
 
 		for (i = 0; i < maxchild; i++)
Signature · 1 line
1.9.1
Signature · 1 line
balbi