mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex@shazbot.org>
To: Matt Evans <mattev@meta.com>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	kernel test robot <lkp@intel.com>,
	alex@shazbot.org
Subject: Re: [PATCH] vfio/pci: Fix sparse warning in vfio_pci_core_get_iomap()
Date: Fri, 22 May 2026 16:39:56 -0600	[thread overview]
Message-ID: <20260522163956.3d39bfd6@shazbot.org> (raw)
In-Reply-To: <20260522124215.3268565-1-mattev@meta.com>

On Fri, 22 May 2026 05:42:11 -0700
Matt Evans <mattev@meta.com> wrote:

> Use IOMEM_ERR_PTR() when returning a void __iomem * rather than
> ERR_PTR().  This fixes a sparse warning, "different address spaces".
> 
> Fixes: 859dc0f6253b ("vfio/pci: Replace vfio_pci_core_setup_barmap() with vfio_pci_core_get_iomap()")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202605211601.U1OvmuqY-lkp@intel.com/
> Signed-off-by: Matt Evans <mattev@meta.com>
> ---
>  include/linux/vfio_pci_core.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/vfio_pci_core.h b/include/linux/vfio_pci_core.h
> index 7accd0eac457..4fa129fc5c64 100644
> --- a/include/linux/vfio_pci_core.h
> +++ b/include/linux/vfio_pci_core.h
> @@ -244,10 +244,10 @@ static inline void __iomem __must_check *
>  vfio_pci_core_get_iomap(struct vfio_pci_core_device *vdev, unsigned int bar)
>  {
>  	if (WARN_ON_ONCE(bar >= PCI_STD_NUM_BARS))
> -		return ERR_PTR(-EINVAL);
> +		return IOMEM_ERR_PTR(-EINVAL);
>  
>  	if (WARN_ON_ONCE(!vdev->barmap[bar]))
> -		return ERR_PTR(-ENODEV);
> +		return IOMEM_ERR_PTR(-ENODEV);
>  
>  	return vdev->barmap[bar];
>  }

Applied to vfio next branch for v7.2.  Thanks,

Alex

      reply	other threads:[~2026-05-22 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22 12:42 Matt Evans
2026-05-22 22:39 ` Alex Williamson [this message]

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=20260522163956.3d39bfd6@shazbot.org \
    --to=alex@shazbot.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mattev@meta.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

Powered by JetHome