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


Groups > linux.kernel > #1309151

Re: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules
Date 2016-01-14 11:20 +0100
Message-ID <qQNax-5z6-13@gated-at.bofh.it> (permalink)
References <qQHRv-1IE-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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, so the compiler will automatically
drop all code that is only referenced from the entry.

	Arnd

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


Thread

[PATCH] of: drop symbols declared by _OF_DECLARE() from modules Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-01-14 05:40 +0100
  Re: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules Arnd Bergmann <arnd@arndb.de> - 2016-01-14 11:20 +0100
    Re: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-01-14 11:30 +0100
      Re: [PATCH] of: drop symbols declared by _OF_DECLARE() from modules Arnd Bergmann <arnd@arndb.de> - 2016-01-14 11:30 +0100

csiph-web