From: Bart Van Assche Date: Thu, 6 Jan 2022 17:29:00 +0000 (-0800) Subject: parisc: io: Improve the outb(), outw() and outl() macros X-Git-Tag: 5.17-rc-part2-smb3-fixes~85^2~4 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=6968e707d371ef80511448c6771daf445b4a5cf5;p=sfrench%2Fcifs-2.6.git parisc: io: Improve the outb(), outw() and outl() macros This patch fixes the following build error for source file drivers/scsi/pcmcia/sym53c500_cs.c: In file included from ./include/linux/bug.h:5, from ./include/linux/cpumask.h:14, from ./include/linux/mm_types_task.h:14, from ./include/linux/mm_types.h:5, from ./include/linux/buildid.h:5, from ./include/linux/module.h:14, from drivers/scsi/pcmcia/sym53c500_cs.c:42: drivers/scsi/pcmcia/sym53c500_cs.c: In function ‘SYM53C500_intr’: ./arch/parisc/include/asm/bug.h:28:2: error: expected expression before ‘do’ 28 | do { \ | ^~ ./arch/parisc/include/asm/io.h:276:20: note: in expansion of macro ‘BUG’ 276 | #define outb(x, y) BUG() | ^~~ drivers/scsi/pcmcia/sym53c500_cs.c:124:19: note: in expansion of macro ‘outb’ 124 | #define REG0(x) (outb(C4_IMG, (x) + CONFIG4)) | ^~~~ drivers/scsi/pcmcia/sym53c500_cs.c:362:2: note: in expansion of macro ‘REG0’ 362 | REG0(port_base); | ^~~~ Cc: James E.J. Bottomley Cc: Helge Deller Cc: Geert Uytterhoeven Cc: linux-parisc@vger.kernel.org Signed-off-by: Bart Van Assche Signed-off-by: Helge Deller --- diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index 0b5259102319..837ddddbac6a 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h @@ -273,9 +273,9 @@ static inline int inl(unsigned long addr) return -1; } -#define outb(x, y) BUG() -#define outw(x, y) BUG() -#define outl(x, y) BUG() +#define outb(x, y) ({(void)(x); (void)(y); BUG(); 0;}) +#define outw(x, y) ({(void)(x); (void)(y); BUG(); 0;}) +#define outl(x, y) ({(void)(x); (void)(y); BUG(); 0;}) #endif /*