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 7/8] nand_s3c2410: Fix sparse warnings.
Date: Thu, 13 Oct 2011 22:23:13 +0200	[thread overview]
Message-ID: <1318537394-8555-7-git-send-email-marek.belisko@open-nandra.com> (raw)
In-Reply-To: <1318537394-8555-1-git-send-email-marek.belisko@open-nandra.com>

warnings:
drivers/mtd/nand/nand_s3c2410.c:550:24: warning: cast adds address space to expression (<asn:2>)
drivers/mtd/nand/nand_s3c2410.c:561:10: warning: incorrect type in argument 1 (different base types)
drivers/mtd/nand/nand_s3c2410.c:594:4: warning: cast adds address space to expression (<asn:2>)
drivers/mtd/nand/nand_s3c2410.c:594:4: warning: cast adds address space to expression (<asn:2>)
drivers/mtd/nand/nand_s3c2410.c:623:26: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/nand/nand_s3c2410.c:623:26:    expected void [noderef] <asn:2>*host
drivers/mtd/nand/nand_s3c2410.c:623:26:    got void *<noident>

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/mtd/nand/nand_s3c2410.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/nand_s3c2410.c b/drivers/mtd/nand/nand_s3c2410.c
index c5f5d97..3a6f1e0 100644
--- a/drivers/mtd/nand/nand_s3c2410.c
+++ b/drivers/mtd/nand/nand_s3c2410.c
@@ -547,7 +547,7 @@ static void __nand_boot_init nfc_addr(void __iomem *host, uint32_t offs,
  */
 void __nand_boot_init s3c24x0_nand_load_image(void *dest, int size, int page)
 {
-	void __iomem *host = (void __iomem *)S3C24X0_NAND_BASE;
+	void __iomem *host = IOMEM(S3C24X0_NAND_BASE);
 	unsigned pagesize;
 	int i, cycle;
 
@@ -558,7 +558,7 @@ void __nand_boot_init s3c24x0_nand_load_image(void *dest, int size, int page)
 	enable_nand_controller(host, BOARD_DEFAULT_NAND_TIMING);
 
 	/* use the current NAND hardware configuration */
-	switch (readl(S3C24X0_NAND_BASE) & 0xf) {
+	switch (readl(host) & 0xf) {
 	case 0x6:	/* 8 bit, 4 addr cycles, 512 bpp, normal NAND */
 		pagesize = 512;
 		cycle = 4;
@@ -591,7 +591,7 @@ void __nand_boot_init s3c24x0_nand_load_image(void *dest, int size, int page)
 		wait_for_completion(host);
 		/* copy one page (do *not* use readsb() here!)*/
 		for (i = 0; i < pagesize; i++)
-			writeb(readb(host + NFDATA), (void __iomem *)(dest + i));
+			writeb(readb(IOMEM(host + NFDATA)), IOMEM(dest + i));
 		disable_cs(host);
 
 		page++;
@@ -620,7 +620,7 @@ static int do_nand_boot_test(struct command *cmdtp, int argc, char *argv[])
 	s3c24x0_nand_load_image(dest, size, 0);
 
 	/* re-enable the controller again, as this was a test only */
-	enable_nand_controller((void *)S3C24X0_NAND_BASE,
+	enable_nand_controller(IOMEM(S3C24X0_NAND_BASE),
 				BOARD_DEFAULT_NAND_TIMING);
 
 	return 0;
-- 
1.7.4.1


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

  parent reply	other threads:[~2011-10-13 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 20:23 [PATCH 1/8] block: Sparse fix Marek Belisko
2011-10-13 20:23 ` [PATCH 2/8] base:driver: Fix sparse warning Marek Belisko
2011-10-13 20:23 ` [PATCH 3/8] mci:s3c: " Marek Belisko
2011-10-13 20:23 ` [PATCH 4/8] mci:s3c: Fix shadow name " Marek Belisko
2011-10-13 20:23 ` [PATCH 5/8] mci:s3c: Fix sparse warning for readl/writel arguments Marek Belisko
2011-10-13 20:23 ` [PATCH 6/8] nand: Fix sparse warning Marek Belisko
2011-10-13 20:23 ` Marek Belisko [this message]
2011-10-13 20:23 ` [PATCH 8/8] serial_s3c24x0: Fix sparse warnings Marek Belisko

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=1318537394-8555-7-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