public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Andi Kleen <ak@muc.de>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] fix warnings in new compat code for scsi
Date: Thu, 03 Feb 2005 20:39:22 -0600	[thread overview]
Message-ID: <1107484762.5502.41.camel@mulgrave> (raw)

I just got around to applying and testing this.  I needed the attached
to get around the compile warnings it gave me on ia64

I've got to say, it doesn't look pretty to have the block layer
compat_ioctl returning long but the scsi one returning int; likewise
with the void __user *arg vs unsigned long arg.

James

===== drivers/scsi/osst.c 1.68 vs edited =====
--- 1.68/drivers/scsi/osst.c	2005-01-17 22:14:59 -06:00
+++ edited/drivers/scsi/osst.c	2005-02-03 20:16:18 -06:00
@@ -5129,7 +5129,7 @@
 	int ret = -ENOIOCTLCMD;
 	if (sdev->host->hostt->compat_ioctl) {
 
-		ret = sdev->host->hostt->compat_ioctl(sdev, cmd_in, arg);
+		ret = sdev->host->hostt->compat_ioctl(sdev, cmd_in, (void __user *)arg);
 
 	}
 	return ret;
===== drivers/scsi/st.c 1.99 vs edited =====
--- 1.99/drivers/scsi/st.c	2005-01-17 21:50:09 -06:00
+++ edited/drivers/scsi/st.c	2005-02-03 20:16:29 -06:00
@@ -3427,14 +3427,14 @@
 }
 
 #ifdef CONFIG_COMPAT
-static int st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+static long 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);
+		ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg);
 
 	}
 	return ret;
===== drivers/scsi/aacraid/linit.c 1.45 vs edited =====
--- 1.45/drivers/scsi/aacraid/linit.c	2005-01-18 00:58:31 -06:00
+++ edited/drivers/scsi/aacraid/linit.c	2005-02-03 20:21:16 -06:00
@@ -514,10 +514,10 @@
 	return ret;
 }
 
-static long aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
+static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
 {
 	struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
-	return aac_compat_do_ioctl(dev, cmd, arg);
+	return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg);
 }
 
 static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg)



             reply	other threads:[~2005-02-04  2:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-04  2:39 James Bottomley [this message]
2005-02-04  2:54 ` [PATCH] fix warnings in new compat code for scsi Al Viro

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=1107484762.5502.41.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --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