mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 01:56:42 +07:00
ipw2200 - Fix bad ipw_write8() macro
ipw_write8() can't be used alone with a loop because of a wrong definition. CC [M] drivers/net/wireless/ipw2200.o drivers/net/wireless/ipw2200.c: In function 'ipw_ethtool_set_eeprom': drivers/net/wireless/ipw2200.c:10579: warning: array subscript is above array bounds drivers/net/wireless/ipw2200.c: In function 'ipw_load': drivers/net/wireless/ipw2200.c:2663: warning: array subscript is above array bounds Add missing do {} while (0) to fix them. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7dcdd073bf
commit
fb55d887c5
@ -305,9 +305,10 @@ static inline void ipw_write_reg32(struct ipw_priv *a, u32 b, u32 c)
|
|||||||
#define _ipw_write8(ipw, ofs, val) writeb((val), (ipw)->hw_base + (ofs))
|
#define _ipw_write8(ipw, ofs, val) writeb((val), (ipw)->hw_base + (ofs))
|
||||||
|
|
||||||
/* 8-bit direct write (for low 4K of SRAM/regs), with debug wrapper */
|
/* 8-bit direct write (for low 4K of SRAM/regs), with debug wrapper */
|
||||||
#define ipw_write8(ipw, ofs, val) \
|
#define ipw_write8(ipw, ofs, val) do { \
|
||||||
IPW_DEBUG_IO("%s %d: write_direct8(0x%08X, 0x%08X)\n", __FILE__, __LINE__, (u32)(ofs), (u32)(val)); \
|
IPW_DEBUG_IO("%s %d: write_direct8(0x%08X, 0x%08X)\n", __FILE__, __LINE__, (u32)(ofs), (u32)(val)); \
|
||||||
_ipw_write8(ipw, ofs, val)
|
_ipw_write8(ipw, ofs, val); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/* 16-bit direct write (low 4K) */
|
/* 16-bit direct write (low 4K) */
|
||||||
#define _ipw_write16(ipw, ofs, val) writew((val), (ipw)->hw_base + (ofs))
|
#define _ipw_write16(ipw, ofs, val) writew((val), (ipw)->hw_base + (ofs))
|
||||||
|
Loading…
Reference in New Issue
Block a user