mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marek Belisko <marek.belisko@open-nandra.com>
To: barebox@lists.infradead.org
Cc: Marek Belisko <marek.belisko@open-nandra.com>
Subject: [PATCH 5/5] smc91111: Various sparse fixes.
Date: Thu, 18 Nov 2010 14:29:31 +0100	[thread overview]
Message-ID: <1290086971-5467-6-git-send-email-marek.belisko@open-nandra.com> (raw)
In-Reply-To: <1290086971-5467-1-git-send-email-marek.belisko@open-nandra.com>

Patch fix all similar warnings found by sparse:
drivers/net/smc91111.c:488:9:
warning: incorrect type in argument 1 (different base types)
	expected void const volatile [noderef] <asn:2>*<noident>
	got unsigned long [unsigned] offset

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/net/smc91111.c |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 605a7d8..535e69a 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -440,20 +440,20 @@
 #define MEMORY_WAIT_TIME 16
 
 struct accessors {
-	void (*ob)(unsigned, unsigned long);
-	void (*ow)(unsigned, unsigned long);
-	void (*ol)(unsigned long, unsigned long);
-	void (*osl)(unsigned long, const void*, int);
-	unsigned (*ib)(unsigned long);
-	unsigned (*iw)(unsigned long);
-	unsigned long (*il)(unsigned long);
-	void (*isl)(unsigned long, void*, int);
+	void (*ob)(unsigned, void __iomem *);
+	void (*ow)(unsigned, void __iomem *);
+	void (*ol)(unsigned long, void __iomem *);
+	void (*osl)(void __iomem *, const void  *, int);
+	unsigned (*ib)(void __iomem *);
+	unsigned (*iw)(void __iomem *);
+	unsigned long (*il)(void __iomem *);
+	void (*isl)(void __iomem *, void*, int);
 };
 
 struct smc91c111_priv {
 	struct mii_device miidev;
 	struct accessors a;
-	unsigned long base;
+	void __iomem *base;
 };
 
 #if (SMC_DEBUG > 2 )
@@ -483,44 +483,44 @@ struct smc91c111_priv {
 
 #define ETH_ZLEN 60
 
-static void a_outb(unsigned value, unsigned long offset)
+static void a_outb(unsigned value, void __iomem *offset)
 {
 	writeb(value, offset);
 }
 
-static void a_outw(unsigned value, unsigned long offset)
+static void a_outw(unsigned value, void __iomem *offset)
 {
 	writew(value, offset);
 }
 
-static void a_outl(unsigned long value, unsigned long offset)
+static void a_outl(unsigned long value, void __iomem *offset)
 {
 	writel(value, offset);
 }
 
-static void a_outsl(unsigned long offset, const void *data, int count)
+static void a_outsl(void __iomem *offset, const void *data, int count)
 {
-	writesl((void*)offset, data, count);
+	writesl(offset, data, count);
 }
 
-static unsigned a_inb(unsigned long offset)
+static unsigned a_inb(void __iomem *offset)
 {
 	return readb(offset);
 }
 
-static unsigned a_inw(unsigned long offset)
+static unsigned a_inw(void __iomem *offset)
 {
 	return readw(offset);
 }
 
-static unsigned long a_inl(unsigned long offset)
+static unsigned long a_inl(void __iomem *offset)
 {
 	return readl(offset);
 }
 
-static inline void a_insl(unsigned long offset, void *data, int count)
+static inline void a_insl(void __iomem *offset, void *data, int count)
 {
-	readsl((void*)offset, data, count);
+	readsl(offset, data, count);
 }
 
 /* access happens via a 32 bit bus */
@@ -1317,7 +1317,7 @@ static int smc91c111_probe(struct device_d *dev)
 	priv->miidev.address = 0;
 	priv->miidev.flags = 0;
 	priv->miidev.edev = edev;
-	priv->base = dev->map_base;
+	priv->base = IOMEM(dev->map_base);
 
 	smc91c111_reset(edev);
 
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2010-11-18 13:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 13:29 [PATCH 0/5] " Marek Belisko
2010-11-18 13:29 ` [PATCH 1/5] common: Add define for IOMEM helper macro Marek Belisko
2010-11-18 13:29 ` [PATCH 2/5] fs: Fix sparse warning Marek Belisko
2010-11-19  8:36   ` Sascha Hauer
2010-11-18 13:29 ` [PATCH 3/5] mtd: " Marek Belisko
2010-11-18 13:29 ` [PATCH 4/5] nand_s3c2410: Fix sparse warnings Marek Belisko
2010-11-18 13:29 ` Marek Belisko [this message]

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=1290086971-5467-6-git-send-email-marek.belisko@open-nandra.com \
    --to=marek.belisko@open-nandra.com \
    --cc=barebox@lists.infradead.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