* [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison
@ 2005-11-12 21:29 Gabriel A. Devenyi
2005-11-12 22:19 ` Alexey Dobriyan
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel A. Devenyi @ 2005-11-12 21:29 UTC (permalink / raw)
To: markus.lidel; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison
2005-11-12 21:29 [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison Gabriel A. Devenyi
@ 2005-11-12 22:19 ` Alexey Dobriyan
2005-11-12 22:13 ` Gabriel A. Devenyi
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2005-11-12 22:19 UTC (permalink / raw)
To: Gabriel A. Devenyi; +Cc: markus.lidel, linux-kernel
On Sat, Nov 12, 2005 at 04:29:54PM -0500, Gabriel A. Devenyi wrote:
> --- a/drivers/message/i2o/i2o_block.c
> +++ b/drivers/message/i2o/i2o_block.c
> static int i2o_block_ioctl(struct inode *inode, struct file *file,
> - unsigned int cmd, unsigned long arg)
> + unsigned int cmd, long arg)
> {
Don't you see this?
CC drivers/message/i2o/i2o_block.o
drivers/message/i2o/i2o_block.c:961: warning: initialization from incompatible pointer type
->ioctl method takes "unsigned long arg".
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison
2005-11-12 22:19 ` Alexey Dobriyan
@ 2005-11-12 22:13 ` Gabriel A. Devenyi
0 siblings, 0 replies; 3+ messages in thread
From: Gabriel A. Devenyi @ 2005-11-12 22:13 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: markus.lidel, linux-kernel
On November 12, 2005 17:19, Alexey Dobriyan wrote:
> Don't you see this?
*turns red* I just checked for a compile error, sorry.
> CC drivers/message/i2o/i2o_block.o
> drivers/message/i2o/i2o_block.c:961: warning: initialization from incompatible pointer type
>
> ->ioctl method takes "unsigned long arg".
So should this comparasion arg < 0 simply be removed? Its meaningless if arg is unsigned.
--
Gabriel A. Devenyi
ace@staticwave.ca
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-12 22:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-12 21:29 [PATCH] drivers/message/i2o/i2o_block.c unsigned comparison Gabriel A. Devenyi
2005-11-12 22:19 ` Alexey Dobriyan
2005-11-12 22:13 ` Gabriel A. Devenyi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox