1
0
Fork 0
remarkable-uboot/arch/sandbox
Masahiro Yamada 1638d98052 sandbox: change local_irq_save() to macro
local_irq_save() should be a macro, not a function
because local_irq_save() saves flag to the given argument.

GCC is silent about this issue, but Clang warns:

In file included from lib/asm-offsets.c:15:
In file included from include/common.h:20:
In file included from include/linux/bitops.h:110:
arch/sandbox/include/asm/bitops.h:59:17:
 warning: variable 'flags' is uninitialized when used here
      [-Wuninitialized]
        local_irq_save(flags);
                       ^~~~~

That change causes another warning:

In file included from include/linux/bitops.h:110:0,
                 from include/common.h:20,
                 from lib/asm-offsets.c:15:
arch/sandbox/include/asm/bitops.h: In function ‘test_and_set_bit’:
arch/sandbox/include/asm/bitops.h:56:16: warning: unused variable ‘flags’ [-Wunused-variable]

So, flags should be set to __always_unused.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-06-23 15:37:24 -06:00
..
cpu sandbox: terminate os_dirent_ls() result list 2014-06-23 15:37:24 -06:00
dts Makefile: Support include files for .dts files 2014-06-20 11:55:03 -06:00
include/asm sandbox: change local_irq_save() to macro 2014-06-23 15:37:24 -06:00
lib Revert "sandbox: move source files from board/ to arch/sandbox/" 2014-05-16 11:40:51 -07:00
config.mk sandbox: Provide a build option to avoid using SDL 2014-05-09 14:47:13 -06:00