* [PATCH 2/8] base:driver: Fix sparse warning.
2011-10-13 20:23 [PATCH 1/8] block: Sparse fix Marek Belisko
@ 2011-10-13 20:23 ` Marek Belisko
2011-10-13 20:23 ` [PATCH 3/8] mci:s3c: " Marek Belisko
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
warnings:
drivers/base/driver.c:247:7: warning: incorrect type in assignment (different address spaces)
drivers/base/driver.c:247:7: expected void *<noident>
drivers/base/driver.c:247:7: got void [noderef] <asn:2>*
drivers/base/driver.c:256:7: warning: incorrect type in assignment (different address spaces)
drivers/base/driver.c:256:7: expected void *<noident>
drivers/base/driver.c:256:7: got void [noderef] <asn:2>*
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/base/driver.c | 4 ++--
include/driver.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 0b80103..ddbba6b 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -237,7 +237,7 @@ int dev_protect(struct device_d *dev, size_t count, unsigned long offset, int pr
return -EINVAL;
}
-int generic_memmap_ro(struct cdev *cdev, void **map, int flags)
+int generic_memmap_ro(struct cdev *cdev, void __iomem **map, int flags)
{
if (!cdev->dev)
return -EINVAL;
@@ -248,7 +248,7 @@ int generic_memmap_ro(struct cdev *cdev, void **map, int flags)
return 0;
}
-int generic_memmap_rw(struct cdev *cdev, void **map, int flags)
+int generic_memmap_rw(struct cdev *cdev, void __iomem **map, int flags)
{
if (!cdev->dev)
return -EINVAL;
diff --git a/include/driver.h b/include/driver.h
index 80de0c8..39ced2c 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -303,8 +303,8 @@ int dummy_probe(struct device_d *);
*/
void devices_shutdown(void);
-int generic_memmap_ro(struct cdev *dev, void **map, int flags);
-int generic_memmap_rw(struct cdev *dev, void **map, int flags);
+int generic_memmap_ro(struct cdev *dev, void __iomem **map, int flags);
+int generic_memmap_rw(struct cdev *dev, void __iomem **map, int flags);
static inline off_t dev_lseek_default(struct cdev *cdev, off_t ofs)
{
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/8] mci:s3c: Fix sparse warning.
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 ` Marek Belisko
2011-10-13 20:23 ` [PATCH 4/8] mci:s3c: Fix shadow name " Marek Belisko
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
warning:
drivers/mci/s3c.c:157:18: warning: dubious bitfield without explicit `signed' or `unsigned'
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/mci/s3c.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mci/s3c.c b/drivers/mci/s3c.c
index f97e13a..15defe7 100644
--- a/drivers/mci/s3c.c
+++ b/drivers/mci/s3c.c
@@ -154,7 +154,7 @@
struct s3c_mci_host {
void __iomem *base;
- int bus_width:2; /* 0 = 1 bit, 1 = 4 bit, 2 = 8 bit */
+ unsigned int bus_width:2; /* 0 = 1 bit, 1 = 4 bit, 2 = 8 bit */
unsigned clock; /* current clock in Hz */
unsigned data_size; /* data transfer in bytes */
};
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/8] mci:s3c: Fix shadow name sparse warning.
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 ` Marek Belisko
2011-10-13 20:23 ` [PATCH 5/8] mci:s3c: Fix sparse warning for readl/writel arguments Marek Belisko
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
warnings:
drivers/mci/s3c.c:215:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:242:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:258:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:312:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:342:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:368:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:391:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:453:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:498:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:554:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:629:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:688:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
drivers/mci/s3c.c:719:22: warning: symbol 'host_data' shadows an earlier one
drivers/mci/s3c.c:166:28: originally declared here
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/mci/s3c.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mci/s3c.c b/drivers/mci/s3c.c
index 15defe7..b03d7d7 100644
--- a/drivers/mci/s3c.c
+++ b/drivers/mci/s3c.c
@@ -163,7 +163,7 @@ struct s3c_mci_host {
* There is only one host MCI hardware instance available.
* It makes no sense to dynamically allocate this data
*/
-static struct s3c_mci_host host_data;
+static struct s3c_mci_host host_pdata;
/**
* Finish a request
@@ -794,8 +794,8 @@ static int s3c_mci_probe(struct device_d *hw_dev)
return -EINVAL;
}
- hw_dev->priv = &host_data;
- host_data.base = dev_request_mem_region(hw_dev, 0);
+ hw_dev->priv = &host_pdata;
+ host_pdata.base = dev_request_mem_region(hw_dev, 0);
mci_pdata.hw_dev = hw_dev;
/* feed forward the platform specific values */
@@ -807,8 +807,8 @@ static int s3c_mci_probe(struct device_d *hw_dev)
/*
* Start the clock to let the engine and the card finishes its startup
*/
- host_data.clock = s3c_setup_clock_speed(hw_dev, mci_pdata.f_min);
- writel(SDICON_FIFORESET | SDICON_MMCCLOCK, host_data.base + SDICON);
+ host_pdata.clock = s3c_setup_clock_speed(hw_dev, mci_pdata.f_min);
+ writel(SDICON_FIFORESET | SDICON_MMCCLOCK, host_pdata.base + SDICON);
return mci_register(&mci_pdata);
}
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 5/8] mci:s3c: Fix sparse warning for readl/writel arguments.
2011-10-13 20:23 [PATCH 1/8] block: Sparse fix Marek Belisko
` (2 preceding siblings ...)
2011-10-13 20:23 ` [PATCH 4/8] mci:s3c: Fix shadow name " Marek Belisko
@ 2011-10-13 20:23 ` Marek Belisko
2011-10-13 20:23 ` [PATCH 6/8] nand: Fix sparse warning Marek Belisko
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
warning:
drivers/mci/s3c.c:789:2: warning: incorrect type in argument 1 (different base types)
drivers/mci/s3c.c:789:2: expected void const volatile [noderef] <asn:2>*<noident>
drivers/mci/s3c.c:789:2: got int
drivers/mci/s3c.c:789:2: warning: incorrect type in argument 1 (different base types)
drivers/mci/s3c.c:789:2: expected void const volatile [noderef] <asn:2>*<noident>
drivers/mci/s3c.c:789:2: got int
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/mci/s3c.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mci/s3c.c b/drivers/mci/s3c.c
index b03d7d7..69573fb 100644
--- a/drivers/mci/s3c.c
+++ b/drivers/mci/s3c.c
@@ -786,8 +786,8 @@ static int s3c_mci_probe(struct device_d *hw_dev)
struct s3c_mci_platform_data *pd = hw_dev->platform_data;
/* TODO replace by the global func: enable the SDI unit clock */
- writel(readl(S3C24X0_CLOCK_POWER_BASE + 0x0c) | 0x200,
- S3C24X0_CLOCK_POWER_BASE + 0x0c);
+ writel(readl(IOMEM(S3C24X0_CLOCK_POWER_BASE + 0x0c)) | 0x200,
+ IOMEM(S3C24X0_CLOCK_POWER_BASE + 0x0c));
if (pd == NULL) {
pr_err("Missing platform data\n");
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 6/8] nand: Fix sparse warning.
2011-10-13 20:23 [PATCH 1/8] block: Sparse fix Marek Belisko
` (3 preceding siblings ...)
2011-10-13 20:23 ` [PATCH 5/8] mci:s3c: Fix sparse warning for readl/writel arguments Marek Belisko
@ 2011-10-13 20:23 ` Marek Belisko
2011-10-13 20:23 ` [PATCH 7/8] nand_s3c2410: Fix sparse warnings Marek Belisko
2011-10-13 20:23 ` [PATCH 8/8] serial_s3c24x0: " Marek Belisko
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
warning:
drivers/mtd/nand/nand_write.c:262:5: warning: symbol 'nand_do_write_ops' was not declared. Should it be static?
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/mtd/nand/nand_write.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_write.c
index 13b6c89..59a1bcc 100644
--- a/drivers/mtd/nand/nand_write.c
+++ b/drivers/mtd/nand/nand_write.c
@@ -259,7 +259,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
*
* NAND write with ECC
*/
-int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
+static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
struct mtd_oob_ops *ops)
{
int chipnr, realpage, page, blockmask, column;
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 7/8] nand_s3c2410: Fix sparse warnings.
2011-10-13 20:23 [PATCH 1/8] block: Sparse fix Marek Belisko
` (4 preceding siblings ...)
2011-10-13 20:23 ` [PATCH 6/8] nand: Fix sparse warning Marek Belisko
@ 2011-10-13 20:23 ` Marek Belisko
2011-10-13 20:23 ` [PATCH 8/8] serial_s3c24x0: " Marek Belisko
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 8/8] serial_s3c24x0: Fix sparse warnings.
2011-10-13 20:23 [PATCH 1/8] block: Sparse fix Marek Belisko
` (5 preceding siblings ...)
2011-10-13 20:23 ` [PATCH 7/8] nand_s3c2410: Fix sparse warnings Marek Belisko
@ 2011-10-13 20:23 ` Marek Belisko
6 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2011-10-13 20:23 UTC (permalink / raw)
To: barebox; +Cc: Marek Belisko
warnings:
drivers/serial/serial_s3c24x0.c:47:26: warning: incorrect type in initializer (different address spaces)
drivers/serial/serial_s3c24x0.c:47:26: expected void [noderef] <asn:2>*base
drivers/serial/serial_s3c24x0.c:47:26: got void *priv
drivers/serial/serial_s3c24x0.c:60:26: warning: incorrect type in initializer (different address spaces)
drivers/serial/serial_s3c24x0.c:60:26: expected void [noderef] <asn:2>*base
drivers/serial/serial_s3c24x0.c:60:26: got void *priv
drivers/serial/serial_s3c24x0.c:84:26: warning: incorrect type in initializer (different address spaces)
drivers/serial/serial_s3c24x0.c:84:26: expected void [noderef] <asn:2>*base
drivers/serial/serial_s3c24x0.c:84:26: got void *priv
drivers/serial/serial_s3c24x0.c:96:26: warning: incorrect type in initializer (different address spaces)
drivers/serial/serial_s3c24x0.c:96:26: expected void [noderef] <asn:2>*base
drivers/serial/serial_s3c24x0.c:96:26: got void *priv
drivers/serial/serial_s3c24x0.c:108:26: warning: incorrect type in initializer (different address spaces)
drivers/serial/serial_s3c24x0.c:108:26: expected void [noderef] <asn:2>*base
drivers/serial/serial_s3c24x0.c:108:26: got void *priv
drivers/serial/serial_s3c24x0.c:120:26: warning: incorrect type in initializer (different address spaces)
drivers/serial/serial_s3c24x0.c:120:26: expected void [noderef] <asn:2>*base
drivers/serial/serial_s3c24x0.c:120:26: got void *priv
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/serial/serial_s3c24x0.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/serial/serial_s3c24x0.c b/drivers/serial/serial_s3c24x0.c
index 3a703b6..2fb2bb4 100644
--- a/drivers/serial/serial_s3c24x0.c
+++ b/drivers/serial/serial_s3c24x0.c
@@ -44,7 +44,7 @@
static int s3c24x0_serial_setbaudrate(struct console_device *cdev, int baudrate)
{
struct device_d *dev = cdev->dev;
- void __iomem *base = dev->priv;
+ void __iomem *base = IOMEM(dev->priv);
unsigned val;
/* value is calculated so : PCLK / (16 * baudrate) -1 */
@@ -57,7 +57,7 @@ static int s3c24x0_serial_setbaudrate(struct console_device *cdev, int baudrate)
static int s3c24x0_serial_init_port(struct console_device *cdev)
{
struct device_d *dev = cdev->dev;
- void __iomem *base = dev->priv;
+ void __iomem *base = IOMEM(dev->priv);
/* FIFO enable, Tx/Rx FIFO clear */
writeb(0x07, base + UFCON);
@@ -81,7 +81,7 @@ static int s3c24x0_serial_init_port(struct console_device *cdev)
static void s3c24x0_serial_putc(struct console_device *cdev, char c)
{
struct device_d *dev = cdev->dev;
- void __iomem *base = dev->priv;
+ void __iomem *base = IOMEM(dev->priv);
/* Wait for Tx FIFO not full */
while (!(readb(base + UTRSTAT) & 0x2))
@@ -93,7 +93,7 @@ static void s3c24x0_serial_putc(struct console_device *cdev, char c)
static int s3c24x0_serial_tstc(struct console_device *cdev)
{
struct device_d *dev = cdev->dev;
- void __iomem *base = dev->priv;
+ void __iomem *base = IOMEM(dev->priv);
/* If receive fifo is empty, return false */
if (readb(base + UTRSTAT) & 0x1)
@@ -105,7 +105,7 @@ static int s3c24x0_serial_tstc(struct console_device *cdev)
static int s3c24x0_serial_getc(struct console_device *cdev)
{
struct device_d *dev = cdev->dev;
- void __iomem *base = dev->priv;
+ void __iomem *base = IOMEM(dev->priv);
/* wait for a character */
while (!(readb(base + UTRSTAT) & 0x1))
@@ -117,7 +117,7 @@ static int s3c24x0_serial_getc(struct console_device *cdev)
static void s3c24x0_serial_flush(struct console_device *cdev)
{
struct device_d *dev = cdev->dev;
- void __iomem *base = dev->priv;
+ void __iomem *base = IOMEM(dev->priv);
while (!(readb(base + UTRSTAT) & 0x4))
;
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread