linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] um: Turn HAS_IOPORT_MAP off
@ 2025-06-28 16:47 Tiwei Bie
  2025-07-01  8:26 ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Tiwei Bie @ 2025-06-28 16:47 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, Tiwei Bie, kernel test robot

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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506271049.MtzHqdSd-lkp@intel.com/
Fixes: b8c9c3b822fe ("um: stop using PCI port I/O")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
Strictly speaking, the -Wnull-pointer-arithmetic warnings reported
by lkp has been fixed by commit b8c9c3b822fe ("um: stop using PCI
port I/O"). But it introduced new -Wnull-pointer-arithmetic warnings,
and this patch fixes the newly introduced warnings.

 arch/um/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index f08e8a7fac93..76aa954520b1 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -54,6 +54,9 @@ config UML_IOMEM_EMULATION
 	select INDIRECT_IOMEM
 	select GENERIC_PCI_IOMAP
 
+config NO_IOPORT_MAP
+	def_bool y
+
 config ISA
 	bool
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-02 15:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28 16:47 [PATCH] um: Turn HAS_IOPORT_MAP off Tiwei Bie
2025-07-01  8:26 ` Geert Uytterhoeven
2025-07-01  8:43   ` Arnd Bergmann
2025-07-01 12:22     ` Tiwei Bie
2025-07-02 11:09       ` Arnd Bergmann
2025-07-02 13:02         ` Tiwei Bie
2025-07-02 13:39           ` Arnd Bergmann
2025-07-02 15:02             ` Tiwei Bie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).