From: Andi Kleen <ak@muc.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: James.Bottomley@SteelEye.com, Kai.Makisara@kolumbus.fi,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Add compat_ioctl to st
Date: 18 Jan 2005 12:26:35 +0100
Date: Tue, 18 Jan 2005 12:26:35 +0100 [thread overview]
Message-ID: <20050118112635.GL43344@muc.de> (raw)
In-Reply-To: <20050118112357.GA26306@infradead.org>
On Tue, Jan 18, 2005 at 11:23:57AM +0000, Christoph Hellwig wrote:
> > +#ifdef CONFIG_COMPAT
> > +static int st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> > +{
> > + struct scsi_tape *STp = file->private_data;
> > + struct scsi_device *sdev = STp->device;
> > + int ret = -ENOIOCTLCMD;
> > + if (sdev->host->hostt->compat_ioctl) {
> > +
> > + ret = sdev->host->hostt->compat_ioctl(sdev, cmd, arg);
>
> This seems to miss a cast for arg. Also I think it would be really nice
> to have a little helper like:
Hmm, yes.
Well, there are so many warnings in the code currently anyways
that one more won't really hurt ;-)
>
> int scsi_compat_ioctl(struct scsi_device *sdev, unsigned int cmd,
> unsiged long arg)
> {
> struct scsi_host_template *hostt = sdev->host->hostt;
> if (hostt->compat_ioctl)
> return hostt->compat_ioctl(sdev, cmd, (void __user *)arg);
> return -ENOIOCTLCMD;
> }
>
> that all drivers could use.
I don't think this makes sense for three lines of code.
-Andi
next prev parent reply other threads:[~2005-01-18 11:26 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 [this message]
2005-01-18 12:25 ` Matthew Wilcox
2005-01-18 12:30 ` Andi Kleen
2005-01-18 12:54 ` Matthew Wilcox
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=20050118112635.GL43344@muc.de \
--to=ak@muc.de \
--cc=James.Bottomley@SteelEye.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=hch@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.