u-boot/arch/sandbox/include/asm
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
..
arch-sandbox sandbox: Add a simple sound driver 2014-03-17 20:05:48 -06:00
bitops.h sandbox: change local_irq_save() to macro 2014-06-23 15:37:24 -06:00
byteorder.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
cache.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
config.h common/board_f: Initialized global data for generic board 2014-05-12 15:20:05 -04:00
errno.h sandbox: Add asm/errno.h 2012-09-29 10:00:29 -07:00
getopt.h sandbox: Rename sb_cmdline_option to sandbox_cmdline_option 2013-12-09 12:22:02 -07:00
global_data.h sandbox: Allow reading/writing of RAM buffer 2014-01-08 17:25:03 -07:00
gpio.h dm: rename device struct to udevice 2014-05-27 10:21:32 -04:00
io.h sandbox: Support iotrace feature 2014-06-20 11:54:42 -06:00
posix_types.h sandbox: Add architecture header files 2011-10-17 22:45:50 +02:00
ptrace.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
sdl.h sandbox: Add SDL library for LCD, keyboard, audio 2014-03-17 20:05:48 -06:00
sections.h sandbox: Rename sb_cmdline_option to sandbox_cmdline_option 2013-12-09 12:22:02 -07:00
spi.h sandbox: spi: Add SPI emulation bus 2013-12-09 12:22:18 -07:00
state.h sandbox: Add options to clean up temporary files 2014-03-17 20:05:49 -06:00
string.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
system.h sandbox: change local_irq_save() to macro 2014-06-23 15:37:24 -06:00
types.h sandbox: config: Don't use 64-bit physical memory 2013-11-21 16:54:26 -07:00
u-boot-sandbox.h sandbox: Add LCD driver 2014-03-17 20:05:49 -06:00
u-boot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
unaligned.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00