Messages in this thread | | | Date | Wed, 23 Mar 2011 23:42:24 -0700 | From | Andrew Morton <> | Subject | Re: linux-next: manual merge of the cleancache tree with Linus' tree |
| |
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.
| |