From: Andrew Morton <akpm@linux-foundation.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Dan Magenheimer <dan.magenheimer@oracle.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus <torvalds@linux-foundation.org>
Subject: Re: linux-next: manual merge of the cleancache tree with Linus' tree
Date: Wed, 23 Mar 2011 23:42:24 -0700 [thread overview]
Message-ID: <20110323234224.f4ceebd4.akpm@linux-foundation.org> (raw)
In-Reply-To: <AANLkTimQQHHN6pS17R_mGmF+oG33D3Apb6E_pNvsLHwv@mail.gmail.com>
On Thu, 24 Mar 2011 14:58:06 +0900 Minchan Kim <minchan.kim@gmail.com> 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.
next prev parent reply other threads:[~2011-03-24 6:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 2:55 linux-next: manual merge of the cleancache tree with Linus' tree Stephen Rothwell
2011-03-24 3:56 ` Andrew Morton
2011-03-24 5:38 ` Minchan Kim
2011-03-24 5:58 ` Minchan Kim
2011-03-24 6:42 ` Andrew Morton [this message]
2011-03-24 15:37 ` Dan Magenheimer
2011-04-14 21:04 ` Dan Magenheimer
-- strict thread matches above, loose matches on Subject: below --
2011-02-14 6:17 Stephen Rothwell
2011-01-15 1:44 Stephen Rothwell
2011-01-14 1:12 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110323234224.f4ceebd4.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.magenheimer@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=minchan.kim@gmail.com \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).