Message ID | 1422712065-9403-2-git-send-email-haokexin@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Michael Ellerman |
Headers | show |
On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: > So we can avoid the ugly #ifdef in some drivers. > > Signed-off-by: Kevin Hao <haokexin@gmail.com> > --- > include/linux/pci.h | 2 ++ > 1 file changed, 2 insertions(+) Hi Bjorn, Do you mind putting this into your next for 3.20? Or giving us an ACK for it if you prefer. cheers > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 8323cbf93913..421eb6a9e600 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1863,6 +1863,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } > static inline void pci_release_of_node(struct pci_dev *dev) { } > static inline void pci_set_bus_of_node(struct pci_bus *bus) { } > static inline void pci_release_bus_of_node(struct pci_bus *bus) { } > +static inline struct device_node * > +pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } > #endif /* CONFIG_OF */ > > #ifdef CONFIG_EEH
On Sun, Feb 1, 2015 at 8:28 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: > On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: >> So we can avoid the ugly #ifdef in some drivers. >> >> Signed-off-by: Kevin Hao <haokexin@gmail.com> >> --- >> include/linux/pci.h | 2 ++ >> 1 file changed, 2 insertions(+) > > > Hi Bjorn, > > Do you mind putting this into your next for 3.20? Or giving us an ACK for it if > you prefer. I think it makes more sense to merge this along with the other 14 patches that remove the #ifdefs (at least, I assume that's what they do; I haven't seen them). Acked-by: Bjorn Helgaas <bhelgaas@google.com> But please edit the subject line so it is capitalized consistently with the rest of the history. And it'd be nice if the changelog were a complete sentence all by itself, e.g., PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF Add a stub for pci_device_to_OF_node() so drivers don't need to use #ifdef CONFIG_OF around calls to it. Bjorn >> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index 8323cbf93913..421eb6a9e600 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -1863,6 +1863,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } >> static inline void pci_release_of_node(struct pci_dev *dev) { } >> static inline void pci_set_bus_of_node(struct pci_bus *bus) { } >> static inline void pci_release_bus_of_node(struct pci_bus *bus) { } >> +static inline struct device_node * >> +pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } >> #endif /* CONFIG_OF */ >> >> #ifdef CONFIG_EEH > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2015-02-02 at 09:47 -0600, Bjorn Helgaas wrote: > On Sun, Feb 1, 2015 at 8:28 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: > > On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: > >> So we can avoid the ugly #ifdef in some drivers. > >> > >> Signed-off-by: Kevin Hao <haokexin@gmail.com> > >> --- > >> include/linux/pci.h | 2 ++ > >> 1 file changed, 2 insertions(+) > > > > > > Hi Bjorn, > > > > Do you mind putting this into your next for 3.20? Or giving us an ACK for it if > > you prefer. > > I think it makes more sense to merge this along with the other 14 > patches that remove the #ifdefs (at least, I assume that's what they > do; I haven't seen them). Yeah that is what they do. The problem with doing it that way is the rest of the patches are splattered all across the tree, so getting them merged as a series will require a lot of searching for acks. If you merged this one for 3.20 we could then merge the rest of the series one at a time as the respective maintainers get around to it during the 3.21 cycle. I probably should have said all that in my original mail :) Anyway it's not a big deal, but that's why it'd be nice if you could take it. cheers
On Mon, Feb 02, 2015 at 09:47:57AM -0600, Bjorn Helgaas wrote: > I think it makes more sense to merge this along with the other 14 > patches that remove the #ifdefs (at least, I assume that's what they > do; I haven't seen them). > > Acked-by: Bjorn Helgaas <bhelgaas@google.com> > > But please edit the subject line so it is capitalized consistently > with the rest of the history. And it'd be nice if the changelog were > a complete sentence all by itself, e.g., > > PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF > > Add a stub for pci_device_to_OF_node() so drivers don't need to use > #ifdef CONFIG_OF around calls to it. Will update. Thanks Bjorn. Kevin
On Mon, Feb 2, 2015 at 6:25 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: > On Mon, 2015-02-02 at 09:47 -0600, Bjorn Helgaas wrote: >> On Sun, Feb 1, 2015 at 8:28 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: >> > On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: >> >> So we can avoid the ugly #ifdef in some drivers. >> >> >> >> Signed-off-by: Kevin Hao <haokexin@gmail.com> >> >> --- >> >> include/linux/pci.h | 2 ++ >> >> 1 file changed, 2 insertions(+) >> > >> > >> > Hi Bjorn, >> > >> > Do you mind putting this into your next for 3.20? Or giving us an ACK for it if >> > you prefer. >> >> I think it makes more sense to merge this along with the other 14 >> patches that remove the #ifdefs (at least, I assume that's what they >> do; I haven't seen them). > > Yeah that is what they do. > > The problem with doing it that way is the rest of the patches are splattered > all across the tree, so getting them merged as a series will require a lot of > searching for acks. > > If you merged this one for 3.20 we could then merge the rest of the series one > at a time as the respective maintainers get around to it during the 3.21 cycle. > > I probably should have said all that in my original mail :) > > Anyway it's not a big deal, but that's why it'd be nice if you could take it. OK, sure, I didn't get the hint that it would be preferable for me to take it. I'll merge it for v3.20. Bjorn
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8323cbf93913..421eb6a9e600 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1863,6 +1863,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } static inline void pci_release_of_node(struct pci_dev *dev) { } static inline void pci_set_bus_of_node(struct pci_bus *bus) { } static inline void pci_release_bus_of_node(struct pci_bus *bus) { } +static inline struct device_node * +pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } #endif /* CONFIG_OF */ #ifdef CONFIG_EEH
So we can avoid the ugly #ifdef in some drivers. Signed-off-by: Kevin Hao <haokexin@gmail.com> --- include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+)