* [PATCH] 2.6.14 drivers/mtd/maps/ixp4xx.c: remove compiler warning from ioremap assignment
@ 2005-10-28 6:13 John Bowler
2005-10-28 7:55 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: John Bowler @ 2005-10-28 6:13 UTC (permalink / raw)
To: 'Deepak Saxena'; +Cc: linux-kernel, linux-arm-kernel, trivial
Trivial fix for a compiler warning: info->map.map_priv_1 is
(unsigned long), ioremap returns a pointer. (Probably the
result of improved compiler warnings in >2.6.12).
Signed-off-by: John Bowler <jbowler@acm.org>
--- linux-2.6.14-rc5/drivers/mtd/maps/ixp4xx.c 2005-10-26 08:37:21.960361430 -0700
+++ patched/drivers/mtd/maps/ixp4xx.c 2005-10-26 12:13:13.879374310 -0700
@@ -227,7 +227,7 @@ static int ixp4xx_flash_probe(struct dev
goto Error;
}
- info->map.map_priv_1 = ioremap(dev->resource->start,
+ info->map.map_priv_1 = (unsigned long)ioremap(dev->resource->start,
dev->resource->end - dev->resource->start + 1);
if (!info->map.map_priv_1) {
printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] 2.6.14 drivers/mtd/maps/ixp4xx.c: remove compiler warning from ioremap assignment
2005-10-28 6:13 [PATCH] 2.6.14 drivers/mtd/maps/ixp4xx.c: remove compiler warning from ioremap assignment John Bowler
@ 2005-10-28 7:55 ` Russell King
0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2005-10-28 7:55 UTC (permalink / raw)
To: John Bowler
Cc: 'Deepak Saxena', linux-kernel, linux-arm-kernel, trivial
On Thu, Oct 27, 2005 at 11:13:59PM -0700, John Bowler wrote:
> Trivial fix for a compiler warning: info->map.map_priv_1 is
> (unsigned long), ioremap returns a pointer. (Probably the
> result of improved compiler warnings in >2.6.12).
This is wrong. You should be using map.virt (which has the correct
type) and not map.map_priv_1.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-28 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-28 6:13 [PATCH] 2.6.14 drivers/mtd/maps/ixp4xx.c: remove compiler warning from ioremap assignment John Bowler
2005-10-28 7:55 ` Russell King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.