Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030351AbXEBHrx (ORCPT ); Wed, 2 May 2007 03:47:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030847AbXEBHrx (ORCPT ); Wed, 2 May 2007 03:47:53 -0400 Received: from nic.NetDirect.CA ([216.16.235.2]:33400 "EHLO rubicon.netdirect.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030351AbXEBHrv (ORCPT ); Wed, 2 May 2007 03:47:51 -0400 X-Originating-Ip: 74.109.98.66 Date: Wed, 2 May 2007 03:47:26 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: David Rientjes cc: Alexey Dobriyan , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [patch 01/10] compiler: define __attribute_unused__ In-Reply-To: Message-ID: References: <20070502051723.GB5843@martell.zuzino.mipt.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Net-Direct-Inc-MailScanner-Information: Please contact the ISP for more information X-Net-Direct-Inc-MailScanner: Found to be clean X-Net-Direct-Inc-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-36.8, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -15.00, INIT_RECVD_OUR_AUTH -20.00) X-Net-Direct-Inc-MailScanner-From: rpjday@mindspring.com Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1758 Lines: 50 On Wed, 2 May 2007, David Rientjes wrote: > On Wed, 2 May 2007, Robert P. J. Day wrote: > > > not only that, but there are numerous files that *already* use > > "__unused": > > > > $ grep -rw __unused * > > ... snip lots of output here ... > > > > as well as a few files that can now have their definition of that > > removed: > > > > $ grep -r "define __unused" * > > drivers/net/defxx.c:#define __unused __attribute__ ((unused)) > > drivers/net/declance.c:#define __unused __attribute__ ((unused)) > > drivers/misc/thinkpad_acpi.c:#define __unused __attribute__ ((unused)) > > > > i think "__unused" is the clear choice here. > > > > No, it's not the clear choice. This would apply to both functions > and variables so the suppress a compiler warning for a variable > whose use depends on preprocessor macros, I would have to use > __unused even though it may be used. > > Hence, I recommend __maybe_unused. sorry, i worded that badly. i suggested that "__unused" was the clear choice only because it already had significant historical precedent and people on this list are notorious for not liking major, disruptive changes. if no one objects to changing the existing occurrences, then no problem. rday -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page ======================================================================== - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/