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


Groups > linux.kernel > #1610496 > unrolled thread

[PATCH v2] of: add stubs for of_n_{addr, size}_cells

Started byTobias Regnery <tobias.regnery@gmail.com>
First post2017-03-28 11:50 +0200
Last post2017-03-28 14:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] of: add stubs for of_n_{addr, size}_cells Tobias Regnery <tobias.regnery@gmail.com> - 2017-03-28 11:50 +0200
    Re: [PATCH v2] of: add stubs for of_n_{addr, size}_cells Arnd Bergmann <arnd@arndb.de> - 2017-03-28 14:50 +0200

#1610496 — [PATCH v2] of: add stubs for of_n_{addr, size}_cells

FromTobias Regnery <tobias.regnery@gmail.com>
Date2017-03-28 11:50 +0200
Subject[PATCH v2] of: add stubs for of_n_{addr, size}_cells
Message-ID<tpVVg-5DA-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

While at it also provide a stub for of_n_size_cells for consistency reasons.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
Changes in v2:
	- add a stub for of_n_size_cells as suggested by Arnd

 include/linux/of.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index 21e6323de0f3..27727355e199 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -710,6 +710,16 @@ 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_n_size_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]


#1610734

FromArnd Bergmann <arnd@arndb.de>
Date2017-03-28 14:50 +0200
Message-ID<tpYJv-7Cs-87@gated-at.bofh.it>
In reply to#1610496
On Tue, Mar 28, 2017 at 11:37 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
>
> While at it also provide a stub for of_n_size_cells for consistency reasons.
>
> Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
> ---
> Changes in v2:
>         - add a stub for of_n_size_cells as suggested by Arnd

Acked-by: Arnd Bergmann <arnd@arndb.de>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web