[U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
Wolfgang Denk
wd at denx.de
Wed Nov 30 09:17:51 CET 2011
Fix:
sl811-hcd.c: In function 'sl811_rh_submit_urb':
sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd at denx.de>
Cc: Remy Bohmer <linux at bohmer.net>
---
WARNING: space prohibited between function name and open parenthesis '('
#31: FILE: drivers/usb/host/sl811-hcd.c:554:
+ __u16 wValue = le16_to_cpu (cmd->value);
WARNING: space prohibited between function name and open parenthesis '('
#32: FILE: drivers/usb/host/sl811-hcd.c:555:
+ __u16 wLength = le16_to_cpu (cmd->length);
WARNING: space prohibited between function name and open parenthesis '('
#34: FILE: drivers/usb/host/sl811-hcd.c:557:
+ __u16 wIndex = le16_to_cpu (cmd->index);
total: 0 errors, 3 warnings, 25 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored. No further cleanup attempted.
drivers/usb/host/sl811-hcd.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index c713d42..bb27dd5 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -550,11 +550,12 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
__u8 *bufp = data_buf;
int len = 0;
int status = 0;
-
__u16 bmRType_bReq;
- __u16 wValue;
- __u16 wIndex;
- __u16 wLength;
+ __u16 wValue = le16_to_cpu (cmd->value);
+ __u16 wLength = le16_to_cpu (cmd->length);
+#ifdef SL811_DEBUG
+ __u16 wIndex = le16_to_cpu (cmd->index);
+#endif
if (usb_pipeint(pipe)) {
PDEBUG(0, "interrupt transfer unimplemented!\n");
@@ -562,9 +563,6 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
}
bmRType_bReq = cmd->requesttype | (cmd->request << 8);
- wValue = le16_to_cpu (cmd->value);
- wIndex = le16_to_cpu (cmd->index);
- wLength = le16_to_cpu (cmd->length);
PDEBUG(5, "submit rh urb, req = %d(%x) val = %#x index = %#x len=%d\n",
bmRType_bReq, bmRType_bReq, wValue, wIndex, wLength);
--
1.7.6.4
More information about the U-Boot
mailing list