[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATQB1ZBHM26HGSb=hHYsjROppAaOfWGE+M6TvadR71JQg@mail.gmail.com>
Date: Thu, 14 Jan 2016 19:21:21 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
devicetree@...r.kernel.org,
Peter Hurley <peter@...leysoftware.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
Grant Likely <grant.likely@...aro.org>,
Frank Rowand <frowand.list@...il.com>
Subject: Re: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules
Hi Arnd,
2016-01-14 19:14 GMT+09:00 Arnd Bergmann <arnd@...db.de>:
> On Thursday 14 January 2016 13:33:06 Masahiro Yamada wrote:
>>
>> -#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) \
>> --
>>
>
> 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.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists