lkml.org 
[lkml]   [2008]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2008-11-10 13:05    [W:0.030 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site