Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754915AbXEBHWt (ORCPT ); Wed, 2 May 2007 03:22:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754909AbXEBHWt (ORCPT ); Wed, 2 May 2007 03:22:49 -0400 Received: from smtp-out.google.com ([216.239.45.13]:13720 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754753AbXEBHWr (ORCPT ); Wed, 2 May 2007 03:22:47 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:date:from:x-x-sender:to:cc:subject:in-reply-to: message-id:references:mime-version:content-type; b=Xh3SxKBafFPDtmstVkQVr4cAprro9HfeIZfulCT/sqJKuONrYnbjxvSACgKVf0HRy 5G3sjdTGdmamct0++aKsw== Date: Wed, 2 May 2007 00:22:24 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Rusty Russell cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [patch 01/10] compiler: define __attribute_unused__ In-Reply-To: <1178089444.28659.246.camel@localhost.localdomain> Message-ID: References: <1178084403.28659.222.camel@localhost.localdomain> <1178087393.28659.238.camel@localhost.localdomain> <1178089444.28659.246.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1034 Lines: 22 On Wed, 2 May 2007, Rusty Russell wrote: > That sounds exactly right to me! If the author says it's optional, it > might be discarded. If they say it's needed, it won't be. At least, > when I'm coding and gcc warns me something is unused, this is the > decision I have to make ("is this really needed or not?"). > Hi Rusty, There are many instances in the tree of functions that have no callers whatsoever because they've been commented out temporarily, disabled through configuration, etc. These are marked __attribute__ ((unused)) right now so that the compiler doesn't emit a warning (and with gcc >=3.4 it doesn't even emit code for them). What's __optional about these functions if they have no callers? They're unused. So we cover all our bases with __maybe_unused. - 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/