Re: [PATCH v3 3/4] include/asm-generic/io.h: remove performing pointer arithmetic on a null pointer
From: Arnd Bergmann
Date: Tue Dec 06 2022 - 09:23:26 EST
On Tue, Dec 6, 2022, at 07:01, Song Chen wrote:
> 在 2022/12/5 18:04, Arnd Bergmann 写道:
>> On Mon, Dec 5, 2022, at 09:30, Song Chen wrote:
>>
>> We have discussed this bit multiple times, and Niklas Schnelle
>> last posted his series to fix this as an RFC in [1].
>>
>
> Trace triggers the warning accidentally by including io.h indirectly
> because of the absence of PCI_IOBASE in hexagon. So what trace can do in
> this case is either to suppress warning or just ignore it, the warning
> will go away as long as hexagon has put PCI_IOBASE in place or
> implemented its own inb() etc, i think they will do it sooner or later.
hexagon/riscv/s390 should not implement inb(), there is no reason
for that because no hardware uses it. Half of the other architectures
that currently implement inb() should not do so either.
> Introducing HAS_IOPORT to trace seems no necessary and too much impact.
I don't think that trace has anything to do with it, the asm-generic
header should just not provde the inb() interface on architectures
that don't use it.
Arnd