Skip to contentSkip to conversation

Janitor series: kill sparse warnings

PATCH New Nishanth Menon 1 participant 5 messages Jun 24, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Janitor series: kill sparse warnings

This series removes few of the sparse warnings I found. This series probably should be squashed with other patches in pm-sr branch

Nishanth Menon (4):
omap: sr: export sr_dbg_dir
omap3: sr: sr_exit should be static
omap3: voltage: make required variables static
omap3: voltage: expose omap_change_voltscale_method

 arch/arm/mach-omap2/smartreflex.c             |    2 +-
 arch/arm/mach-omap2/voltage.c                 |    6 +++---
 arch/arm/mach-omap2/voltage.h                 |    1 +
 arch/arm/plat-omap/include/plat/smartreflex.h |    5 +++++
 4 files changed, 10 insertions(+), 4 deletions(-)

Regards,
Nishanth Menon

Cc Kevin Hilman <[email protected]>
Cc Thara Gopinath <[email protected]>
#1 lore raw

PATCH 1/4 omap: sr: export sr_dbg_dir

sr_dbg_dir is currently used privately in smartreflex.c, however, smartreflex class drivers could store their own debugfs entries there as well.

This also fixes the sparse warning:
arch/arm/mach-omap2/smartreflex.c:44:15: warning: symbol 'sr_dbg_dir' was not declared. Should it be static?

Cc Kevin Hilman <[email protected]>
Cc Thara Gopinath <[email protected]>
---
 arch/arm/plat-omap/include/plat/smartreflex.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/smartreflex.h +5 -0
index 1105db0..df58026 100644
@@ -263,6 +263,11 @@ int omap_sr_register_class(struct omap_smartreflex_class_data *class_data);
 
 /* API to register the pmic specific data with the smartreflex driver. */
 void omap_sr_register_pmic(struct omap_smartreflex_pmic_data *pmic_data);
+
+#ifdef CONFIG_PM_DEBUG
+extern struct dentry *sr_dbg_dir;
+#endif
+
 #else
 static inline void omap_smartreflex_enable(int srid) {}
 static inline void omap_smartreflex_disable(int srid) {}
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 2/4 omap3: sr: sr_exit should be static

sr_exit has no business being a public function.
fixes sparse:
arch/arm/mach-omap2/smartreflex.c:959:13: warning: symbol 'sr_exit' was not declared. Should it be static?

Cc Kevin Hilman <[email protected]>
Cc Thara Gopinath <[email protected]>
---
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/smartreflex.c +1 -1
index 57fc9b2..786e896 100644
@@ -956,7 +956,7 @@ static int __init sr_init(void)
 	return 0;
 }
 
-void __exit sr_exit(void)
+static void __exit sr_exit(void)
 {
 	platform_driver_unregister(&smartreflex_driver);
 }
Signature · 1 line
1.6.3.3
#3 lore raw

PATCH 3/4 omap3: voltage: make required variables static

debugfs voltage_dir - used only by voltage layer and no reason for others to add data to it, so make it static. omap3_vp_offs, volt_mod have no business being exposed as global. make them static

This fixes sparse warnings:
arch/arm/mach-omap2/voltage.c:42:15: warning: symbol 'voltage_dir' was not declared. Should it be static? arch/arm/mach-omap2/voltage.c:49:5: warning: symbol 'volt_mod' was not declared. Should it be static? arch/arm/mach-omap2/voltage.c:130:27: warning: symbol 'omap3_vp_offs' was not declared. Should it be static?

Cc Kevin Hilman <[email protected]>
Cc Thara Gopinath <[email protected]>
---
 arch/arm/mach-omap2/voltage.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/voltage.c +3 -3
index d289691..6927d6a 100644
@@ -39,14 +39,14 @@
 #define VP_TRANXDONE_TIMEOUT	300
 
 #ifdef CONFIG_PM_DEBUG
-struct dentry *voltage_dir;
+static struct dentry *voltage_dir;
 #endif
 
 /* VP SR debug support */
 u32 enable_sr_vp_debug;
 
 /* PRM voltage module */
-u32 volt_mod;
+static u32 volt_mod;
 
 /* Voltage processor register offsets */
 struct vp_reg_offs {
@@ -127,7 +127,7 @@ static struct omap_vdd_info *vdd_info;
 static int no_scalable_vdd;
 
 /* OMAP3 VP register offsets and other definitions */
-struct __init vp_reg_offs omap3_vp_offs[] = {
+static struct __init vp_reg_offs omap3_vp_offs[] = {
 	/* VP1 */
 	{
 		.vpconfig_reg = OMAP3_PRM_VP1_CONFIG_OFFSET,
Signature · 1 line
1.6.3.3
#4 lore raw

PATCH 4/4 omap3: voltage: expose omap_change_voltscale_method

omap_change_voltscale_method is to be used by board files to choose which mechanism they would prefer to do update of voltage to thier PMIC. unless we expose it, they cant use it.

This also fixes sparse warning:
arch/arm/mach-omap2/voltage.c:1046:6: warning: symbol 'omap_change_voltscale_method' was not declared. Should it be static?

Cc Kevin Hilman <[email protected]>
Cc Thara Gopinath <[email protected]>
---
 arch/arm/mach-omap2/voltage.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/voltage.h +1 -0
index a7be515..6dc8ce4 100644
@@ -113,6 +113,7 @@ void omap_voltageprocessor_enable(int vp_id);
 void omap_voltageprocessor_disable(int vp_id);
 int omap_voltage_scale(int vdd, unsigned long target_volt);
 void omap_reset_voltage(int vdd);
+void omap_change_voltscale_method(int voltscale_method);
 int omap_get_voltage_table(int vdd, struct omap_volt_data **volt_data);
 struct omap_volt_data *omap_get_volt_data(int vdd, unsigned long volt);
 void omap_voltage_register_pmic(struct omap_volt_pmic_info *pmic_info);
Signature · 1 line
1.6.3.3