mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: remove '##' usage
Date: Mon, 10 Nov 2008 07:02:47 -0500	[thread overview]
Message-ID: <20081110120247.GA30377@infradead.org> (raw)
In-Reply-To: <20081109223542.GA16813@x200.localdomain>

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.


      reply	other threads:[~2008-11-10 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 22:35 Alexey Dobriyan
2008-11-10 12:02 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081110120247.GA30377@infradead.org \
    --to=hch@infradead.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®