public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] USB: get rid of warning when compile with debug enabled
@ 2014-08-25  9:23 Bo Shen
  2014-08-25 10:43 ` Marek Vasut
  0 siblings, 1 reply; 12+ messages in thread
From: Bo Shen @ 2014-08-25  9:23 UTC (permalink / raw)
  To: u-boot

When compile with debug information is enabled, if call
spin_lock_irqsave, it will give following warning information.
This patch is used to get rid of it.
--->8---
warning: 'flags' is used uninitialized in this function [-Wuninitialized]
---8<---

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---

 include/usb/lin_gadget_compat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/usb/lin_gadget_compat.h b/include/usb/lin_gadget_compat.h
index a25e9d9..fb525e7 100644
--- a/include/usb/lin_gadget_compat.h
+++ b/include/usb/lin_gadget_compat.h
@@ -15,7 +15,7 @@
 /* common */
 #define spin_lock_init(...)
 #define spin_lock(...)
-#define spin_lock_irqsave(lock, flags) do { debug("%lu\n", flags); } while (0)
+#define spin_lock_irqsave(lock, flags) do { flags = 1; debug("%lu\n", flags); } while (0)
 #define spin_unlock(...)
 #define spin_unlock_irqrestore(lock, flags) do {flags = 0; } while (0)
 #define disable_irq(...)
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-28 15:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25  9:23 [U-Boot] [RFC PATCH] USB: get rid of warning when compile with debug enabled Bo Shen
2014-08-25 10:43 ` Marek Vasut
2014-08-26  1:11   ` Bo Shen
2014-08-26  6:46     ` Marek Vasut
2014-08-27  7:39       ` Bo Shen
2014-08-27 17:45         ` Marek Vasut
2014-08-27 19:48           ` Tom Rini
2014-08-27 20:24             ` Marek Vasut
2014-08-27 21:20               ` Tom Rini
2014-08-27 21:36                 ` Marek Vasut
2014-08-28  5:48                   ` Bo Shen
2014-08-28 15:18                   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox