public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gabriel A. Devenyi" <ace@staticwave.ca>
To: markus.lidel@shadowconnect.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison
Date: Sat, 12 Nov 2005 16:29:54 -0500	[thread overview]
Message-ID: <200511121629.54699.ace@staticwave.ca> (raw)

In i2o_block_ioctl, the parameter arg is declared an unsigned long, but then compared < 0, which is meaningless.
This redefines arg as a long, so that comparison is meaningful.

Thanks to LinuxICC (http://linuxicc.sf.net)

Signed-off-by: Gabriel A. Devenyi <ace@staticwave.ca>

diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index f283b5b..6bd8083 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -670,7 +670,7 @@ static int i2o_block_release(struct inod
  *	Return 0 on success or negative error on failure.
  */
 static int i2o_block_ioctl(struct inode *inode, struct file *file,
-			   unsigned int cmd, unsigned long arg)
+			   unsigned int cmd, long arg)
 {
 	struct gendisk *disk = inode->i_bdev->bd_disk;
 	struct i2o_block_device *dev = disk->private_data;


-- 
Gabriel A. Devenyi
ace@staticwave.ca

             reply	other threads:[~2005-11-12 21:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 21:29 Gabriel A. Devenyi [this message]
2005-11-12 22:19 ` [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison Alexey Dobriyan
2005-11-12 22:13   ` Gabriel A. Devenyi

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=200511121629.54699.ace@staticwave.ca \
    --to=ace@staticwave.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.lidel@shadowconnect.com \
    /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