diff mbox

[U-Boot,5/9] drivers/usb/gadget/core.c: Fix GCC 4.6 warning

Message ID 1322930775-4767-5-git-send-email-agust@denx.de
State Accepted
Delegated to: Remy Bohmer
Headers show

Commit Message

Anatolij Gustschin Dec. 3, 2011, 4:46 p.m. UTC
Fix:
core.c: In function 'usbd_device_event_irq':
core.c:596:21: warning: variable 'state' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
---
 drivers/usb/gadget/core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Remy Bohmer Dec. 4, 2011, 11:06 a.m. UTC | #1
Hi,

2011/12/3 Anatolij Gustschin <agust@denx.de>:
> Fix:
> core.c: In function 'usbd_device_event_irq':
> core.c:596:21: warning: variable 'state' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> ---
>  drivers/usb/gadget/core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Since it is part of a series with non-USB related changes:
Acked-by: Remy Bohmer <linux@bohmer.net>

Kind regards,

Remy
Marek Vasut Dec. 4, 2011, 11:27 a.m. UTC | #2
> Fix:
> core.c: In function 'usbd_device_event_irq':
> core.c:596:21: warning: variable 'state' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> ---
>  drivers/usb/gadget/core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
> index 67b6681..4f2ebab 100644
> --- a/drivers/usb/gadget/core.c
> +++ b/drivers/usb/gadget/core.c
> @@ -671,9 +671,9 @@ void usbd_device_event_irq (struct usb_device_instance
> *device, usb_device_event usbdbg("event %d - not handled",event);
>  		break;
>  	}
> -	/*usbdbg("%s event: %d oldstate: %d newstate: %d status: %d address: 
%d",
> +	debug("%s event: %d oldstate: %d newstate: %d status: %d address: %d",
>  		device->name, event, state,
> -		device->device_state, device->status, device->address); */
> +		device->device_state, device->status, device->address);
> 
>  	/* tell the bus interface driver */
>  	if( device->event ) {

Acked-by: Marek Vasut <marek.vasut@gmail.com>
Wolfgang Denk Dec. 9, 2011, 9:37 a.m. UTC | #3
Dear Anatolij Gustschin,

In message <1322930775-4767-5-git-send-email-agust@denx.de> you wrote:
> Fix:
> core.c: In function 'usbd_device_event_irq':
> core.c:596:21: warning: variable 'state' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> ---
>  drivers/usb/gadget/core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
index 67b6681..4f2ebab 100644
--- a/drivers/usb/gadget/core.c
+++ b/drivers/usb/gadget/core.c
@@ -671,9 +671,9 @@  void usbd_device_event_irq (struct usb_device_instance *device, usb_device_event
 		usbdbg("event %d - not handled",event);
 		break;
 	}
-	/*usbdbg("%s event: %d oldstate: %d newstate: %d status: %d address: %d",
+	debug("%s event: %d oldstate: %d newstate: %d status: %d address: %d",
 		device->name, event, state,
-		device->device_state, device->status, device->address); */
+		device->device_state, device->status, device->address);
 
 	/* tell the bus interface driver */
 	if( device->event ) {