* [PATCH, RESEND] parisc: io: Improve the outb(), outw() and outl() macros
@ 2022-01-06 17:29 Bart Van Assche
2022-01-06 17:52 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2022-01-06 17:29 UTC (permalink / raw)
To: James E . J . Bottomley
Cc: Bart Van Assche, Helge Deller, Geert Uytterhoeven, linux-parisc
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 <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
arch/parisc/include/asm/io.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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
/*
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH, RESEND] parisc: io: Improve the outb(), outw() and outl() macros
2022-01-06 17:29 [PATCH, RESEND] parisc: io: Improve the outb(), outw() and outl() macros Bart Van Assche
@ 2022-01-06 17:52 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-01-06 17:52 UTC (permalink / raw)
To: Bart Van Assche, James E . J . Bottomley; +Cc: Geert Uytterhoeven, linux-parisc
On 1/6/22 18:29, Bart Van Assche wrote:
> 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 <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: linux-parisc@vger.kernel.org
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
applied to parisc-next tree.
Thanks!
Helge
> ---
> arch/parisc/include/asm/io.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> 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
>
> /*
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-06 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-06 17:29 [PATCH, RESEND] parisc: io: Improve the outb(), outw() and outl() macros Bart Van Assche
2022-01-06 17:52 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox