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] [day] [month] [year] [list]
Message-ID: <20081110120247.GA30377@infradead.org>
Date:	Mon, 10 Nov 2008 07:02:47 -0500
From:	Christoph Hellwig <hch@...radead.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: remove '##' usage

On Mon, Nov 10, 2008 at 01:35:42AM +0300, Alexey Dobriyan wrote:
> +#define DIR(NAME, MODE, iops, fops)	\
> +	NOD(NAME, (S_IFDIR|(MODE)), &iops, &fops, {} )

This macro certainly doesn't help with readability, adding just
and S_IFDIR to the passed in arguments.

> +#define LNK(NAME, get_link)					\
>  	NOD(NAME, (S_IFLNK|S_IRWXUGO),				\
>  		&proc_pid_link_inode_operations, NULL,		\
> +		{ .proc_get_link = get_link } )
> +#define REG(NAME, MODE, fops)				\
> +	NOD(NAME, (S_IFREG|(MODE)), NULL, &fops, {})
> +#define INF(NAME, MODE, read)				\
>  	NOD(NAME, (S_IFREG|(MODE)), 			\
>  		NULL, &proc_info_file_operations,	\
> +		{ .proc_read = read } )
> +#define ONE(NAME, MODE, show)				\
>  	NOD(NAME, (S_IFREG|(MODE)), 			\
>  		NULL, &proc_single_file_operations,	\
> +		{ .proc_show = show } )

And even for these I would argue just opencoding them would be
a lot cleaner.

--
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