linux/compat.h: Remove debug() from spin_lock_irqsave()
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
It seems nobody tested the debug() option in spin_lock_irqsave(). Currently, when #define DEBUG, it spoils the compiler with
In file included from drivers/usb/dwc3/gadget.c:18:drivers/usb/dwc3/gadget.c: In function ?dwc3_gadget_set_selfpowered?:include/log.h:235:4: warning: ?flags? is used uninitialized in this function [-Wuninitialized]
235 | printf(pr_fmt(fmt), ##args); \
| ^~~~~~
drivers/usb/dwc3/gadget.c:1347:17: note: ?flags? was declared here
1347 | unsigned long flags;
| ^~~~~and so on...
Drop useless debug() call to make compiler happy.
--- include/linux/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/compat.h +1 -1
@@ -248,7 +248,7 @@ typedef int wait_queue_head_t;#define spin_lock_init (lock) do {} while (0)#define spin_lock (lock) do {} while (0)#define spin_unlock (lock) do {} while (0) -#define spin_lock_irqsave (lock, flags) do { debug("%lu\n", flags); } while (0) +#define spin_lock_irqsave (lock, flags) do {} while (0)#define spin_unlock_irqrestore (lock, flags) do { flags = 0; } while (0)#define DEFINE_MUTEX (...)
Signature · 1 line
2.29.2
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
Update Tom's address
Quoted 40 lines · Andy Shevchenko
It seems nobody tested the
debug()option inspin_lock_irqsave(). Currently, when #define DEBUG, it spoils the compiler withIn file included from
drivers/usb/dwc3/gadget.c:18:drivers/usb/dwc3/gadget.c: In function ?dwc3_gadget_set_selfpowered?:include/log.h:235:4: warning: ?flags? is used uninitialized in this function [-Wuninitialized]235 | printf(pr_fmt(fmt), ##args); \ | ^~~~~~ drivers/usb/dwc3/gadget.c:1347:17: note: ?flags? was declared here 1347 | unsigned long flags; | ^~~~~and so on...
Drop uselessdebug()call to make compiler happy.Fixes 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")Cc Heiko Schocher <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- include/linux/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/compat.h +1
-2@@ -248,7 +248,7 @@ typedef int wait_queue_head_t;#define spin_lock_init (lock) do {} while (0)#define spin_lock (lock) do {} while (0)#define spin_unlock (lock) do {} while (0) -#define spin_lock_irqsave (lock, flags) do { debug("%lu\n", flags); } while (0) +#define spin_lock_irqsave (lock, flags) do {} while (0)#define spin_unlock_irqrestore (lock, flags) do { flags = 0; } while (0)#define DEFINE_MUTEX (...) --2.29.2
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
Hi, Andy
Quoted 23 lines · Andy Shevchenko
Update Tom's address
Quoted 19 lines · Andy Shevchenko
It seems nobody tested the
debug()option inspin_lock_irqsave(). Currently, when #define DEBUG, it spoils the compiler withIn file included from
drivers/usb/dwc3/gadget.c:18:drivers/usb/dwc3/gadget.c: In function ?dwc3_gadget_set_selfpowered?:include/log.h:235:4: warning: ?flags? is used uninitialized in this function [-Wuninitialized]235 | printf(pr_fmt(fmt), ##args); \ | ^~~~~~ drivers/usb/dwc3/gadget.c:1347:17: note: ?flags? was declared here 1347 | unsigned long flags; | ^~~~~and so on...
Drop uselessdebug()call to make compiler happy.Fixes 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")Cc Heiko Schocher <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Quoted 21 lines
Quoted 20 lines
--- include/linux/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/compat.h +1
-2@@ -248,7 +248,7 @@ typedef int wait_queue_head_t;#define spin_lock_init (lock) do {} while (0)#define spin_lock (lock) do {} while (0)#define spin_unlock (lock) do {} while (0) -#define spin_lock_irqsave (lock, flags) do { debug("%lu\n", flags); } while (0) +#define spin_lock_irqsave (lock, flags) do {} while (0)#define spin_unlock_irqrestore (lock, flags) do { flags = 0; } while (0)#define DEFINE_MUTEX (...) --2.29.2
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
In reply to Andy ShevchenkoHello Andy,
Am 19.11.20 um 21:21 schrieb Andy Shevchenko:
Quoted 27 lines
Update Tom's address
Quoted 23 lines · Andy Shevchenko
It seems nobody tested the
debug()option inspin_lock_irqsave(). Currently, when #define DEBUG, it spoils the compiler withIn file included from
drivers/usb/dwc3/gadget.c:18:drivers/usb/dwc3/gadget.c: In function ?dwc3_gadget_set_selfpowered?:include/log.h:235:4: warning: ?flags? is used uninitialized in this function [-Wuninitialized]235 | printf(pr_fmt(fmt), ##args); \ | ^~~~~~ drivers/usb/dwc3/gadget.c:1347:17: note: ?flags? was declared here 1347 | unsigned long flags; | ^~~~~and so on...
Drop uselessdebug()call to make compiler happy.Fixes 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")Cc Heiko Schocher <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- include/linux/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
In reply to Andy ShevchenkoQuoted 1 line · Andy Shevchenko
Update Tom's address
Tom, should I resend with your address fixed?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
Quoted 4 lines · Andy Shevchenko
Quoted 1 line · Andy Shevchenko
Update Tom's address
Tom, should I resend with your address fixed?
No, I grab things from patchwork. This is on my TODO list, btw.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201202/f83de589/attachment.sig>
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
Quoted 7 lines · Tom Rini
Quoted 4 lines · Andy Shevchenko
Quoted 1 line · Andy Shevchenko
Update Tom's address
Tom, should I resend with your address fixed?
No, I grab things from patchwork. This is on my TODO list, btw.
Cool, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 linux/compat.h: Remove debug() from spin_lock_irqsave()
In reply to Andy ShevchenkoQuoted 15 lines · Andy Shevchenko
It seems nobody tested the
debug()option inspin_lock_irqsave(). Currently, when #define DEBUG, it spoils the compiler withIn file included from
drivers/usb/dwc3/gadget.c:18:drivers/usb/dwc3/gadget.c: In function ?dwc3_gadget_set_selfpowered?:include/log.h:235:4: warning: ?flags? is used uninitialized in this function [-Wuninitialized]235 | printf(pr_fmt(fmt), ##args); \ | ^~~~~~ drivers/usb/dwc3/gadget.c:1347:17: note: ?flags? was declared here 1347 | unsigned long flags; | ^~~~~and so on...
Drop uselessdebug()call to make compiler happy.
Quoted 6 lines
Fixes 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")Cc Heiko Schocher <[email protected]>Cc Tom Rini <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Oleksandr Andrushchenko <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201203/eb67f3e2/attachment.sig>