Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608307 > unrolled thread

[PATCH] of: add stub for of_n_addr_cells

Started byTobias Regnery <tobias.regnery@gmail.com>
First post2017-03-24 11:50 +0100
Last post2017-03-27 09:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] of: add stub for of_n_addr_cells Tobias Regnery <tobias.regnery@gmail.com> - 2017-03-24 11:50 +0100
    Re: [PATCH] of: add stub for of_n_addr_cells Arnd Bergmann <arnd@arndb.de> - 2017-03-24 22:30 +0100
      Re: [PATCH] of: add stub for of_n_addr_cells Tobias Regnery <tobias.regnery@gmail.com> - 2017-03-27 08:10 +0200
        Re: [PATCH] of: add stub for of_n_addr_cells Arnd Bergmann <arnd@arndb.de> - 2017-03-27 09:40 +0200

#1608307 — [PATCH] of: add stub for of_n_addr_cells

FromTobias Regnery <tobias.regnery@gmail.com>
Date2017-03-24 11:50 +0100
Subject[PATCH] of: add stub for of_n_addr_cells
Message-ID<touX8-gm-13@gated-at.bofh.it>
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@gmail.com>
---
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

[toc] | [next] | [standalone]


#1608980

FromArnd Bergmann <arnd@arndb.de>
Date2017-03-24 22:30 +0100
Message-ID<toEWu-7xX-13@gated-at.bofh.it>
In reply to#1608307
On Fri, Mar 24, 2017 at 11:39 AM, Tobias Regnery
<tobias.regnery@gmail.com> 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@gmail.com>
> ---
> 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

[toc] | [prev] | [next] | [standalone]


#1609479

FromTobias Regnery <tobias.regnery@gmail.com>
Date2017-03-27 08:10 +0200
Message-ID<tpw0N-3AA-7@gated-at.bofh.it>
In reply to#1608980
On 24.03.17, Arnd Bergmann wrote:
> On Fri, Mar 24, 2017 at 11:39 AM, Tobias Regnery
> <tobias.regnery@gmail.com> 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@gmail.com>
> > ---
> > 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

[toc] | [prev] | [next] | [standalone]


#1609529

FromArnd Bergmann <arnd@arndb.de>
Date2017-03-27 09:40 +0200
Message-ID<tpxpU-4s4-17@gated-at.bofh.it>
In reply to#1609479
On Mon, Mar 27, 2017 at 7:54 AM, Tobias Regnery
<tobias.regnery@gmail.com> 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web