Skip to contentSkip to conversation

USB: EHCI: Cleanup and rewrite ehci_vdgb().

PATCH New David Daney 1 participant 1 message Jan 25, 2011

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

PATCH 2/4 USB: EHCI: Cleanup and rewrite ehci_vdgb().

The vdbg macro is not used anywhere so it can be removed.

With pre-release GCC-4.6, there are several complaints of variables that are 'set but not used' caused by the ehci_vdbg() macro expanding to something that does not contain any of its arguments. We can quiet this warning by rewriting ehci_vdbg() as a variadic static inline that does nothing.

---
 drivers/usb/host/ehci-dbg.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/usb/host/ehci-dbg.c +1 -3
index 3be238a..693c29b 100644
@@ -28,11 +28,9 @@
 	dev_warn (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
 
 #ifdef VERBOSE_DEBUG
-#	define vdbg dbg
 #	define ehci_vdbg ehci_dbg
 #else
-#	define vdbg(fmt,args...) do { } while (0)
-#	define ehci_vdbg(ehci, fmt, args...) do { } while (0)
+	static inline void ehci_vdbg(struct ehci_hcd *ehci, ...) {}
 #endif
 
 #ifdef	DEBUG
Signature · 1 line
1.7.2.3