From: Matthew Wilcox <matthew@wil.cx>
To: Andi Kleen <ak@muc.de>
Cc: Matthew Wilcox <matthew@wil.cx>,
James.Bottomley@SteelEye.com, Kai.Makisara@kolumbus.fi,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Add compat_ioctl to st
Date: Tue, 18 Jan 2005 12:54:59 +0000 [thread overview]
Message-ID: <20050118125459.GO30982@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20050118123024.GA68224@muc.de>
On Tue, Jan 18, 2005 at 01:30:24PM +0100, Andi Kleen wrote:
> > How about having a macro ...
> >
> > .ioctl = st_ioctl,
> > COMPAT_IOCTL_ENTRY(st_compat_ioctl)
> > .open = st_open,
> >
> > which could be defined something like:
> >
> > #ifdef CONFIG_COMPAT
> > #define COMPAT_IOCTL_ENTRY(x) .compat_ioctl = x,
> > #else
> > #define COMPAT_IOCTL_ENTRY(x) /* */
> > #endif
>
> To be honest I prefer the ifdef. It makes it clear
> what is going on, without any unneeded abstraction.
> The macro in comparison looks unnatural in the definition
> block.
It would have prevented the mistake you made in sg (which message I only
read after writing this). Another way of managing without ifdefs would
be:
.compat_ioctl = COMPAT_IOCTL_ENTRY(st),
with
#ifdef CONFIG_COMPAT
#define COMPAT_IOCTL_ENTRY(x) x##_compat_ioctl
#else
#define COMPAT_IOCTL_ENTRY(x) NULL
#endif
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
prev parent reply other threads:[~2005-01-18 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-18 11:06 [PATCH] Add compat_ioctl to st Andi Kleen
2005-01-18 11:23 ` Christoph Hellwig
2005-01-18 11:26 ` Andi Kleen
2005-01-18 12:25 ` Matthew Wilcox
2005-01-18 12:30 ` Andi Kleen
2005-01-18 12:54 ` Matthew Wilcox [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=20050118125459.GO30982@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=James.Bottomley@SteelEye.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=ak@muc.de \
--cc=linux-scsi@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