From: Philip Langdale <philipl@overt.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Jiri Kosina <jkosina@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hiddev: Add 32bit ioctl compatibilty
Date: Sat, 13 Oct 2007 10:42:17 -0700 [thread overview]
Message-ID: <47110379.10000@overt.org> (raw)
In-Reply-To: <20071013000221.GC8181@ftp.linux.org.uk>
Al Viro wrote:
>>
>> +static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>> +{
>> + struct inode *inode = file->f_path.dentry->d_inode;
>> + return hiddev_ioctl(inode, file, cmd, compat_ptr(arg));
>> +}
>
> Just how many instances of that sucker do we need? It's nothing but
>
> struct inode *inode = file->f_path.dentry->d_inode;
> return file->f_op->ioctl(inode, file, cmd, compat_ptr(arg));
>
So, I don't actually know what you're looking for, but of the 140 occasions
that .compat_ioctl is implemented in Linus' tree, I can't find another one
that actually uses this form. So, writing a shared implementation doesn't pick
off any low hanging fruit. Now, it's possible that some of the other implementations
could be reduced to this form - but for now, it seems the answer to your question
is 'one' in either case. :-)
--phil
next prev parent reply other threads:[~2007-10-13 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 23:51 [PATCH] hiddev: Add 32bit ioctl compatibilty Philip Langdale
2007-10-13 0:02 ` Al Viro
2007-10-13 17:42 ` Philip Langdale [this message]
2007-10-20 15:50 ` [PATCH] compat_ioctl: introduce generic_compat_ioctl helper Arnd Bergmann
2007-10-20 16:03 ` [PATCH] hiddev: simplify 32bit ioctl compatibilty Arnd Bergmann
2007-10-20 16:11 ` [PATCH] compat_ioctl: introduce generic_compat_ioctl helper Christoph Hellwig
2007-10-20 16:23 ` Arnd Bergmann
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=47110379.10000@overt.org \
--to=philipl@overt.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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