* [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot()
@ 2017-11-28 22:31 Randy Dunlap
2017-11-28 23:17 ` Guenter Roeck
2017-12-05 20:39 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Randy Dunlap @ 2017-11-28 22:31 UTC (permalink / raw)
To: linux-pci, Bjorn Helgaas, Guenter Roeck; +Cc: LKML, Fengguang Wu
From: Randy Dunlap <rdunlap@infradead.org>
The coretemp driver build fails when CONFIG_PCI is not enabled
because it uses a function that does not have a stub for that
config case, so add the function stub.
../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
include/linux/pci.h | 3 +++
1 file changed, 3 insertions(+)
--- linux-next-20171128.orig/include/linux/pci.h
+++ linux-next-20171128/include/linux/pci.h
@@ -1660,6 +1660,9 @@ static inline struct pci_dev *pci_get_sl
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; }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot()
2017-11-28 22:31 [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot() Randy Dunlap
@ 2017-11-28 23:17 ` Guenter Roeck
2017-12-05 20:39 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2017-11-28 23:17 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-pci, Bjorn Helgaas, LKML, Fengguang Wu
On Tue, Nov 28, 2017 at 02:31:21PM -0800, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> The coretemp driver build fails when CONFIG_PCI is not enabled
> because it uses a function that does not have a stub for that
> config case, so add the function stub.
>
> ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
> ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
> struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
> ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
> struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Thanks!
Acked-by: Guenter Roeck <linux@roeck-us.net>
> ---
> include/linux/pci.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- linux-next-20171128.orig/include/linux/pci.h
> +++ linux-next-20171128/include/linux/pci.h
> @@ -1660,6 +1660,9 @@ static inline struct pci_dev *pci_get_sl
> 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; }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot()
2017-11-28 22:31 [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot() Randy Dunlap
2017-11-28 23:17 ` Guenter Roeck
@ 2017-12-05 20:39 ` Bjorn Helgaas
2017-12-05 20:50 ` Sinan Kaya
2017-12-06 21:02 ` Bjorn Helgaas
1 sibling, 2 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2017-12-05 20:39 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-pci, Bjorn Helgaas, Guenter Roeck, LKML, Fengguang Wu
[+cc Sinan]
On Tue, Nov 28, 2017 at 02:31:21PM -0800, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> The coretemp driver build fails when CONFIG_PCI is not enabled
> because it uses a function that does not have a stub for that
> config case, so add the function stub.
>
> ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
> ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
> struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
> ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
> struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Applied with Guenter's ack to pci/enumeration for v4.16, thanks!
Apparently no other code calls pci_get_domain_bus_and_slot() when
CONFIG_PCI isn't enabled.
15ab6790f628 ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()") is
already in linux-next via hwmon-staging.
The pci tree is merged into next slightly before hwmon-staging, so
this should be resolved as soon as the 0-day builder builds my
pci/enumeration branch and I merge it into my next branch.
> ---
> include/linux/pci.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- linux-next-20171128.orig/include/linux/pci.h
> +++ linux-next-20171128/include/linux/pci.h
> @@ -1660,6 +1660,9 @@ static inline struct pci_dev *pci_get_sl
> 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; }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot()
2017-12-05 20:39 ` Bjorn Helgaas
@ 2017-12-05 20:50 ` Sinan Kaya
2017-12-06 21:02 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Sinan Kaya @ 2017-12-05 20:50 UTC (permalink / raw)
To: Bjorn Helgaas, Randy Dunlap
Cc: linux-pci, Bjorn Helgaas, Guenter Roeck, LKML, Fengguang Wu
On 12/5/2017 3:39 PM, Bjorn Helgaas wrote:
> [+cc Sinan]
>
> On Tue, Nov 28, 2017 at 02:31:21PM -0800, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> The coretemp driver build fails when CONFIG_PCI is not enabled
>> because it uses a function that does not have a stub for that
>> config case, so add the function stub.
>>
>> ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
>> ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
>> struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
>> ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
>> struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Applied with Guenter's ack to pci/enumeration for v4.16, thanks!
>
> Apparently no other code calls pci_get_domain_bus_and_slot() when
> CONFIG_PCI isn't enabled.
>
> 15ab6790f628 ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()") is
> already in linux-next via hwmon-staging.
>
> The pci tree is merged into next slightly before hwmon-staging, so
> this should be resolved as soon as the 0-day builder builds my
> pci/enumeration branch and I merge it into my next branch.
>
Thanks for catching this. I assumed we do have a stub. It turns out we
don't.
--
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] 5+ messages in thread
* Re: [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot()
2017-12-05 20:39 ` Bjorn Helgaas
2017-12-05 20:50 ` Sinan Kaya
@ 2017-12-06 21:02 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2017-12-06 21:02 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-pci, Bjorn Helgaas, Guenter Roeck, LKML, Fengguang Wu,
Arnd Bergmann, David Woodhouse, Rafael J. Wysocki,
Thomas Gleixner, Matthew Minter, Lorenzo Pieralisi
[+cc Arnd, Rafael, Thomas, Matthew, Lorenzo]
On Tue, Dec 05, 2017 at 02:39:20PM -0600, Bjorn Helgaas wrote:
> [+cc Sinan]
>
> On Tue, Nov 28, 2017 at 02:31:21PM -0800, Randy Dunlap wrote:
> > From: Randy Dunlap <rdunlap@infradead.org>
> >
> > The coretemp driver build fails when CONFIG_PCI is not enabled
> > because it uses a function that does not have a stub for that
> > config case, so add the function stub.
> >
> > ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax':
> > ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration]
> > struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
> > ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default]
> > struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn);
> >
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>
> Applied with Guenter's ack to pci/enumeration for v4.16, thanks!
>
> Apparently no other code calls pci_get_domain_bus_and_slot() when
> CONFIG_PCI isn't enabled.
>
> 15ab6790f628 ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()") is
> already in linux-next via hwmon-staging.
>
> The pci tree is merged into next slightly before hwmon-staging, so
> this should be resolved as soon as the 0-day builder builds my
> pci/enumeration branch and I merge it into my next branch.
On Arnd's advice, I moved this to for-linus for v4.15 in case any of
the conversion patches get merged before PCI during the v4.16 merge
window.
> > ---
> > include/linux/pci.h | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > --- linux-next-20171128.orig/include/linux/pci.h
> > +++ linux-next-20171128/include/linux/pci.h
> > @@ -1660,6 +1660,9 @@ static inline struct pci_dev *pci_get_sl
> > 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; }
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-06 21:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-28 22:31 [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot() Randy Dunlap
2017-11-28 23:17 ` Guenter Roeck
2017-12-05 20:39 ` Bjorn Helgaas
2017-12-05 20:50 ` Sinan Kaya
2017-12-06 21:02 ` Bjorn Helgaas
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.