Patchwork [U-Boot,01/10] drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date Nov. 19, 2011, 11:12 p.m.
Message ID <1321744338-13207-2-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/126624/
State Accepted
Commit 94191960cbddb58e425c7b9608700ed59a881d60
Headers show

Comments

Anatolij Gustschin - Nov. 19, 2011, 11:12 p.m.
Fix:
musb_hcd.c: In function 'submit_control_msg':
musb_hcd.c:851:6: warning: variable 'csr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/usb/musb/musb_hcd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Heiko Schocher - Nov. 23, 2011, 7:18 a.m.
Hello Anatolij,

Anatolij Gustschin wrote:
> Fix:
> musb_hcd.c: In function 'submit_control_msg':
> musb_hcd.c:851:6: warning: variable 'csr' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/usb/musb/musb_hcd.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Applied to u-boot-staging hs@denx.de

Thanks!

bye,
Heiko

Patch

diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 974bb31..325edb9 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -848,7 +848,6 @@  int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 			int len, struct devrequest *setup)
 {
 	int devnum = usb_pipedevice(pipe);
-	u16 csr;
 	u8  devspeed;
 
 #ifdef MUSB_NO_MULTIPOINT
@@ -862,7 +861,7 @@  int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 
 	/* select control endpoint */
 	writeb(MUSB_CONTROL_EP, &musbr->index);
-	csr = readw(&musbr->txcsr);
+	readw(&musbr->txcsr);
 
 #ifndef MUSB_NO_MULTIPOINT
 	/* target addr and (for multipoint) hub addr/port */