public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] OMAP2+: trivial sparse fixes
@ 2011-01-04 20:07 Nishanth Menon
  2011-01-04 20:07 ` [PATCH 1/5] omap3|4: mux: make local structures static Nishanth Menon
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:07 UTC (permalink / raw)
  To: Tony; +Cc: l-o, l-a, Nishanth Menon

Source: git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
branch: omap-for-linus (dc69d1a omap2: Make OMAP2PLUS select OMAP_DM_TIMER)

Building for sparse warnings result in the following warnings:
http://pastebin.mozilla.org/907954

This is series 2 of the sparse fixes
(series 1:
 http://marc.info/?t=129408118000003&r=1&w=2
 and
 http://marc.info/?t=129408352700002&r=1&w=2)

Nishanth Menon (5):
  omap3|4: mux: make local structures static
  omap3: zoom: use static for pointer passing
  omap3: igep3: make igep3_flash_init static
  omap2+: wdt: trivial sparse fixes
  omap2+: pm_bus: make functions used as pointers as static

 arch/arm/mach-omap2/board-igep0030.c         |    4 ++--
 arch/arm/mach-omap2/board-zoom-peripherals.c |    4 ++--
 arch/arm/mach-omap2/devices.c                |    2 +-
 arch/arm/mach-omap2/mux34xx.c                |    4 ++--
 arch/arm/mach-omap2/mux44xx.c                |    6 +++---
 arch/arm/mach-omap2/pm_bus.c                 |    4 ++--
 arch/arm/mach-omap2/wd_timer.c               |    2 ++
 7 files changed, 14 insertions(+), 12 deletions(-)

---
Regards,
Nishanth Menon

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

* [PATCH 1/5] omap3|4: mux: make local structures static
  2011-01-04 20:07 [PATCH 0/5] OMAP2+: trivial sparse fixes Nishanth Menon
@ 2011-01-04 20:07 ` Nishanth Menon
  2011-01-04 20:07 ` [PATCH 2/5] omap3: zoom: use static for pointer passing Nishanth Menon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:07 UTC (permalink / raw)
  To: Tony; +Cc: l-o, l-a, Nishanth Menon

Mux data is passed by pointers to mux.c from the SoC specific
mux file, these variables dont really need to be global scope.

This fixes the following sparse warnings:
arch/arm/mach-omap2/mux44xx.c:547:29: warning: symbol 'omap4_core_cbl_ball' was not declared. Should it be static?
arch/arm/mach-omap2/mux44xx.c:1265:29: warning: symbol 'omap4_core_cbs_ball' was not declared. Should it be static?
arch/arm/mach-omap2/mux44xx.c:1549:29: warning: symbol 'omap4_wkup_cbl_cbs_ball' was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/mux34xx.c |    4 ++--
 arch/arm/mach-omap2/mux44xx.c |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c
index 440c98e..17f80e4 100644
--- a/arch/arm/mach-omap2/mux34xx.c
+++ b/arch/arm/mach-omap2/mux34xx.c
@@ -703,7 +703,7 @@ static struct omap_mux __initdata omap3_muxmodes[] = {
  * Signals different on CBC package compared to the superset
  */
 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBC)
-struct omap_mux __initdata omap3_cbc_subset[] = {
+static struct omap_mux __initdata omap3_cbc_subset[] = {
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
 #else
@@ -721,7 +721,7 @@ struct omap_mux __initdata omap3_cbc_subset[] = {
  */
 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)	\
 		&& defined(CONFIG_OMAP_PACKAGE_CBC)
-struct omap_ball __initdata omap3_cbc_ball[] = {
+static struct omap_ball __initdata omap3_cbc_ball[] = {
 	_OMAP3_BALLENTRY(CAM_D0, "ae16", NULL),
 	_OMAP3_BALLENTRY(CAM_D1, "ae15", NULL),
 	_OMAP3_BALLENTRY(CAM_D10, "d25", NULL),
diff --git a/arch/arm/mach-omap2/mux44xx.c b/arch/arm/mach-omap2/mux44xx.c
index 980f11d..c322e7b 100644
--- a/arch/arm/mach-omap2/mux44xx.c
+++ b/arch/arm/mach-omap2/mux44xx.c
@@ -544,7 +544,7 @@ static struct omap_mux __initdata omap4_core_muxmodes[] = {
  */
 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)		\
 		&& defined(CONFIG_OMAP_PACKAGE_CBL)
-struct omap_ball __initdata omap4_core_cbl_ball[] = {
+static struct omap_ball __initdata omap4_core_cbl_ball[] = {
 	_OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL),
 	_OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL),
 	_OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL),
@@ -1262,7 +1262,7 @@ static struct omap_mux __initdata omap4_es2_core_muxmodes[] = {
  */
 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)		\
 		&& defined(CONFIG_OMAP_PACKAGE_CBS)
-struct omap_ball __initdata omap4_core_cbs_ball[] = {
+static struct omap_ball __initdata omap4_core_cbs_ball[] = {
 	_OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL),
 	_OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL),
 	_OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL),
@@ -1546,7 +1546,7 @@ static struct omap_mux __initdata omap4_wkup_muxmodes[] = {
  */
 #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)		\
 		&& defined(CONFIG_OMAP_PACKAGE_CBL)
-struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = {
+static struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = {
 	_OMAP4_BALLENTRY(SIM_IO, "h4", NULL),
 	_OMAP4_BALLENTRY(SIM_CLK, "j2", NULL),
 	_OMAP4_BALLENTRY(SIM_RESET, "g2", NULL),
-- 
1.6.3.3


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

* [PATCH 2/5] omap3: zoom: use static for pointer passing
  2011-01-04 20:07 [PATCH 0/5] OMAP2+: trivial sparse fixes Nishanth Menon
  2011-01-04 20:07 ` [PATCH 1/5] omap3|4: mux: make local structures static Nishanth Menon
@ 2011-01-04 20:07 ` Nishanth Menon
  2011-01-04 20:07 ` [PATCH 3/5] omap3: igep3: make igep3_flash_init static Nishanth Menon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:07 UTC (permalink / raw)
  To: Tony; +Cc: l-o, l-a, Nishanth Menon

omap_zoom_wlan_data and zoom2_set_hs_extmute are not used beyond
the scope of zoom-peripherals directly, instead pointers are used.
make them static instead.

Fixes sparse warnings:
arch/arm/mach-omap2/board-zoom-peripherals.c:193:29: warning: symbol 'omap_zoom_wlan_data' was not declared. Should it be static?
arch/arm/mach-omap2/board-zoom-peripherals.c:245:6: warning: symbol 'zoom2_set_hs_extmute' was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 3fbd0ed..3d1f9ab 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -190,7 +190,7 @@ static struct platform_device omap_vwlan_device = {
 	},
 };
 
-struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
+static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
 	.irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
 	/* ZOOM ref clock is 26 MHz */
 	.board_ref_clock = 1,
@@ -242,7 +242,7 @@ static int zoom_twl_gpio_setup(struct device *dev,
 }
 
 /* EXTMUTE callback function */
-void zoom2_set_hs_extmute(int mute)
+static void zoom2_set_hs_extmute(int mute)
 {
 	gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
 }
-- 
1.6.3.3


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

* [PATCH 3/5] omap3: igep3: make igep3_flash_init static
  2011-01-04 20:07 [PATCH 0/5] OMAP2+: trivial sparse fixes Nishanth Menon
  2011-01-04 20:07 ` [PATCH 1/5] omap3|4: mux: make local structures static Nishanth Menon
  2011-01-04 20:07 ` [PATCH 2/5] omap3: zoom: use static for pointer passing Nishanth Menon
@ 2011-01-04 20:07 ` Nishanth Menon
  2011-01-04 20:07 ` [PATCH 4/5] omap2+: wdt: trivial sparse fixes Nishanth Menon
  2011-01-04 20:07 ` [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static Nishanth Menon
  4 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:07 UTC (permalink / raw)
  To: Tony; +Cc: l-o, l-a, Nishanth Menon

igep3_flash_init is not used beyond the scope of the file, make it
static instead.

Fixes sparse warning:
arch/arm/mach-omap2/board-igep0030.c:106:13: warning: symbol 'igep3_flash_init' was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/board-igep0030.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
index bcccd68..c88e8f7 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -103,7 +103,7 @@ static struct platform_device igep3_onenand_device = {
 	},
 };
 
-void __init igep3_flash_init(void)
+static void __init igep3_flash_init(void)
 {
 	u8 cs = 0;
 	u8 onenandcs = GPMC_CS_NUM + 1;
@@ -137,7 +137,7 @@ void __init igep3_flash_init(void)
 }
 
 #else
-void __init igep3_flash_init(void) {}
+static void __init igep3_flash_init(void) {}
 #endif
 
 static struct regulator_consumer_supply igep3_vmmc1_supply = {
-- 
1.6.3.3


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

* [PATCH 4/5] omap2+: wdt: trivial sparse fixes
  2011-01-04 20:07 [PATCH 0/5] OMAP2+: trivial sparse fixes Nishanth Menon
                   ` (2 preceding siblings ...)
  2011-01-04 20:07 ` [PATCH 3/5] omap3: igep3: make igep3_flash_init static Nishanth Menon
@ 2011-01-04 20:07 ` Nishanth Menon
  2011-01-04 20:07 ` [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static Nishanth Menon
  4 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:07 UTC (permalink / raw)
  To: Tony; +Cc: l-o, l-a, Nishanth Menon

omap2_wd_timer_disable is declared in wdtimer.h and used by hwmod
function pointers for usage, the header inclusion is necessary
to ensure that the prototype and function remains consistent.
omap_wdt_latency is passed as a pointer and does not need global scope

Fixes sparse warnings:
arch/arm/mach-omap2/devices.c:981:31: warning: symbol 'omap_wdt_latency' was not declared. Should it be static?
arch/arm/mach-omap2/wd_timer.c:27:5: warning: symbol 'omap2_wd_timer_disable' was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/devices.c  |    2 +-
 arch/arm/mach-omap2/wd_timer.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 381f4eb..2c9c912 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -978,7 +978,7 @@ static int __init omap2_init_devices(void)
 arch_initcall(omap2_init_devices);
 
 #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
-struct omap_device_pm_latency omap_wdt_latency[] = {
+static struct omap_device_pm_latency omap_wdt_latency[] = {
 	[0] = {
 		.deactivate_func = omap_device_idle_hwmods,
 		.activate_func   = omap_device_enable_hwmods,
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
index b0c4907..4067669 100644
--- a/arch/arm/mach-omap2/wd_timer.c
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -13,6 +13,8 @@
 
 #include <plat/omap_hwmod.h>
 
+#include "wd_timer.h"
+
 /*
  * In order to avoid any assumptions from bootloader regarding WDT
  * settings, WDT module is reset during init. This enables the watchdog
-- 
1.6.3.3


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

* [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static
  2011-01-04 20:07 [PATCH 0/5] OMAP2+: trivial sparse fixes Nishanth Menon
                   ` (3 preceding siblings ...)
  2011-01-04 20:07 ` [PATCH 4/5] omap2+: wdt: trivial sparse fixes Nishanth Menon
@ 2011-01-04 20:07 ` Nishanth Menon
  2011-01-05  0:40   ` Kevin Hilman
  4 siblings, 1 reply; 8+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:07 UTC (permalink / raw)
  To: Tony; +Cc: l-o, l-a, Nishanth Menon

omap_pm_runtime_suspend and omap_pm_runtime_resume are used
as function pointers and does not really need to be exposed
to the world.

Fixes sparse warnings:
arch/arm/mach-omap2/pm_bus.c:23:5: warning: symbol 'omap_pm_runtime_suspend' was not declared. Should it be static?
arch/arm/mach-omap2/pm_bus.c:40:5: warning: symbol 'omap_pm_runtime_resume' was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/pm_bus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/pm_bus.c b/arch/arm/mach-omap2/pm_bus.c
index 784989f..5acd2ab 100644
--- a/arch/arm/mach-omap2/pm_bus.c
+++ b/arch/arm/mach-omap2/pm_bus.c
@@ -20,7 +20,7 @@
 #include <plat/omap-pm.h>
 
 #ifdef CONFIG_PM_RUNTIME
-int omap_pm_runtime_suspend(struct device *dev)
+static int omap_pm_runtime_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	int r, ret = 0;
@@ -37,7 +37,7 @@ int omap_pm_runtime_suspend(struct device *dev)
 	return ret;
 };
 
-int omap_pm_runtime_resume(struct device *dev)
+static int omap_pm_runtime_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	int r;
-- 
1.6.3.3


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

* Re: [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static
  2011-01-04 20:07 ` [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static Nishanth Menon
@ 2011-01-05  0:40   ` Kevin Hilman
  2011-01-06 22:43     ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2011-01-05  0:40 UTC (permalink / raw)
  To: Nishanth Menon; +Cc: Tony, l-o, l-a

Nishanth Menon <nm@ti.com> writes:

> omap_pm_runtime_suspend and omap_pm_runtime_resume are used
> as function pointers and does not really need to be exposed
> to the world.
>
> Fixes sparse warnings:
> arch/arm/mach-omap2/pm_bus.c:23:5: warning: symbol 'omap_pm_runtime_suspend' was not declared. Should it be static?
> arch/arm/mach-omap2/pm_bus.c:40:5: warning: symbol 'omap_pm_runtime_resume' was not declared. Should it be static?
>
> Signed-off-by: Nishanth Menon <nm@ti.com>

Thanks, will queue this one in my pm-fixes branch for 2.6.38-rc.

Kevin

> ---
>  arch/arm/mach-omap2/pm_bus.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm_bus.c b/arch/arm/mach-omap2/pm_bus.c
> index 784989f..5acd2ab 100644
> --- a/arch/arm/mach-omap2/pm_bus.c
> +++ b/arch/arm/mach-omap2/pm_bus.c
> @@ -20,7 +20,7 @@
>  #include <plat/omap-pm.h>
>  
>  #ifdef CONFIG_PM_RUNTIME
> -int omap_pm_runtime_suspend(struct device *dev)
> +static int omap_pm_runtime_suspend(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
>  	int r, ret = 0;
> @@ -37,7 +37,7 @@ int omap_pm_runtime_suspend(struct device *dev)
>  	return ret;
>  };
>  
> -int omap_pm_runtime_resume(struct device *dev)
> +static int omap_pm_runtime_resume(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
>  	int r;

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

* Re: [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static
  2011-01-05  0:40   ` Kevin Hilman
@ 2011-01-06 22:43     ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2011-01-06 22:43 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: Nishanth Menon, l-o, l-a

* Kevin Hilman <khilman@ti.com> [110104 16:39]:
> Nishanth Menon <nm@ti.com> writes:
> 
> > omap_pm_runtime_suspend and omap_pm_runtime_resume are used
> > as function pointers and does not really need to be exposed
> > to the world.
> >
> > Fixes sparse warnings:
> > arch/arm/mach-omap2/pm_bus.c:23:5: warning: symbol 'omap_pm_runtime_suspend' was not declared. Should it be static?
> > arch/arm/mach-omap2/pm_bus.c:40:5: warning: symbol 'omap_pm_runtime_resume' was not declared. Should it be static?
> >
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> 
> Thanks, will queue this one in my pm-fixes branch for 2.6.38-rc.

I'll take patches 1 - 4.

Tony

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

end of thread, other threads:[~2011-01-06 22:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 20:07 [PATCH 0/5] OMAP2+: trivial sparse fixes Nishanth Menon
2011-01-04 20:07 ` [PATCH 1/5] omap3|4: mux: make local structures static Nishanth Menon
2011-01-04 20:07 ` [PATCH 2/5] omap3: zoom: use static for pointer passing Nishanth Menon
2011-01-04 20:07 ` [PATCH 3/5] omap3: igep3: make igep3_flash_init static Nishanth Menon
2011-01-04 20:07 ` [PATCH 4/5] omap2+: wdt: trivial sparse fixes Nishanth Menon
2011-01-04 20:07 ` [PATCH 5/5] omap2+: pm_bus: make functions used as pointers as static Nishanth Menon
2011-01-05  0:40   ` Kevin Hilman
2011-01-06 22:43     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox