linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: Fix warning on 64bit boxes
@ 2006-01-17 17:56 Alan Cox
  2006-01-17 20:43 ` Pete Zaitcev
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2006-01-17 17:56 UTC (permalink / raw)
  To: linux-kernel, akpm

We cast an int to a void * which not unreasonably makes gcc suspicious.
We don't actually care what type "type" is so use unsigned long so it
matches pointer length on all platforms.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/drivers/usb/storage/libusual.c linux-2.6.16-rc1/drivers/usb/storage/libusual.c
--- linux.vanilla-2.6.16-rc1/drivers/usb/storage/libusual.c	2006-01-17 15:52:54.000000000 +0000
+++ linux-2.6.16-rc1/drivers/usb/storage/libusual.c	2006-01-17 17:19:01.000000000 +0000
@@ -116,7 +116,7 @@
 static int usu_probe(struct usb_interface *intf,
 			 const struct usb_device_id *id)
 {
-	int type;
+	unsigned long type;
 	int rc;
 	unsigned long flags;
 


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

* Re: PATCH: Fix warning on 64bit boxes
  2006-01-17 17:56 PATCH: Fix warning on 64bit boxes Alan Cox
@ 2006-01-17 20:43 ` Pete Zaitcev
  0 siblings, 0 replies; 2+ messages in thread
From: Pete Zaitcev @ 2006-01-17 20:43 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, akpm

On Tue, 17 Jan 2006 17:56:05 +0000, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> We cast an int to a void * which not unreasonably makes gcc suspicious.
> We don't actually care what type "type" is so use unsigned long so it
> matches pointer length on all platforms.
> 
> Signed-off-by: Alan Cox <alan@redhat.com>

>  static int usu_probe(struct usb_interface *intf,
>  			 const struct usb_device_id *id)
>  {
> -	int type;
> +	unsigned long type;

Looks good to me.

Acked-by: Pete Zaitcev <zaitcev@redhat.com>

-- Pete

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

end of thread, other threads:[~2006-01-17 20:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-17 17:56 PATCH: Fix warning on 64bit boxes Alan Cox
2006-01-17 20:43 ` Pete Zaitcev

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