public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
@ 2020-11-19 19:26 Andy Shevchenko
  2020-11-19 20:21 ` Andy Shevchenko
  2020-12-03 16:59 ` Tom Rini
  0 siblings, 2 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-11-19 19:26 UTC (permalink / raw)
  To: u-boot

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.

Fixes: 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/compat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compat.h b/include/linux/compat.h
index 38549baa251d..3d0acbd582ef 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -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

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-11-19 19:26 [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave() Andy Shevchenko
@ 2020-11-19 20:21 ` Andy Shevchenko
  2020-11-20 13:42   ` Oleksandr Andrushchenko
                     ` (2 more replies)
  2020-12-03 16:59 ` Tom Rini
  1 sibling, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-11-19 20:21 UTC (permalink / raw)
  To: u-boot

Update Tom's address

On Thu, Nov 19, 2020 at 9:26 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> 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.
>
> Fixes: 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/linux/compat.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/compat.h b/include/linux/compat.h
> index 38549baa251d..3d0acbd582ef 100644
> --- a/include/linux/compat.h
> +++ b/include/linux/compat.h
> @@ -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
>


-- 
With Best Regards,
Andy Shevchenko

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-11-19 20:21 ` Andy Shevchenko
@ 2020-11-20 13:42   ` Oleksandr Andrushchenko
  2020-11-23  4:46   ` Heiko Schocher
  2020-12-02 18:28   ` Andy Shevchenko
  2 siblings, 0 replies; 8+ messages in thread
From: Oleksandr Andrushchenko @ 2020-11-20 13:42 UTC (permalink / raw)
  To: u-boot

Hi, Andy

On 11/19/20 10:21 PM, Andy Shevchenko wrote:
> Update Tom's address
>
> On Thu, Nov 19, 2020 at 9:26 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> 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.
>>
>> Fixes: 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")
>> Cc: Heiko Schocher <hs@denx.de>
>> Cc: Tom Rini <trini@ti.com>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> ---
>>   include/linux/compat.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/compat.h b/include/linux/compat.h
>> index 38549baa251d..3d0acbd582ef 100644
>> --- a/include/linux/compat.h
>> +++ b/include/linux/compat.h
>> @@ -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
>>
>

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-11-19 20:21 ` Andy Shevchenko
  2020-11-20 13:42   ` Oleksandr Andrushchenko
@ 2020-11-23  4:46   ` Heiko Schocher
  2020-12-02 18:28   ` Andy Shevchenko
  2 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2020-11-23  4:46 UTC (permalink / raw)
  To: u-boot

Hello Andy,

Am 19.11.20 um 21:21 schrieb Andy Shevchenko:
> Update Tom's address
> 
> On Thu, Nov 19, 2020 at 9:26 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>>
>> 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.
>>
>> Fixes: 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")
>> Cc: Heiko Schocher <hs@denx.de>
>> Cc: Tom Rini <trini@ti.com>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>>  include/linux/compat.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
-- 
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

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-11-19 20:21 ` Andy Shevchenko
  2020-11-20 13:42   ` Oleksandr Andrushchenko
  2020-11-23  4:46   ` Heiko Schocher
@ 2020-12-02 18:28   ` Andy Shevchenko
  2020-12-02 18:37     ` Tom Rini
  2 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-12-02 18:28 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 19, 2020 at 10:21:39PM +0200, Andy Shevchenko wrote:
> Update Tom's address

Tom, should I resend with your address fixed?

-- 
With Best Regards,
Andy Shevchenko

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-12-02 18:28   ` Andy Shevchenko
@ 2020-12-02 18:37     ` Tom Rini
  2020-12-02 18:53       ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2020-12-02 18:37 UTC (permalink / raw)
  To: u-boot

On Wed, Dec 02, 2020 at 08:28:55PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 19, 2020 at 10:21:39PM +0200, Andy Shevchenko wrote:
> > 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.

-- 
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>

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-12-02 18:37     ` Tom Rini
@ 2020-12-02 18:53       ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-12-02 18:53 UTC (permalink / raw)
  To: u-boot

On Wed, Dec 02, 2020 at 01:37:35PM -0500, Tom Rini wrote:
> On Wed, Dec 02, 2020 at 08:28:55PM +0200, Andy Shevchenko wrote:
> > On Thu, Nov 19, 2020 at 10:21:39PM +0200, Andy Shevchenko wrote:
> > > 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!

-- 
With Best Regards,
Andy Shevchenko

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

* [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()
  2020-11-19 19:26 [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave() Andy Shevchenko
  2020-11-19 20:21 ` Andy Shevchenko
@ 2020-12-03 16:59 ` Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Rini @ 2020-12-03 16:59 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 19, 2020 at 09:26:20PM +0200, Andy Shevchenko wrote:

> 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.
> 
> Fixes: 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Reviewed-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

-- 
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>

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

end of thread, other threads:[~2020-12-03 16:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19 19:26 [PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave() Andy Shevchenko
2020-11-19 20:21 ` Andy Shevchenko
2020-11-20 13:42   ` Oleksandr Andrushchenko
2020-11-23  4:46   ` Heiko Schocher
2020-12-02 18:28   ` Andy Shevchenko
2020-12-02 18:37     ` Tom Rini
2020-12-02 18:53       ` Andy Shevchenko
2020-12-03 16:59 ` Tom Rini

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