lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Mar 2011 23:42:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Linus <torvalds@...ux-foundation.org>
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@...il.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.		
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ