pci: provide pci_get_domain_bus_and_slot dummy helper
PATCH 1/1 pci: provide pci_get_domain_bus_and_slot dummy helper
When CONFIG_PCI is disabled, we still provide a pci_get_bus_and_slot() function that always returns NULL, but do not provide the same helper for pci_get_domain_bus_and_slot():
Replacing pci_get_bus_and_slot with pci_get_domain_bus_and_slot now causes a build error because of that:
drivers/hwmon/coretemp.c: In function 'adjust_tjmax':drivers/hwmon/coretemp.c:250:32: error: implicit declaration of function 'pci_get_domain_bus_and_slot'; did you mean 'pci_get_bus_and_slot'? [-Werror=implicit-function-declaration]
struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
This adds the missing helper function.
---
It would be good to get this into v4.15, in order to increase the chances of it still working after the conversion patches get merged during the v4.16 merge window.
--- include/linux/pci.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/pci.h +4 -0
@@ -1660,6 +1660,10 @@ static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,static inline struct pci_dev *pci_get_bus_and_slot (unsigned int bus,unsigned int devfn) {return NULL ; } +static inline struct pci_dev *pci_get_domain_bus_and_slot (int domain, +unsigned int bus, +unsigned int devfn) +{return NULL ; }static inline int pci_domain_nr (struct pci_bus *bus) {return 0 ; }static inline struct pci_dev *pci_dev_get (struct pci_dev *dev) {return NULL ; }
Signature · 1 line
2.9.0
Quoted 31 lines · Arnd Bergmann
When
CONFIG_PCIis disabled, we still provide apci_get_bus_and_slot()function that always returns NULL, but do not provide the same helper forpci_get_domain_bus_and_slot():Replacing
pci_get_bus_and_slotwithpci_get_domain_bus_and_slotnow causes a build error because of that:
drivers/hwmon/coretemp.c: In function 'adjust_tjmax':drivers/hwmon/coretemp.c:250:32: error: implicit declaration of function 'pci_get_domain_bus_and_slot'; did you mean 'pci_get_bus_and_slot'? [-Werror=implicit-function-declaration]
structpci_dev*host_bridge=pci_get_domain_bus_and_slot(0, 0, devfn);This adds the missing helper function.
Fixes 1630bd42079c ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()")Cc Sinan Kaya <[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>---
It would be good to get this into v4.15, in order to increase the chances of it still working after the conversion patches get merged during the v4.16 merge window.--- include/linux/pci.h | 4 ++++ 1 file changed, 4 insertions(+)include/linux/pci.h +0
-0
include/linux/pci.h static inline struct pci_dev *pci_get_slot(struct pci_bus *bus, · line 1669
Quoted 10 lines
include/linux/pci.h +4
-0@@ -1660,6 +1660,10 @@ static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,static inline struct pci_dev *pci_get_bus_and_slot (unsigned int bus,unsigned int devfn) {return NULL ; } +static inline struct pci_dev *pci_get_domain_bus_and_slot (int domain, +unsigned int bus, +unsigned int devfn) +{return NULL ; }static inline int pci_domain_nr (struct pci_bus *bus) {return 0 ; }static inline struct pci_dev *pci_dev_get (struct pci_dev *dev) {return NULL ; }
I thought Bjorn merged a similar patch yesterday with subject
"[PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot()"
Signature · 3 lines
Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Quoted 5 lines · Sinan Kaya
On 12/6/2017 9:17 AM, Arnd Bergmann wrote:
I thought Bjorn merged a similar patch yesterday with subject
"[PATCH -next] pci: add function stub for
pci_get_domain_bus_and_slot()"
It was probably just a bit too late to make it into today's linux-next.
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · Sinan Kaya
On 12/6/2017 9:17 AM, Arnd Bergmann wrote:
I thought Bjorn merged a similar patch yesterday with subject
"[PATCH -next] pci: add function stub for
pci_get_domain_bus_and_slot()"It was probably just a bit too late to make it into today's linux-next.
I see, sorry for the inconvenience.
Signature · 3 lines
Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.