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 <redacted>
---
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(-)
Doesn't this lead to "unused function" warnings? Maybe we can change the "__used"
into "__unused" when MODULE is set, so the compiler will automatically
drop all code that is only referenced from the entry.
Arnd
Doesn't this lead to "unused function" warnings? Maybe we can change the "__used"
into "__unused" when MODULE is set,
Yes, this is my intention.
I think this patch does so,
unless I am missing something...
#if defined(CONFIG_OF) && !defined(MODULE)
__used
#else
__unused
#endif
so the compiler will automatically
drop all code that is only referenced from the entry.
On Thursday 14 January 2016 19:21:21 Masahiro Yamada wrote:
Yes, this is my intention.
I think this patch does so,
unless I am missing something...
#if defined(CONFIG_OF) && !defined(MODULE)
__used
#else
__unused
#endif
Ah, got it. You are right, I just missed that because the #else
part was not in the context that I saw in the patch and I was too lazy
to actually look at the file.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Arnd