On Tue, Jul 1, 2025, at 10:26, Geert Uytterhoeven wrote: > CC arnd > > On Sat, 28 Jun 2025 at 18:48, Tiwei Bie <tiwei....@antgroup.com> wrote: >> Since we don't have port I/O support, we should turn HAS_IOPORT_MAP >> off as well. It will fix clang warnings like below: >> >> ./include/asm-generic/io.h:1175:55: warning: performing pointer arithmetic >> on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] >> 1175 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; >> | ~~~~~~~~~~ ^ >> >> Reported-by: kernel test robot <l...@intel.com> >> Closes: >> https://lore.kernel.org/oe-kbuild-all/202506271049.mtzhqdsd-...@intel.com/ >> Fixes: b8c9c3b822fe ("um: stop using PCI port I/O") >> Signed-off-by: Tiwei Bie <tiwei....@antgroup.com> >> ---
I think this one would be a more generic solution, does that work for you? --- a/lib/Kconfig +++ b/lib/Kconfig @@ -381,7 +381,7 @@ config HAS_IOPORT config HAS_IOPORT_MAP bool depends on HAS_IOMEM && !NO_IOPORT_MAP - default y + default HAS_IOPORT source "kernel/dma/Kconfig" It seems silly to turn off HAS_IOPORT_MAP on platforms that don't have HAS_IOPORT to start with. Arnd