Patchwork [U-Boot,2/2] GCC4.6: Remove unused "port" variable in cmd_usb.c

login
register
mail settings
Submitter Marek Vasut
Date Sept. 23, 2011, 7:09 p.m.
Message ID <1316804993-29406-2-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/116169/
State Accepted
Commit 10f4dd784f7738c1207ba84b4712ac26c155be43
Headers show

Comments

Marek Vasut - Sept. 23, 2011, 7:09 p.m.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 common/cmd_usb.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Remy Bohmer - Sept. 24, 2011, 5:37 p.m.
Hi,

2011/9/23 Marek Vasut <marek.vasut@gmail.com>:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
>  common/cmd_usb.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/common/cmd_usb.c b/common/cmd_usb.c
> index cd4d417..8c87265 100644
> --- a/common/cmd_usb.c
> +++ b/common/cmd_usb.c
> @@ -281,7 +281,7 @@ static inline char *portspeed(int speed)
>  void usb_show_tree_graph(struct usb_device *dev, char *pre)
>  {
>        int i, index;
> -       int has_child, last_child, port;
> +       int has_child, last_child;
>
>        index = strlen(pre);
>        printf(" %s", pre);
> @@ -300,7 +300,6 @@ void usb_show_tree_graph(struct usb_device *dev, char *pre)
>                                /* found our pointer, see if we have a
>                                 * little sister
>                                 */
> -                               port = i;
>                                while (i++ < dev->parent->maxchild) {
>                                        if (dev->parent->children[i] != NULL) {
>                                                /* found a sister */

If it was not part of a patch-series, I would have pulled it in directly...
Acked-by: Remy Bohmer <linux@bohmer.net>

Kind regards,

Remy

Patch

diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index cd4d417..8c87265 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -281,7 +281,7 @@  static inline char *portspeed(int speed)
 void usb_show_tree_graph(struct usb_device *dev, char *pre)
 {
 	int i, index;
-	int has_child, last_child, port;
+	int has_child, last_child;
 
 	index = strlen(pre);
 	printf(" %s", pre);
@@ -300,7 +300,6 @@  void usb_show_tree_graph(struct usb_device *dev, char *pre)
 				/* found our pointer, see if we have a
 				 * little sister
 				 */
-				port = i;
 				while (i++ < dev->parent->maxchild) {
 					if (dev->parent->children[i] != NULL) {
 						/* found a sister */