linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: davinci: sparse warning fixes
@ 2013-04-10  9:27 Sekhar Nori
  2013-04-10  9:27 ` [PATCH 1/4] ARM: davinci: da850 evm: fix const qualifier placement Sekhar Nori
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sekhar Nori @ 2013-04-10  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series fixes some sparse errors/warnings
occurring in arch/arm/mach-davinci/*

Tested on DA850 EVM (boot and suspend-to-RAM test).

Sekhar Nori (4):
  ARM: davinci: da850 evm: fix const qualifier placement
  ARM: davinci: da8xx dt: make file local symbols static
  ARM: davinci: sram.c: fix incorrect type in assignment
  ARM: davinci: ensure global variables are declared

 arch/arm/mach-davinci/board-da850-evm.c |    4 ++--
 arch/arm/mach-davinci/da8xx-dt.c        |    4 ++--
 arch/arm/mach-davinci/pm.c              |    1 +
 arch/arm/mach-davinci/sram.c            |    4 ++--
 arch/arm/mach-davinci/usb.c             |    1 +
 5 files changed, 8 insertions(+), 6 deletions(-)

-- 
1.7.10.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] ARM: davinci: da850 evm: fix const qualifier placement
  2013-04-10  9:27 [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
@ 2013-04-10  9:27 ` Sekhar Nori
  2013-04-10  9:27 ` [PATCH 2/4] ARM: davinci: da8xx dt: make file local symbols static Sekhar Nori
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2013-04-10  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

const qualifier was misplaced in couple of definitions.
This fixes the sparse error:

  CHECK   arch/arm/mach-davinci/board-mityomapl138.c
arch/arm/mach-davinci/board-da850-evm.c:404:19: error: Just how const do you want this type to be?
arch/arm/mach-davinci/board-da850-evm.c:568:19: error: Just how const do you want this type to be?

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 arch/arm/mach-davinci/board-da850-evm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index c2dfe06..1f597b3 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -401,7 +401,7 @@ enum da850_evm_ui_exp_pins {
 	DA850_EVM_UI_EXP_PB1,
 };
 
-static const char const *da850_evm_ui_exp[] = {
+static const char * const da850_evm_ui_exp[] = {
 	[DA850_EVM_UI_EXP_SEL_C]        = "sel_c",
 	[DA850_EVM_UI_EXP_SEL_B]        = "sel_b",
 	[DA850_EVM_UI_EXP_SEL_A]        = "sel_a",
@@ -565,7 +565,7 @@ enum da850_evm_bb_exp_pins {
 	DA850_EVM_BB_EXP_USER_SW8
 };
 
-static const char const *da850_evm_bb_exp[] = {
+static const char * const da850_evm_bb_exp[] = {
 	[DA850_EVM_BB_EXP_DEEP_SLEEP_EN]	= "deep_sleep_en",
 	[DA850_EVM_BB_EXP_SW_RST]		= "sw_rst",
 	[DA850_EVM_BB_EXP_TP_23]		= "tp_23",
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ARM: davinci: da8xx dt: make file local symbols static
  2013-04-10  9:27 [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
  2013-04-10  9:27 ` [PATCH 1/4] ARM: davinci: da850 evm: fix const qualifier placement Sekhar Nori
@ 2013-04-10  9:27 ` Sekhar Nori
  2013-04-10  9:27 ` [PATCH 3/4] ARM: davinci: sram.c: fix incorrect type in assignment Sekhar Nori
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2013-04-10  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

Make some file-local functions static. This fixes the sparse
warnings:

  CHECK   arch/arm/mach-davinci/da8xx-dt.c
arch/arm/mach-davinci/da8xx-dt.c:23:13: warning: symbol 'da8xx_uart_clk_enable' was not declared. Should it be static?
arch/arm/mach-davinci/da8xx-dt.c:40:23: warning: symbol 'da850_auxdata_lookup' was not declared. Should it be static?

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 arch/arm/mach-davinci/da8xx-dt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 6b7a0a2..57e14a8 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -20,7 +20,7 @@
 
 #define DA8XX_NUM_UARTS	3
 
-void __init da8xx_uart_clk_enable(void)
+static void __init da8xx_uart_clk_enable(void)
 {
 	int i;
 	for (i = 0; i < DA8XX_NUM_UARTS; i++)
@@ -37,7 +37,7 @@ static void __init da8xx_init_irq(void)
 	of_irq_init(da8xx_irq_match);
 }
 
-struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
+static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
 	OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
 	{}
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ARM: davinci: sram.c: fix incorrect type in assignment
  2013-04-10  9:27 [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
  2013-04-10  9:27 ` [PATCH 1/4] ARM: davinci: da850 evm: fix const qualifier placement Sekhar Nori
  2013-04-10  9:27 ` [PATCH 2/4] ARM: davinci: da8xx dt: make file local symbols static Sekhar Nori
@ 2013-04-10  9:27 ` Sekhar Nori
  2013-04-10  9:27 ` [PATCH 4/4] ARM: davinci: ensure global variables are declared Sekhar Nori
  2013-04-15 11:50 ` [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
  4 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2013-04-10  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

Fix missing __iomem attribute. This fixes the sparse warning:

  CHECK   arch/arm/mach-davinci/sram.c
arch/arm/mach-davinci/sram.c:75:8: warning: incorrect type in assignment (different address spaces)
arch/arm/mach-davinci/sram.c:75:8:    expected void *addr
arch/arm/mach-davinci/sram.c:75:8:    got void [noderef] <asn:2>*
arch/arm/mach-davinci/sram.c:81:12: warning: incorrect type in argument 1 (different address spaces)
arch/arm/mach-davinci/sram.c:81:12:    expected void volatile [noderef] <asn:2>*addr
arch/arm/mach-davinci/sram.c:81:12:    got void *addr

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 arch/arm/mach-davinci/sram.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index c5f7ee5..f18928b 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -62,7 +62,7 @@ static int __init sram_init(void)
 	phys_addr_t phys = davinci_soc_info.sram_dma;
 	unsigned len = davinci_soc_info.sram_len;
 	int status = 0;
-	void *addr;
+	void __iomem *addr;
 
 	if (len) {
 		len = min_t(unsigned, len, SRAM_SIZE);
@@ -75,7 +75,7 @@ static int __init sram_init(void)
 		addr = ioremap(phys, len);
 		if (!addr)
 			return -ENOMEM;
-		status = gen_pool_add_virt(sram_pool, (unsigned)addr,
+		status = gen_pool_add_virt(sram_pool, (unsigned long) addr,
 					   phys, len, -1);
 		if (status < 0)
 			iounmap(addr);
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] ARM: davinci: ensure global variables are declared
  2013-04-10  9:27 [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
                   ` (2 preceding siblings ...)
  2013-04-10  9:27 ` [PATCH 3/4] ARM: davinci: sram.c: fix incorrect type in assignment Sekhar Nori
@ 2013-04-10  9:27 ` Sekhar Nori
  2013-04-15 11:50 ` [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
  4 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2013-04-10  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

Fix the following sparse warnings by declaring relevant
global variables.

  CHECK   arch/arm/mach-davinci/usb.c
arch/arm/mach-davinci/usb.c:134:12: warning: symbol 'da8xx_register_usb20' was not declared. Should it be static?
arch/arm/mach-davinci/usb.c:169:12: warning: symbol 'da8xx_register_usb11' was not declared. Should it be static?

  CHECK   arch/arm/mach-davinci/pm.c
arch/arm/mach-davinci/pm.c:155:12: warning: symbol 'davinci_pm_init' was not declared. Should it be static?

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 arch/arm/mach-davinci/pm.c  |    1 +
 arch/arm/mach-davinci/usb.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c
index eb8360b..a508fe5 100644
--- a/arch/arm/mach-davinci/pm.c
+++ b/arch/arm/mach-davinci/pm.c
@@ -19,6 +19,7 @@
 #include <asm/delay.h>
 #include <asm/io.h>
 
+#include <mach/common.h>
 #include <mach/da8xx.h>
 #include <mach/sram.h>
 #include <mach/pm.h>
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 34509ff..2b4c648 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -10,6 +10,7 @@
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/cputype.h>
+#include <mach/da8xx.h>
 #include <linux/platform_data/usb-davinci.h>
 
 #define DAVINCI_USB_OTG_BASE	0x01c64000
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 0/4] ARM: davinci: sparse warning fixes
  2013-04-10  9:27 [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
                   ` (3 preceding siblings ...)
  2013-04-10  9:27 ` [PATCH 4/4] ARM: davinci: ensure global variables are declared Sekhar Nori
@ 2013-04-15 11:50 ` Sekhar Nori
  4 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2013-04-15 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 4/10/2013 2:57 PM, Sekhar Nori wrote:
> This patch series fixes some sparse errors/warnings
> occurring in arch/arm/mach-davinci/*
> 
> Tested on DA850 EVM (boot and suspend-to-RAM test).

Queuing these for v3.10.

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-15 11:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10  9:27 [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori
2013-04-10  9:27 ` [PATCH 1/4] ARM: davinci: da850 evm: fix const qualifier placement Sekhar Nori
2013-04-10  9:27 ` [PATCH 2/4] ARM: davinci: da8xx dt: make file local symbols static Sekhar Nori
2013-04-10  9:27 ` [PATCH 3/4] ARM: davinci: sram.c: fix incorrect type in assignment Sekhar Nori
2013-04-10  9:27 ` [PATCH 4/4] ARM: davinci: ensure global variables are declared Sekhar Nori
2013-04-15 11:50 ` [PATCH 0/4] ARM: davinci: sparse warning fixes Sekhar Nori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).