linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Tiwei Bie <tiwei.btw@antgroup.com>
Cc: richard@nod.at, anton.ivanov@cambridgegreys.com,
	johannes@sipsolutions.net,  linux-um@lists.infradead.org,
	kernel test robot <lkp@intel.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] um: Turn HAS_IOPORT_MAP off
Date: Tue, 1 Jul 2025 10:26:27 +0200	[thread overview]
Message-ID: <CAMuHMdUa1D3mLtNfOhE9RB7uWyf765-9kiQzG5ku05zz2f+zjw@mail.gmail.com> (raw)
In-Reply-To: <20250628164740.353989-1-tiwei.btw@antgroup.com>

CC arnd

On Sat, 28 Jun 2025 at 18:48, Tiwei Bie <tiwei.btw@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 <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
>


  reply	other threads:[~2025-07-01  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-28 16:47 [PATCH] um: Turn HAS_IOPORT_MAP off Tiwei Bie
2025-07-01  8:26 ` Geert Uytterhoeven [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdUa1D3mLtNfOhE9RB7uWyf765-9kiQzG5ku05zz2f+zjw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnd@arndb.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-um@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=richard@nod.at \
    --cc=tiwei.btw@antgroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).