From: John Bowler <jbowler@acm.org>
To: "'Deepak Saxena'" <dsaxena@plexity.net>
Cc: <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.arm.linux.org.uk>
Subject: [PATCH] 2.6.14 include/asm-arm/arch-ixp4xx/io.h: eliminate warning for pointer passed to integral function argument
Date: Thu, 27 Oct 2005 23:19:14 -0700 [thread overview]
Message-ID: <001001c5db87$85a55500$1001a8c0@kalmiopsis> (raw)
Fix for a compiler warning, this wasn't apparent in 2.6.12, I
believe the compiler options have been changed (somewhere) so
that passing a (void*) to a (u32) argument is now warned.
This accounts for the majority of the warnings in my builds of
the 2.6.14 kernel for NSLU2.
This is the trivial fix, but may be controversial in that it
simply casts away the warning - the alternative is to change
all the static inlines and potentially some of the callers
thereof.
Signed-off-by: John Bowler <jbowler@acm.org>
--- linux-2.6.14-rc5/include/asm-arm/arch-ixp4xx/io.h 2005-10-26 08:37:22.844417060 -0700
+++ patched/include/asm-arm/arch-ixp4xx/io.h 2005-10-26 12:14:20.771583571 -0700
@@ -80,21 +80,21 @@ __ixp4xx_iounmap(void __iomem *addr)
#define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x)
#define __arch_iounmap(a) __ixp4xx_iounmap(a)
-#define writeb(p, v) __ixp4xx_writeb(p, v)
-#define writew(p, v) __ixp4xx_writew(p, v)
-#define writel(p, v) __ixp4xx_writel(p, v)
-
-#define writesb(p, v, l) __ixp4xx_writesb(p, v, l)
-#define writesw(p, v, l) __ixp4xx_writesw(p, v, l)
-#define writesl(p, v, l) __ixp4xx_writesl(p, v, l)
+#define writeb(v, p) __ixp4xx_writeb(v, (u32)p)
+#define writew(v, p) __ixp4xx_writew(v, (u32)p)
+#define writel(v, p) __ixp4xx_writel(v, (u32)p)
+
+#define writesb(p, v, l) __ixp4xx_writesb((u32)p, v, l)
+#define writesw(p, v, l) __ixp4xx_writesw((u32)p, v, l)
+#define writesl(p, v, l) __ixp4xx_writesl((u32)p, v, l)
-#define readb(p) __ixp4xx_readb(p)
-#define readw(p) __ixp4xx_readw(p)
-#define readl(p) __ixp4xx_readl(p)
+#define readb(p) __ixp4xx_readb((u32)p)
+#define readw(p) __ixp4xx_readw((u32)p)
+#define readl(p) __ixp4xx_readl((u32)p)
-#define readsb(p, v, l) __ixp4xx_readsb(p, v, l)
-#define readsw(p, v, l) __ixp4xx_readsw(p, v, l)
-#define readsl(p, v, l) __ixp4xx_readsl(p, v, l)
+#define readsb(p, v, l) __ixp4xx_readsb((u32)p, v, l)
+#define readsw(p, v, l) __ixp4xx_readsw((u32)p, v, l)
+#define readsl(p, v, l) __ixp4xx_readsl((u32)p, v, l)
static inline void
__ixp4xx_writeb(u8 value, u32 addr)
next reply other threads:[~2005-10-28 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 6:19 John Bowler [this message]
2005-10-28 7:57 ` Russell King
2005-10-31 1:49 ` John Bowler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001001c5db87$85a55500$1001a8c0@kalmiopsis' \
--to=jbowler@acm.org \
--cc=dsaxena@plexity.net \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®