All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on PCI_IOBASE
@ 2021-04-15 12:36 Niklas Schnelle
  2021-04-15 12:36 ` [PATCH v2 1/2] sparc: explicitly set PCI_IOBASE to 0 Niklas Schnelle
  2021-04-15 12:37 ` [PATCH v2 2/2] asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on PCI_IOBASE Niklas Schnelle
  0 siblings, 2 replies; 8+ messages in thread
From: Niklas Schnelle @ 2021-04-15 12:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nathan Chancellor, Nick Desaulniers, clang-built-linux,
	linux-arch, linux-kernel, linux-s390

Hi,

This is version 2 of my attempt to get rid of a clang -Wnull-pointer-arithmetic
warning for the use of PCI_IOBASE in asm-generic/io.h. This was originally
found on s390 but should apply to all platforms leaving PCI_IOBASE undefined
while making use of the inb() and friends helpers from asm-generic/io.h.

Thanks,
Niklas

Changes since v1:
- Added patch to explicitly set PCI_IOBASE to 0 on sparc as suggested by Arnd
  Bergmann
- Instead of working around the warning with a uintptr_t PCI_IOBASE make inb()
  and friends explicitly WARN_ONCE() and return 0xff... (Arnd)

Niklas Schnelle (2):
  sparc: explicitly set PCI_IOBASE to 0
  asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on
    PCI_IOBASE

 arch/sparc/include/asm/io.h |  4 +++
 include/asm-generic/io.h    | 55 ++++++++++++++++++++++++++++++++++---
 2 files changed, 55 insertions(+), 4 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-04-15 16:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 12:36 [PATCH v2 0/2] asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on PCI_IOBASE Niklas Schnelle
2021-04-15 12:36 ` [PATCH v2 1/2] sparc: explicitly set PCI_IOBASE to 0 Niklas Schnelle
2021-04-15 16:10   ` David Laight
2021-04-15 12:37 ` [PATCH v2 2/2] asm-generic/io.h: Silence -Wnull-pointer-arithmetic warning on PCI_IOBASE Niklas Schnelle
2021-04-15 15:45   ` kernel test robot
2021-04-15 15:45     ` kernel test robot
2021-04-15 16:26   ` kernel test robot
2021-04-15 16:26     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.