public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] attempt to fix warnings in dilnetpc.c
@ 2004-09-20 21:26 Jesper Juhl
  2004-09-22 22:39 ` Tonnerre
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2004-09-20 21:26 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, linux-kernel


Hi,

I see these warnings when building 2.6.9-rc2-bk5 allyesconfig :

  CC      drivers/mtd/maps/dilnetpc.o
drivers/mtd/maps/dilnetpc.c: In function `init_dnpc':
drivers/mtd/maps/dilnetpc.c:406: warning: assignment makes pointer from integer without a cast
drivers/mtd/maps/dilnetpc.c:416: warning: long unsigned int format, pointer arg (arg 2)
drivers/mtd/maps/dilnetpc.c:416: warning: long unsigned int format, pointer arg (arg 2)

Here's a patch to attempt to fix those. I don't have the hardware, so all 
I could do was read the code, think about it and then compile test my 
changes. I hope I got it right.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>

diff -up linux-2.6.9-rc2-bk5-orig/drivers/mtd/maps/dilnetpc.c linux-2.6.9-rc2-bk5/drivers/mtd/maps/dilnetpc.c
--- linux-2.6.9-rc2-bk5-orig/drivers/mtd/maps/dilnetpc.c	2004-08-14 07:36:32.000000000 +0200
+++ linux-2.6.9-rc2-bk5/drivers/mtd/maps/dilnetpc.c	2004-09-20 23:19:34.000000000 +0200
@@ -403,7 +403,7 @@ static int __init init_dnpc(void)
 	printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", 
 		is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys);
 
-	dnpc_map.virt = (unsigned long)ioremap_nocache(dnpc_map.phys, dnpc_map.size);
+	dnpc_map.virt = (unsigned long *)ioremap_nocache(dnpc_map.phys, dnpc_map.size);
 
 	dnpc_map_flash(dnpc_map.phys, dnpc_map.size);
 
@@ -413,7 +413,7 @@ static int __init init_dnpc(void)
 	}
 	simple_map_init(&dnpc_map);
 
-	printk("FLASH virtual address: 0x%lx\n", dnpc_map.virt);
+	printk("FLASH virtual address: 0x%lx\n", (unsigned long)dnpc_map.virt);
 
 	mymtd = do_map_probe("jedec_probe", &dnpc_map);
 


Please CC me on replies.

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

* Re: [PATCH] attempt to fix warnings in dilnetpc.c
  2004-09-20 21:26 [PATCH] attempt to fix warnings in dilnetpc.c Jesper Juhl
@ 2004-09-22 22:39 ` Tonnerre
  0 siblings, 0 replies; 2+ messages in thread
From: Tonnerre @ 2004-09-22 22:39 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-mtd, David Woodhouse, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

Salut,

On Mon, Sep 20, 2004 at 11:26:38PM +0200, Jesper Juhl wrote:
> diff -up linux-2.6.9-rc2-bk5-orig/drivers/mtd/maps/dilnetpc.c linux-2.6.9-rc2-bk5/drivers/mtd/maps/dilnetpc.c
> --- linux-2.6.9-rc2-bk5-orig/drivers/mtd/maps/dilnetpc.c	2004-08-14 07:36:32.000000000 +0200
> +++ linux-2.6.9-rc2-bk5/drivers/mtd/maps/dilnetpc.c	2004-09-20 23:19:34.000000000 +0200
> @@ -403,7 +403,7 @@ static int __init init_dnpc(void)
>  	printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", 
>  		is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys);
>  
> -	dnpc_map.virt = (unsigned long)ioremap_nocache(dnpc_map.phys, dnpc_map.size);
> +	dnpc_map.virt = (unsigned long *)ioremap_nocache(dnpc_map.phys, dnpc_map.size);

This should be void *.

				    Tonnerre

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2004-09-22 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 21:26 [PATCH] attempt to fix warnings in dilnetpc.c Jesper Juhl
2004-09-22 22:39 ` Tonnerre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox