[PATCH v7 1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers

Arnd Bergmann arnd at arndb.de
Wed Jul 1 23:20:42 PDT 2026


On Thu, Jul 2, 2026, at 04:54, Yunhui Cui wrote:
> When port I/O is not supported, exposing the port-string helpers is both
> unnecessary and can make clang diagnose null-pointer arithmetic from the
> PCI_IOBASE based address expression.  Keep the MMIO string helpers
> available as before, but only provide the port I/O variants when
> CONFIG_HAS_IOPORT is enabled.
>
> Signed-off-by: Yunhui Cui <cuiyunhui at bytedance.com>

Reviewed-by: Arnd Bergmann <arnd at arndb.de>



More information about the linux-riscv mailing list