* [PATCH] usb: hub: remove redundant declarations
@ 2015-08-21 14:26 Kris Borer
2015-08-21 14:39 ` Felipe Balbi
0 siblings, 1 reply; 2+ messages in thread
From: Kris Borer @ 2015-08-21 14:26 UTC (permalink / raw)
To: gregkh
Cc: stern, pmladek, peter.chen, balbi, mjg59, chasemetzger15,
Robert.Schlabbach, jin.can.zhuang, linux-usb, linux-kernel,
Kris Borer
Fix two occurrences of the Sparse warning:
warning: symbol XXX shadows an earlier one
Signed-off-by: Kris Borer <kborer@gmail.com>
---
drivers/usb/core/hub.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 431839b..a0db6a4 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -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++)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: hub: remove redundant declarations
2015-08-21 14:26 [PATCH] usb: hub: remove redundant declarations Kris Borer
@ 2015-08-21 14:39 ` Felipe Balbi
0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2015-08-21 14:39 UTC (permalink / raw)
To: Kris Borer
Cc: gregkh, stern, pmladek, peter.chen, balbi, mjg59, chasemetzger15,
Robert.Schlabbach, jin.can.zhuang, linux-usb, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
On Fri, Aug 21, 2015 at 10:26:00AM -0400, Kris Borer wrote:
> Fix two occurrences of the Sparse warning:
>
> warning: symbol XXX shadows an earlier one
>
> Signed-off-by: Kris Borer <kborer@gmail.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/usb/core/hub.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 431839b..a0db6a4 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -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++)
> --
> 1.9.1
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-21 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21 14:26 [PATCH] usb: hub: remove redundant declarations Kris Borer
2015-08-21 14:39 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox