diff mbox series

PCI: Fix compile error with DPC disabled

Message ID 20180921142210.1191-1-keith.busch@intel.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show
Series PCI: Fix compile error with DPC disabled | expand

Commit Message

Keith Busch Sept. 21, 2018, 2:22 p.m. UTC
The alternate functions when CONFIG_PCIE_DPC is not defined need to be
static inline.

Signed-off-by: Keith Busch <keith.busch@intel.com>
---
 drivers/pci/pci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bjorn Helgaas Sept. 21, 2018, 4:57 p.m. UTC | #1
On Fri, Sep 21, 2018 at 08:22:10AM -0600, Keith Busch wrote:
> The alternate functions when CONFIG_PCIE_DPC is not defined need to be
> static inline.
> 
> Signed-off-by: Keith Busch <keith.busch@intel.com>

If you tell me which patch, I'll fold this into it so there's no bisection
hole.

> ---
>  drivers/pci/pci.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> index a244bd0c5ca7..eb3125decffe 100644
> --- a/drivers/pci/pci.h
> +++ b/drivers/pci/pci.h
> @@ -402,8 +402,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
>  void pci_save_dpc_state(struct pci_dev *dev);
>  void pci_restore_dpc_state(struct pci_dev *dev);
>  #else
> -void pci_save_dpc_state(struct pci_dev *dev) {}
> -void pci_restore_dpc_state(struct pci_dev *dev) {}
> +static inline void pci_save_dpc_state(struct pci_dev *dev) {}
> +static inline void pci_restore_dpc_state(struct pci_dev *dev) {}
>  #endif
>  
>  #ifdef CONFIG_PCI_ATS
> -- 
> 2.14.4
>
Keith Busch Sept. 21, 2018, 5:02 p.m. UTC | #2
On Fri, Sep 21, 2018 at 11:57:29AM -0500, Bjorn Helgaas wrote:
> On Fri, Sep 21, 2018 at 08:22:10AM -0600, Keith Busch wrote:
> > The alternate functions when CONFIG_PCIE_DPC is not defined need to be
> > static inline.
> > 
> > Signed-off-by: Keith Busch <keith.busch@intel.com>
> 
> If you tell me which patch, I'll fold this into it so there's no bisection
> hole.

Thanks, I like that plan.

Fixes: d17964c0d81fc38c7 ("PCI/DPC: Save and restore config state")

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/hotplug&id=d17964c0d81fc38c733fc5281436d2b262306a33
 
> > ---
> >  drivers/pci/pci.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> > index a244bd0c5ca7..eb3125decffe 100644
> > --- a/drivers/pci/pci.h
> > +++ b/drivers/pci/pci.h
> > @@ -402,8 +402,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
> >  void pci_save_dpc_state(struct pci_dev *dev);
> >  void pci_restore_dpc_state(struct pci_dev *dev);
> >  #else
> > -void pci_save_dpc_state(struct pci_dev *dev) {}
> > -void pci_restore_dpc_state(struct pci_dev *dev) {}
> > +static inline void pci_save_dpc_state(struct pci_dev *dev) {}
> > +static inline void pci_restore_dpc_state(struct pci_dev *dev) {}
> >  #endif
> >  
> >  #ifdef CONFIG_PCI_ATS
> > -- 
> > 2.14.4
> >
Bjorn Helgaas Sept. 21, 2018, 5:19 p.m. UTC | #3
On Fri, Sep 21, 2018 at 11:02:34AM -0600, Keith Busch wrote:
> On Fri, Sep 21, 2018 at 11:57:29AM -0500, Bjorn Helgaas wrote:
> > On Fri, Sep 21, 2018 at 08:22:10AM -0600, Keith Busch wrote:
> > > The alternate functions when CONFIG_PCIE_DPC is not defined need to be
> > > static inline.
> > > 
> > > Signed-off-by: Keith Busch <keith.busch@intel.com>
> > 
> > If you tell me which patch, I'll fold this into it so there's no bisection
> > hole.
> 
> Thanks, I like that plan.
> 
> Fixes: d17964c0d81fc38c7 ("PCI/DPC: Save and restore config state")
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/hotplug&id=d17964c0d81fc38c733fc5281436d2b262306a33

Done, sorry to bother you, I could have figured that out in 10 seconds
myself from the 0-day robot email.
Keith Busch Sept. 21, 2018, 5:50 p.m. UTC | #4
On Fri, Sep 21, 2018 at 12:19:03PM -0500, Bjorn Helgaas wrote:
> On Fri, Sep 21, 2018 at 11:02:34AM -0600, Keith Busch wrote:
> > On Fri, Sep 21, 2018 at 11:57:29AM -0500, Bjorn Helgaas wrote:
> > > On Fri, Sep 21, 2018 at 08:22:10AM -0600, Keith Busch wrote:
> > > > The alternate functions when CONFIG_PCIE_DPC is not defined need to be
> > > > static inline.
> > > > 
> > > > Signed-off-by: Keith Busch <keith.busch@intel.com>
> > > 
> > > If you tell me which patch, I'll fold this into it so there's no bisection
> > > hole.
> > 
> > Thanks, I like that plan.
> > 
> > Fixes: d17964c0d81fc38c7 ("PCI/DPC: Save and restore config state")
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/hotplug&id=d17964c0d81fc38c733fc5281436d2b262306a33
> 
> Done, sorry to bother you, I could have figured that out in 10 seconds
> myself from the 0-day robot email.

Oh, no problem at all. The breakage was my mistake, so my apologies. I
don't like getting caught by 0-day, but I'm happy it's there! :)
diff mbox series

Patch

diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index a244bd0c5ca7..eb3125decffe 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -402,8 +402,8 @@  void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
 void pci_save_dpc_state(struct pci_dev *dev);
 void pci_restore_dpc_state(struct pci_dev *dev);
 #else
-void pci_save_dpc_state(struct pci_dev *dev) {}
-void pci_restore_dpc_state(struct pci_dev *dev) {}
+static inline void pci_save_dpc_state(struct pci_dev *dev) {}
+static inline void pci_restore_dpc_state(struct pci_dev *dev) {}
 #endif
 
 #ifdef CONFIG_PCI_ATS