public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: bhelgaas@google.com, nathan@kernel.org, ndesaulniers@google.com,
	trix@redhat.com, tglx@linutronix.de, darwi@linutronix.de,
	kevin.tian@intel.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	Arnd Bergmann <arnd@arndb.de>,
	Dan Williams <dan.j.williams@intel.com>,
	Marc Zyngier <maz@kernel.org>, Ira Weiny <ira.weiny@intel.com>,
	Shay Drory <shayd@nvidia.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Eli Cohen <elic@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH] PCI/MSI: Provide missing stub for pci_msix_can_alloc_dyn()
Date: Thu, 6 Apr 2023 13:48:19 -0500	[thread overview]
Message-ID: <20230406184819.GA3722907@bhelgaas> (raw)
In-Reply-To: <310ecc4815dae4174031062f525245f0755c70e2.1680119924.git.reinette.chatre@intel.com>

[+cc folks from Arnd's similar patch]

On Wed, Mar 29, 2023 at 01:13:11PM -0700, Reinette Chatre wrote:
> pci_msix_can_alloc_dyn() is not declared when CONFIG_PCI_MSI
> is disabled.
> 
> There is no existing user of pci_msix_can_alloc_dyn() but
> work is in progress to change this. This work encounters
> the following error when CONFIG_PCI_MSI is disabled:
> 
> drivers/vfio/pci/vfio_pci_intrs.c:427:21: error: implicit declaration \
> 	of function 'pci_msix_can_alloc_dyn' \
> 	[-Werror=implicit-function-declaration]
> 
> Provide definition for pci_msix_can_alloc_dyn() in preparation
> for users that need to compile when CONFIG_PCI_MSI is disabled.
> 
> Fixes: 34026364df8e ("PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X")
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202303291000.PWFqGCxH-lkp@intel.com/
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>

Applied with Sathy's reviewed-by to for-linus for v6.3, thanks!

I also added the Fixes: line for mlx5 from Arnd's patch.

> ---
> I missed this one in my previous fix. After this all the functions
> in pci.h's #ifdef CONFIG_PCI_MSI portion have stubs when
> CONFIG_PCI_MSI is disabled.
> 
>  include/linux/pci.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index b50e5c79f7e3..a5dda515fcd1 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1624,6 +1624,8 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
>  					      flags, NULL);
>  }
>  
> +static inline bool pci_msix_can_alloc_dyn(struct pci_dev *dev)
> +{ return false; }
>  static inline struct msi_map pci_msix_alloc_irq_at(struct pci_dev *dev, unsigned int index,
>  						   const struct irq_affinity_desc *affdesc)
>  {
> -- 
> 2.34.1
> 

      parent reply	other threads:[~2023-04-06 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 20:13 [PATCH] PCI/MSI: Provide missing stub for pci_msix_can_alloc_dyn() Reinette Chatre
2023-03-29 21:08 ` Sathyanarayanan Kuppuswamy
2023-04-06 18:48 ` Bjorn Helgaas [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=20230406184819.GA3722907@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=darwi@linutronix.de \
    --cc=elic@nvidia.com \
    --cc=ira.weiny@intel.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=saeedm@nvidia.com \
    --cc=shayd@nvidia.com \
    --cc=tglx@linutronix.de \
    --cc=trix@redhat.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