[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AEE3E39.4070403@cn.fujitsu.com>
Date: Mon, 02 Nov 2009 10:04:41 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Arjan van de Ven <arjan@...radead.org>
CC: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] compiler: Introduce __always_unused
Arjan van de Ven wrote:
> On Mon, 02 Nov 2009 08:50:52 +0800
> Li Zefan <lizf@...fujitsu.com> wrote:
>
> Hi,
>
>> I wrote some code which is used as compile-time checker, and the
>> code should be elided after compile.
>> +#define __always_unused
>> __attribute__((unused))
>
> I have a suggestion.
> In addition to marking it attribute unused, would it be useful to also
> put a section attribute as part of this, to a section that we can then
> drop from the binary by way of the linker script ?
>
__unused is used to suppress define-but-unused warning. If the
annotated symbol is really unused, it will be optimized out,
so I think we don't need to add a section for this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists