* [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper
@ 2017-12-06 14:17 Arnd Bergmann
2017-12-06 14:41 ` Sinan Kaya
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-12-06 14:17 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Arnd Bergmann, Sinan Kaya, Guenter Roeck, Lorenzo Pieralisi,
David Woodhouse, Rafael J. Wysocki, Thomas Gleixner,
Matthew Minter, linux-pci, linux-kernel
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.
Fixes: 1630bd42079c ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()")
Cc: Sinan Kaya <okaya@codeaurora.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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(+)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a1589dec7e33..69815397365e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -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; }
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper
2017-12-06 14:17 [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper Arnd Bergmann
@ 2017-12-06 14:41 ` Sinan Kaya
2017-12-06 14:47 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Sinan Kaya @ 2017-12-06 14:41 UTC (permalink / raw)
To: Arnd Bergmann, Bjorn Helgaas
Cc: Guenter Roeck, Lorenzo Pieralisi, David Woodhouse,
Rafael J. Wysocki, Thomas Gleixner, Matthew Minter, linux-pci,
linux-kernel
On 12/6/2017 9:17 AM, Arnd Bergmann wrote:
> 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.
>
> Fixes: 1630bd42079c ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()")
> Cc: Sinan Kaya <okaya@codeaurora.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> 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(+)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index a1589dec7e33..69815397365e 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -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()"
--
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper
2017-12-06 14:41 ` Sinan Kaya
@ 2017-12-06 14:47 ` Arnd Bergmann
2017-12-06 14:48 ` Sinan Kaya
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-12-06 14:47 UTC (permalink / raw)
To: Sinan Kaya
Cc: Bjorn Helgaas, Guenter Roeck, Lorenzo Pieralisi, David Woodhouse,
Rafael J. Wysocki, Thomas Gleixner, Matthew Minter, linux-pci,
Linux Kernel Mailing List
On Wed, Dec 6, 2017 at 3:41 PM, Sinan Kaya <okaya@codeaurora.org> wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper
2017-12-06 14:47 ` Arnd Bergmann
@ 2017-12-06 14:48 ` Sinan Kaya
0 siblings, 0 replies; 4+ messages in thread
From: Sinan Kaya @ 2017-12-06 14:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Helgaas, Guenter Roeck, Lorenzo Pieralisi, David Woodhouse,
Rafael J. Wysocki, Thomas Gleixner, Matthew Minter, linux-pci,
Linux Kernel Mailing List
On 12/6/2017 9:47 AM, Arnd Bergmann wrote:
> On Wed, Dec 6, 2017 at 3:41 PM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> 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.
--
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-06 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 14:17 [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper Arnd Bergmann
2017-12-06 14:41 ` Sinan Kaya
2017-12-06 14:47 ` Arnd Bergmann
2017-12-06 14:48 ` Sinan Kaya
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.