From: Tobias Regnery <tobias.regnery@gmail.com>
To: robh+dt@kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: horms@verge.net.au, arnd@arndb.de,
Tobias Regnery <tobias.regnery@gmail.com>
Subject: [PATCH v2] of: add stubs for of_n_{addr, size}_cells
Date: Tue, 28 Mar 2017 11:37:42 +0200 [thread overview]
Message-ID: <20170328093742.21528-1-tobias.regnery@gmail.com> (raw)
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
next reply other threads:[~2017-03-28 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 9:37 Tobias Regnery [this message]
2017-03-28 12:38 ` [PATCH v2] of: add stubs for of_n_{addr, size}_cells Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170328093742.21528-1-tobias.regnery@gmail.com \
--to=tobias.regnery@gmail.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=horms@verge.net.au \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).