Re: linux-next: manual merge of the cleancache tree with Linus' tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Mar 2011 14:58:06 +0900 Minchan Kim <minchan.kim@xxxxxxxxx> 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.		
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux