linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
@ 2004-10-21 21:17 mike.miller
  2004-10-22  0:00 ` Maciej W. Rozycki
  2004-10-24 15:54 ` James Bottomley
  0 siblings, 2 replies; 8+ messages in thread
From: mike.miller @ 2004-10-21 21:17 UTC (permalink / raw)
  To: marcelo.tosatti, axboe; +Cc: linux-kernel, linux-scsi

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.
-------------------------------------------------------------------------------
diff -burNp lx2428-pre4.orig/drivers/block/cciss.c lx2428-pre4/drivers/block/cciss.c
--- lx2428-pre4.orig/drivers/block/cciss.c	2004-10-21 09:14:27.388939808 -0500
+++ lx2428-pre4/drivers/block/cciss.c	2004-10-21 09:27:05.810642184 -0500
@@ -532,10 +532,9 @@ register_ioctl32_conversion(unsigned int
 extern 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);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-21 21:17 [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions mike.miller
@ 2004-10-22  0:00 ` Maciej W. Rozycki
  2004-10-22 18:30   ` mikem
  2004-10-24 15:54 ` James Bottomley
  1 sibling, 1 reply; 8+ messages in thread
From: Maciej W. Rozycki @ 2004-10-22  0:00 UTC (permalink / raw)
  To: mikem; +Cc: marcelo.tosatti, axboe, linux-kernel, linux-scsi

On Thu, 21 Oct 2004 mike.miller@hp.com wrote:

> @@ -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);

 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-22  0:00 ` Maciej W. Rozycki
@ 2004-10-22 18:30   ` mikem
  2004-10-22 20:59     ` Maciej W. Rozycki
  0 siblings, 1 reply; 8+ messages in thread
From: mikem @ 2004-10-22 18:30 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: marcelo.tosatti, axboe, linux-kernel, linux-scsi

On Fri, Oct 22, 2004 at 01:00:45AM +0100, Maciej W. Rozycki wrote:
> > -	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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-22 18:30   ` mikem
@ 2004-10-22 20:59     ` Maciej W. Rozycki
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej W. Rozycki @ 2004-10-22 20:59 UTC (permalink / raw)
  To: mikem; +Cc: marcelo.tosatti, axboe, linux-kernel, linux-scsi

On Fri, 22 Oct 2004, mikem wrote:

> >  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.
[...]
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-21 21:17 [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions mike.miller
  2004-10-22  0:00 ` Maciej W. Rozycki
@ 2004-10-24 15:54 ` James Bottomley
  2004-10-26 19:45   ` mikem
  1 sibling, 1 reply; 8+ messages in thread
From: James Bottomley @ 2004-10-24 15:54 UTC (permalink / raw)
  To: mikem; +Cc: marcelo.tosatti, Jens Axboe, Linux Kernel, SCSI Mailing List

On Thu, 2004-10-21 at 17:17, mike.miller@hp.com 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.

> -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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-24 15:54 ` James Bottomley
@ 2004-10-26 19:45   ` mikem
  2004-10-26 19:57     ` James Bottomley
  0 siblings, 1 reply; 8+ messages in thread
From: mikem @ 2004-10-26 19:45 UTC (permalink / raw)
  To: James Bottomley
  Cc: marcelo.tosatti, Jens Axboe, Linux Kernel, SCSI Mailing List

On Sun, Oct 24, 2004 at 11:54:15AM -0400, James Bottomley wrote:
> On Thu, 2004-10-21 at 17:17, mike.miller@hp.com 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.
> 
> > -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
> 

Which tree are you applying to? This was made from 2.4.28-pre4.

mikem

> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-26 19:45   ` mikem
@ 2004-10-26 19:57     ` James Bottomley
  2004-10-26 21:44       ` mikem
  0 siblings, 1 reply; 8+ messages in thread
From: James Bottomley @ 2004-10-26 19:57 UTC (permalink / raw)
  To: mikem; +Cc: marcelo.tosatti, Jens Axboe, Linux Kernel, SCSI Mailing List

On Tue, 2004-10-26 at 15:45, mikem wrote:
> 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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
  2004-10-26 19:57     ` James Bottomley
@ 2004-10-26 21:44       ` mikem
  0 siblings, 0 replies; 8+ messages in thread
From: mikem @ 2004-10-26 21:44 UTC (permalink / raw)
  To: James Bottomley
  Cc: marcelo.tosatti, Jens Axboe, Linux Kernel, SCSI Mailing List

On Tue, Oct 26, 2004 at 03:57:59PM -0400, James Bottomley wrote:
> On Tue, 2004-10-26 at 15:45, mikem wrote:
> > 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

> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-26 21:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-21 21:17 [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions mike.miller
2004-10-22  0:00 ` Maciej W. Rozycki
2004-10-22 18:30   ` mikem
2004-10-22 20:59     ` Maciej W. Rozycki
2004-10-24 15:54 ` James Bottomley
2004-10-26 19:45   ` mikem
2004-10-26 19:57     ` James Bottomley
2004-10-26 21:44       ` mikem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).