mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
m68k: atari: Annotate dummy read in ROM port IO code as __maybe_unused
The Atari ROM port IO code uses dummy variables to implement writes (not supported by the hardware) as reads that encode the write data in part of the address. The value read from the ROM port in this operation is discarded. Annotate dummy variables as __maybe_unused to avoid a compiler warning with W=1. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com> Link: https://lore.kernel.org/r/1590878719-21219-1-git-send-email-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
5f5f2949c1
commit
be1a312836
@ -80,14 +80,14 @@
|
||||
({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v; })
|
||||
|
||||
#define rom_out_8(addr, b) \
|
||||
({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
|
||||
({u8 __maybe_unused __w, __v = (b); u32 _addr = ((u32) (addr)); \
|
||||
__w = ((*(__force volatile u8 *) ((_addr | 0x10000) + (__v<<1)))); })
|
||||
#define rom_out_be16(addr, w) \
|
||||
({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
|
||||
({u16 __maybe_unused __w, __v = (w); u32 _addr = ((u32) (addr)); \
|
||||
__w = ((*(__force volatile u16 *) ((_addr & 0xFFFF0000UL) + ((__v & 0xFF)<<1)))); \
|
||||
__w = ((*(__force volatile u16 *) ((_addr | 0x10000) + ((__v >> 8)<<1)))); })
|
||||
#define rom_out_le16(addr, w) \
|
||||
({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
|
||||
({u16 __maybe_unused __w, __v = (w); u32 _addr = ((u32) (addr)); \
|
||||
__w = ((*(__force volatile u16 *) ((_addr & 0xFFFF0000UL) + ((__v >> 8)<<1)))); \
|
||||
__w = ((*(__force volatile u16 *) ((_addr | 0x10000) + ((__v & 0xFF)<<1)))); })
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user