Skip to contentSkip to conversation

linux-next: build warning after merge of the usb tree

PATCH New Stephen Rothwell 3 participants 3 messages Sep 11, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

After merging the usb tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:

drivers/usb/core/hcd.c: In function '__usb_hcd_giveback_urb':
drivers/usb/core/hcd.c:1741:16: warning: unused variable 'flags' [-Wunused-variable]

  unsigned long flags;
                ^~~~~

Introduced by commit

ed194d136769 ("usb: core: remove local_irq_save() around ->complete() handler")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

PATCH 1/1 usb: core: remove flags variable in __usb_hcd_giveback_urb()

In commit ed194d1367698 ("usb: core: remove local_irq_save() around ->complete() handler") I removed the only user of the flags variable and forgot to remove the variable, leading to warning because it is unused now.
Remove the unused variable.

Fixes ed194d1367698 ("usb: core: remove local_irq_save() around
       ->complete() handler")
---
 drivers/usb/core/hcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/core/hcd.c +0 -1
index f985d2303095c..487025d31d44c 100644
@@ -1738,7 +1738,6 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
 	struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus);
 	struct usb_anchor *anchor = urb->anchor;
 	int status = urb->unlinked;
-	unsigned long flags;
 
 	urb->hcpriv = NULL;
 	if (unlikely((urb->transfer_flags & URB_SHORT_NOT_OK) &&
Signature · 1 line
2.19.0.rc2
#2 lore raw
In reply to Stephen Rothwell
Quoted 5 lines · Stephen Rothwell

Hi Greg,

After merging the usb tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:

Quoted 8 lines

drivers/usb/core/hcd.c: In function '__usb_hcd_giveback_urb':
drivers/usb/core/hcd.c:1741:16: warning: unused variable 'flags' [-Wunused-variable]

  unsigned long flags;
                ^~~~~

Introduced by commit

ed194d136769 ("usb: core: remove local_irq_save() around ->complete() handler")

Ugh, sorry I missed this :(