Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760707AbXJMRmj (ORCPT ); Sat, 13 Oct 2007 13:42:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756694AbXJMRmb (ORCPT ); Sat, 13 Oct 2007 13:42:31 -0400 Received: from usul.saidi.cx ([204.11.33.34]:59673 "EHLO usul.overt.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756649AbXJMRma (ORCPT ); Sat, 13 Oct 2007 13:42:30 -0400 Message-ID: <47110379.10000@overt.org> Date: Sat, 13 Oct 2007 10:42:17 -0700 From: Philip Langdale User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Al Viro CC: Jiri Kosina , LKML Subject: Re: [PATCH] hiddev: Add 32bit ioctl compatibilty References: <47100864.2090208@overt.org> <20071013000221.GC8181@ftp.linux.org.uk> In-Reply-To: <20071013000221.GC8181@ftp.linux.org.uk> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Do-Not-RunX1: Yes Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1126 Lines: 27 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/