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


Groups > linux.kernel > #1282787

[PATCH] of: fix build failure

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] of: fix build failure
Date Thu, 03 Dec 2015 09:40:02 +0100
Message-ID <qBxAK-2vK-7@gated-at.bofh.it> (permalink)
References <qBqIW-6yl-9@gated-at.bofh.it>
X-Original-To Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Grant Likely <grant.likely@linaro.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MTIWY5yXPxM6hMPWZhpzOWdujWpVEubgXlmsIozsTYM=; b=KFLjrH9pgdDujiES7ueqxi6am8KxzMfCpYSdA+5arFL4PHuDIOd7V764sm6HZjzHL7 orhDEznnh/HA47HFgwfUoIu+nqnemzuIbBiiaTiXms6v9kT450z6sDna964MwrP7cVRJ itT1aSJRCJxrArOCXun1Li6FGkk9lDcclvg0dSYIiHuAA5Knxp/A8swkv5GFUJFJGuAQ OsVOUWeydU64zt8x3ddsRqTncarOWg4qY8iPrV91hGZVBNzoLq2/ZnsFOreAvKe5dmdZ UqKdHgxe997N6DqAhTzjWgWztWcbcKIV2y+9ZSeJLk7Lf4WpljOZjBEPIfe8R8NuRGFZ JEZA==
X-Received by 10.98.43.67 with SMTP id r64mr11394746pfr.3.1449131898917; Thu, 03 Dec 2015 00:38:18 -0800 (PST)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 61
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Thu, 3 Dec 2015 14:08:10 +0530
X-Original-Message-ID <1449131890-21675-1-git-send-email-sudipm.mukherjee@gmail.com>
X-Original-References <20151203011814.GC5727@sirena.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1282787

Show key headers only | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

linux-next: Tree for 2nd December Mark Brown <broonie@kernel.org> - 2015-12-03 02:20 +0100
  [PATCH] of: fix build failure Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 09:40 +0100
    Re: [PATCH] of: fix build failure Geert Uytterhoeven <geert@linux-m68k.org> - 2015-12-05 12:10 +0100
      Re: [PATCH] of: fix build failure Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-07 07:40 +0100

csiph-web