From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: devicetree@vger.kernel.org
Cc: Peter Hurley <peter@hurleysoftware.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
Rob Herring <robh@kernel.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Frank Rowand <frowand.list@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>
Subject: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules
Date: Thu, 14 Jan 2016 13:33:06 +0900 [thread overview]
Message-ID: <1452745987-22146-1-git-send-email-yamada.masahiro@socionext.com> (raw)
The users of this macro (OF_EARLYCON_DECLARE, CLK_OF_DECLARE,
IRQCHIP_DECLARE, etc.) are only parsed in the early boot stage.
Such symbols contained in modules are never used.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
OF_EARLYCON_DECLARE() is declared in several tristate drivers.
This patch makes each low-level driver be free from
taking care of it.
See this patch
https://patchwork.kernel.org/patch/8028771/
include/linux/of.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index dd10626..dc6e396 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -929,7 +929,7 @@ static inline int of_get_available_child_count(const struct device_node *np)
return num;
}
-#ifdef CONFIG_OF
+#if defined(CONFIG_OF) && !defined(MODULE)
#define _OF_DECLARE(table, name, compat, fn, fn_type) \
static const struct of_device_id __of_table_##name \
__used __section(__##table##_of_table) \
--
1.9.1
next reply other threads:[~2016-01-14 4:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 4:33 Masahiro Yamada [this message]
2016-01-14 10:14 ` [PATCH] of: drop symbols declared by _OF_DECLARE() from modules Arnd Bergmann
2016-01-14 10:21 ` Masahiro Yamada
[not found] ` <CAK7LNATQB1ZBHM26HGSb=hHYsjROppAaOfWGE+M6TvadR71JQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-14 10:23 ` 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=1452745987-22146-1-git-send-email-yamada.masahiro@socionext.com \
--to=yamada.masahiro@socionext.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=robh+dt@kernel.org \
--cc=robh@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