cciss: cleans up warnings in the 32/64 bit conversions
Subsystems (2)
PATCH 1/2 cciss: cleans up warnings in the 32/64 bit conversions
Patch 1 of 2 for 20041021.
This patch cleans up some warnings in the 32-bit to 64-bit conversions. Please consider this for inclusion. Built against 2.4.28-pre4. Please apply in order.
cciss.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
Signed off by Mike Miller.
-------------------------------------------------------------------------------
drivers/block/cciss.c +4 -5
@@ -532,10 +532,9 @@ register_ioctl32_conversion(unsigned intextern int unregister_ioctl32_conversion (unsigned int cmd);static int cciss_ioctl32_passthru (unsigned int fd,unsigned cmd,unsigned long arg,struct file *file); -static int cciss_ioctl32_big_passthru (unsigned int fd,unsigned cmd,unsigned long arg, -struct file *file); +static int cciss_ioctl32_big_passthru (unsigned int fd,unsigned cmd,unsigned long arg,struct file *file); -typedef long (*handler_type ) (unsigned int ,unsigned int ,unsigned long , +typedef int (*handler_type ) (unsigned int ,unsigned int ,unsigned long ,struct file *); static struct ioctl32_map {
@@ -611,7 +610,7 @@ int cciss_ioctl32_passthru(unsigned int err |=copy_from_user (&arg64.Request, &arg32->Request,sizeof (arg64.Request)); err |=copy_from_user (&arg64.error_info, &arg32->error_info,sizeof (arg64.error_info)); err |=get_user (arg64.buf_size, &arg32->buf_size); - err |=get_user (arg64.buf, &arg32->buf); + err |=get_user ((__u64 ) arg64.buf, &arg32->buf);if (err)return -EFAULT ;
@@ -641,7 +640,7 @@ int cciss_ioctl32_big_passthru(unsigned err |=copy_from_user (&arg64.error_info, &arg32->error_info,sizeof (arg64.error_info)); err |=get_user (arg64.buf_size, &arg32->buf_size); err |=get_user (arg64.malloc_size, &arg32->malloc_size); - err |=get_user (arg64.buf, &arg32->buf); + err |=get_user ((__u64 ) arg64.buf, &arg32->buf);if (err)return -EFAULT ; old_fs =get_fs ();set_fs (KERNEL_DS );
Quoted 10 lines · On Thu, 21 Oct 2004 [email protected] wrote:
drivers/block/cciss.c +1
-1@@ -611,7 +610,7 @@ int cciss_ioctl32_passthru(unsigned int err |=copy_from_user (&arg64.Request, &arg32->Request,sizeof (arg64.Request)); err |=copy_from_user (&arg64.error_info, &arg32->error_info,sizeof (arg64.error_info)); err |=get_user (arg64.buf_size, &arg32->buf_size); - err |=get_user (arg64.buf, &arg32->buf); + err |=get_user ((__u64 ) arg64.buf, &arg32->buf);if (err)return -EFAULT ;
drivers/block/cciss.c int cciss_ioctl32_big_passthru(unsigned · line 646
Quoted 8 lines
drivers/block/cciss.c +1
-1@@ -641,7 +640,7 @@ int cciss_ioctl32_big_passthru(unsigned err |=copy_from_user (&arg64.error_info, &arg32->error_info,sizeof (arg64.error_info)); err |=get_user (arg64.buf_size, &arg32->buf_size); err |=get_user (arg64.malloc_size, &arg32->malloc_size); - err |=get_user (arg64.buf, &arg32->buf); + err |=get_user ((__u64 ) arg64.buf, &arg32->buf);if (err)return -EFAULT ; old_fs =get_fs ();set_fs (KERNEL_DS );
These constructs (casts as lvalues) are deprecated with GCC 3.4 (a
warning is triggered) and no longer supported with 4.0. Please consider rewriting -- you'll probably need an auxiliary variable.
Maciej
Quoted 11 lines · Maciej W. Rozycki
drivers/block/cciss.c int cciss_ioctl32_big_passthru(unsigned · line 646
Quoted 5 lines
drivers/block/cciss.c +1
-1- err |=get_user (arg64.buf, &arg32->buf); + err |=get_user ((__u64 ) arg64.buf, &arg32->buf);if (err)return -EFAULT ; old_fs =get_fs ();set_fs (KERNEL_DS );These constructs (casts as lvalues) are deprecated with GCC 3.4 (a
warning is triggered) and no longer supported with 4.0. Please consider rewriting -- you'll probably need an auxiliary variable.Maciej
Maciej,
Is this documented somewhere?
mikem
Quoted 3 lines · mikem
Quoted 3 lines
These constructs (casts as lvalues) are deprecated with GCC 3.4 (a
warning is triggered) and no longer supported with 4.0. Please consider rewriting -- you'll probably need an auxiliary variable.
[...]
Quoted 1 line
Is this documented somewhere?
Sure:
http://gcc.gnu.org/gcc-3.4/changes.html
http://gcc.gnu.org/gcc-4.0/changes.html
Plus reported zillion of times here and elsewhere.
Maciej
Quoted 4 lines · On Thu, 2004-10-21 at 17:17, [email protected] wrote:
Patch 1 of 2 for 20041021.
This patch cleans up some warnings in the 32-bit to 64-bit conversions. Please consider this for inclusion. Built against 2.4.28-pre4. Please apply in order.
There's something wrong with this patch (it might be a missing prior patch) that's causing it to reject comprehensively.
drivers/block/cciss.c register_ioctl32_conversion(unsigned int · line 537
Quoted 2 lines
drivers/block/cciss.c +1
-1-typedef long (*handler_type) (unsigned int, unsigned int, unsigned long, +typedef int (*handler_type) (unsigned int, unsigned int, unsigned long,
Things like this. handler_type has always been int not long in the source that's currently in the tree.
James
Quoted 9 lines · James Bottomley
Quoted 4 lines · On Thu, 2004-10-21 at 17:17, [email protected] wrote:
Patch 1 of 2 for 20041021.
This patch cleans up some warnings in the 32-bit to 64-bit conversions. Please consider this for inclusion. Built against 2.4.28-pre4. Please apply in order.There's something wrong with this patch (it might be a missing prior patch) that's causing it to reject comprehensively.
Quoted 8 lines
drivers/block/cciss.c register_ioctl32_conversion(unsigned int · line 537
Quoted 2 lines
drivers/block/cciss.c +1
-1-typedef long (*handler_type) (unsigned int, unsigned int, unsigned long, +typedef int (*handler_type) (unsigned int, unsigned int, unsigned long,Things like this.
handler_typehas always been int not long in the source that's currently in the tree.James
Which tree are you applying to? This was made from 2.4.28-pre4.
mikem
Quoted 1 line
Quoted 1 line · mikem
Which tree are you applying to? This was made from 2.4.28-pre4.
OK, you caught me ... trying to apply a 2.4 patch to a 2.6 tree. I keep forgetting that not all patches on linux-scsi are 2.6
James
Quoted 7 lines · James Bottomley
Quoted 1 line · mikem
Which tree are you applying to? This was made from 2.4.28-pre4.
OK, you caught me ... trying to apply a 2.4 patch to a 2.6 tree. I keep forgetting that not all patches on linux-scsi are 2.6
James
I should put the kernel version in the subject.
mikem
Quoted 2 lines
Quoted 8 lines · Maciej W. Rozycki
Quoted 3 lines · mikem
Quoted 3 lines
These constructs (casts as lvalues) are deprecated with GCC 3.4 (a
warning is triggered) and no longer supported with 4.0. Please consider rewriting -- you'll probably need an auxiliary variable.[...]
Quoted 1 line
Is this documented somewhere?
Quoted 7 lines
Sure:
http://gcc.gnu.org/gcc-3.4/changes.html
http://gcc.gnu.org/gcc-4.0/changes.html
Plus reported zillion of times here and elsewhere.
Mike,
Can you fix the warning and resend please?