[PATCH v1] linux/compat.h: Remove debug() from spin_lock_irqsave()

Heiko Schocher hs at denx.de
Mon Nov 23 05:46:13 CET 2020


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 at 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 at denx.de>
>> Cc: Tom Rini <trini at ti.com>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
>> ---
>>  include/linux/compat.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

Reviewed-by: Heiko Schocher <hs at 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


More information about the U-Boot mailing list