From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: linux-next: manual merge of the cleancache tree with Linus' tree Date: Wed, 23 Mar 2011 23:42:24 -0700 Message-ID: <20110323234224.f4ceebd4.akpm@linux-foundation.org> References: <20110324135524.261bb5a9.sfr@canb.auug.org.au> <20110323205615.6984f974.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:55971 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932157Ab1CXGqH (ORCPT ); Thu, 24 Mar 2011 02:46:07 -0400 In-Reply-To: Sender: linux-next-owner@vger.kernel.org List-ID: To: Minchan Kim Cc: Stephen Rothwell , Dan Magenheimer , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Linus On Thu, 24 Mar 2011 14:58:06 +0900 Minchan Kim wrote: > Dan, one more thing. > > #define cleancache_fs_enabled_mapping(_mapping) \ > (mapping->host->i_sb->cleancache_poolid >= 0) > > One is "_mapping", another is "mapping" It should be implemented in C too. This is the case for almost all "functions" which are implemented as macros and it's rather a mystery why we keep on typing #define! It is not only for cleanliness and for typechecking, but also because constructs such as { struct address_space *foo = ...; if (cleancache_fs_enabled_mapping(foo)) ...; } will generate an unused-var warning against `foo' if CONFIG_CLEANCACHE=n. Implementing the function in C fixes that. With current gcc, anyway.