Re: [PATCH 2/2] speakup: only build serialio when ISA is enabled

From: Samuel Thibault
Date: Tue Aug 04 2020 - 12:12:34 EST


Greg KH, le mar. 04 août 2020 17:49:52 +0200, a ecrit:
> > #define inb(c) ({ u8 __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
> >
> > and thus yes it's arithmetic over a (void*) pointer, the caller cannot
> > do anything about it.
>
> And that's fine, math with pointers, even void ones, is ok.

C++ doesn't like it, but in general compilers provide some semantic for
it, yes.

> I wonder why riscv was complaining about that. It's not nice, but it is
> valid C.

Strictly C speaking, no, but GNU C yes.

> Let's see if any of their developers care about it :)

Ok :) In the meanwhile I sent a v2 series that should fix the different
link cases, just not the particular riscv warning.

Samuel