From: trix@redhat.com
To: robh+dt@kernel.org, frowand.list@gmail.com
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Tom Rix <trix@redhat.com>
Subject: [PATCH] of: remove duplicate declaration of of_iomap()
Date: Tue, 28 Sep 2021 13:12:14 -0700 [thread overview]
Message-ID: <20210928201214.294737-1-trix@redhat.com> (raw)
From: Tom Rix <trix@redhat.com>
A ranconfig produces this linker error
irq-al-fic.c:252: undefined reference to `of_iomap'
The declaration of of_iomap() is dependent on OF
The definition of of_iomap() is dependent on OF_ADDRESS
These should match. There are duplicate declarations
of of_iomap(), remove of_iomap() and the
of_address_to_resource() duplicate.
Signed-off-by: Tom Rix <trix@redhat.com>
---
include/linux/of_address.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 45598dbec269..a190996b4b0b 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -122,13 +122,7 @@ static inline bool of_dma_is_coherent(struct device_node *np)
{
return false;
}
-#endif /* CONFIG_OF_ADDRESS */
-#ifdef CONFIG_OF
-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);
-#else
static inline int of_address_to_resource(struct device_node *dev, int index,
struct resource *r)
{
@@ -139,7 +133,7 @@ static inline void __iomem *of_iomap(struct device_node *device, int index)
{
return NULL;
}
-#endif
+#endif /* CONFIG_OF_ADDRESS */
#define of_range_parser_init of_pci_range_parser_init
static inline const __be32 *of_get_address(struct device_node *dev, int index,
--
2.26.3
next reply other threads:[~2021-09-28 20:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 20:12 trix [this message]
2021-09-28 20:33 ` [PATCH] of: remove duplicate declaration of of_iomap() Randy Dunlap
2021-09-28 20:42 ` Tom Rix
2021-09-29 14:26 ` Rob Herring
2021-09-29 14:58 ` Rob Herring
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=20210928201214.294737-1-trix@redhat.com \
--to=trix@redhat.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--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