* [PATCH] of: add stub for of_n_addr_cells @ 2017-03-24 10:39 Tobias Regnery [not found] ` <20170324103940.30902-1-tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Tobias Regnery @ 2017-03-24 10:39 UTC (permalink / raw) To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: horms-/R6kz+dDXgpPR4JQBCEnsQ, Tobias Regnery With CONFIG_OF=n and CONFIG_COMPILE_TEST=y the rcar pci-e driver fails to build on arm: drivers/pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init': drivers/pci/host/pcie-rcar.c:1035:16: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration] parser->pna = of_n_addr_cells(node); ^~~~~~~~~~~~~~~ Fix this by adding an inline stub for of_n_addr_cells Signed-off-by: Tobias Regnery <tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- This is against next-20140324 include/linux/of.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/of.h b/include/linux/of.h index 21e6323de0f3..9978c918222e 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -710,6 +710,11 @@ static inline struct device_node *of_get_cpu_node(int cpu, return NULL; } +static inline int of_n_addr_cells(struct device_node *np) +{ + return 0; +} + static inline int of_property_read_u64(const struct device_node *np, const char *propname, u64 *out_value) { -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <20170324103940.30902-1-tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] of: add stub for of_n_addr_cells [not found] ` <20170324103940.30902-1-tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-03-24 21:23 ` Arnd Bergmann [not found] ` <CAK8P3a3ojRSpC3GVU6P05GEtj7AHxrYD_ZrAZaa68KT14H9Hew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Arnd Bergmann @ 2017-03-24 21:23 UTC (permalink / raw) To: Tobias Regnery Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA, Linux Kernel Mailing List, Simon Horman On Fri, Mar 24, 2017 at 11:39 AM, Tobias Regnery <tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > With CONFIG_OF=n and CONFIG_COMPILE_TEST=y the rcar pci-e driver fails to > build on arm: > > drivers/pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init': > drivers/pci/host/pcie-rcar.c:1035:16: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration] > parser->pna = of_n_addr_cells(node); > ^~~~~~~~~~~~~~~ > > Fix this by adding an inline stub for of_n_addr_cells > > Signed-off-by: Tobias Regnery <tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > --- > This is against next-20140324 > > include/linux/of.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/of.h b/include/linux/of.h > index 21e6323de0f3..9978c918222e 100644 > --- a/include/linux/of.h > +++ b/include/linux/of.h > @@ -710,6 +710,11 @@ static inline struct device_node *of_get_cpu_node(int cpu, > return NULL; > } > > +static inline int of_n_addr_cells(struct device_node *np) > +{ > + return 0; > +} > + This looks good, but we should also do the same thing for of_n_size_cells(). I think I sent something like this a few years ago, but never resubmitted it when it was ignored at first. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAK8P3a3ojRSpC3GVU6P05GEtj7AHxrYD_ZrAZaa68KT14H9Hew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] of: add stub for of_n_addr_cells [not found] ` <CAK8P3a3ojRSpC3GVU6P05GEtj7AHxrYD_ZrAZaa68KT14H9Hew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-03-27 5:54 ` Tobias Regnery 2017-03-27 7:31 ` Arnd Bergmann 0 siblings, 1 reply; 4+ messages in thread From: Tobias Regnery @ 2017-03-27 5:54 UTC (permalink / raw) To: Arnd Bergmann Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, horms-/R6kz+dDXgpPR4JQBCEnsQ On 24.03.17, Arnd Bergmann wrote: > On Fri, Mar 24, 2017 at 11:39 AM, Tobias Regnery > <tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > With CONFIG_OF=n and CONFIG_COMPILE_TEST=y the rcar pci-e driver fails to > > build on arm: > > > > drivers/pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init': > > drivers/pci/host/pcie-rcar.c:1035:16: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration] > > parser->pna = of_n_addr_cells(node); > > ^~~~~~~~~~~~~~~ > > > > Fix this by adding an inline stub for of_n_addr_cells > > > > Signed-off-by: Tobias Regnery <tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > --- > > This is against next-20140324 > > > > include/linux/of.h | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/include/linux/of.h b/include/linux/of.h > > index 21e6323de0f3..9978c918222e 100644 > > --- a/include/linux/of.h > > +++ b/include/linux/of.h > > @@ -710,6 +710,11 @@ static inline struct device_node *of_get_cpu_node(int cpu, > > return NULL; > > } > > > > +static inline int of_n_addr_cells(struct device_node *np) > > +{ > > + return 0; > > +} > > + > > This looks good, but we should also do the same thing for of_n_size_cells(). > > I think I sent something like this a few years ago, but never resubmitted it > when it was ignored at first. > > Arnd This seems sensible, I can send an updated patch with this change or I can send it as a separate patch, whatever the maintainers prefer. -- Tobias -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] of: add stub for of_n_addr_cells 2017-03-27 5:54 ` Tobias Regnery @ 2017-03-27 7:31 ` Arnd Bergmann 0 siblings, 0 replies; 4+ messages in thread From: Arnd Bergmann @ 2017-03-27 7:31 UTC (permalink / raw) To: Tobias Regnery Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA, Linux Kernel Mailing List, Simon Horman On Mon, Mar 27, 2017 at 7:54 AM, Tobias Regnery <tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On 24.03.17, Arnd Bergmann wrote: >> > >> > +static inline int of_n_addr_cells(struct device_node *np) >> > +{ >> > + return 0; >> > +} >> > + >> >> This looks good, but we should also do the same thing for of_n_size_cells(). >> >> I think I sent something like this a few years ago, but never resubmitted it >> when it was ignored at first. >> >> Arnd > > This seems sensible, I can send an updated patch with this change or I can > send it as a separate patch, whatever the maintainers prefer. I'd recommend sending an updated patch. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-27 7:31 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-24 10:39 [PATCH] of: add stub for of_n_addr_cells Tobias Regnery [not found] ` <20170324103940.30902-1-tobias.regnery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-03-24 21:23 ` Arnd Bergmann [not found] ` <CAK8P3a3ojRSpC3GVU6P05GEtj7AHxrYD_ZrAZaa68KT14H9Hew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-03-27 5:54 ` Tobias Regnery 2017-03-27 7:31 ` Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).