From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Grant Likely <grant.likely@linaro.org>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Mark Brown <broonie@kernel.org>,
linux-next@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH] of: fix build failure
Date: Thu, 3 Dec 2015 14:08:10 +0530 [thread overview]
Message-ID: <1449131890-21675-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <20151203011814.GC5727@sirena.org.uk>
We are having build failure with next-20151202 for sparc allmodconfig
with the error messages:
undefined reference to 'of_io_request_and_map'
CONFIG_OF is defined for sparc so it is expected that we have a
definition of of_io_request_and_map() but of/address.c is only compiled
if it is !SPARC.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
build log is at:
https://travis-ci.org/sudipm-mukherjee/parport/builds/94541627
patch has been build tested with sparc allmodconfig and x86_64
allmodconfig.
include/linux/of_address.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 507daad..7bf4603 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -112,8 +112,6 @@ static inline bool of_dma_is_coherent(struct device_node *np)
extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r);
void __iomem *of_iomap(struct device_node *node, int index);
-void __iomem *of_io_request_and_map(struct device_node *device,
- int index, const char *name);
#else
#include <linux/io.h>
@@ -136,6 +134,19 @@ static inline void __iomem *of_io_request_and_map(struct device_node *device,
}
#endif
+#if defined(CONFIG_OF) && !defined(CONFIG_SPARC)
+void __iomem *of_io_request_and_map(struct device_node *device,
+ int index, const char *name);
+#else
+#include <linux/io.h>
+
+static inline void __iomem *of_io_request_and_map(struct device_node *device,
+ int index, const char *name)
+{
+ return IOMEM_ERR_PTR(-EINVAL);
+}
+#endif /* CONFIG_OF && !CONFIG_SPARC */
+
#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI)
extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no,
u64 *size, unsigned int *flags);
--
1.9.1
next parent reply other threads:[~2015-12-03 8:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20151203011814.GC5727@sirena.org.uk>
2015-12-03 8:38 ` Sudip Mukherjee [this message]
2015-12-05 11:09 ` [PATCH] of: fix build failure Geert Uytterhoeven
2015-12-07 6:36 ` Sudip Mukherjee
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=1449131890-21675-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@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).