Skip to contentSkip to conversation

arm/imx-common: Fix warning 'get_reset_cause' defined but not used

PATCH New Prabhakar Kushwaha 3 participants 4 messages May 18, 2015 – May 19, 2015

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

PATCH 1/1 arm/imx-common: Fix warning 'get_reset_cause' defined but not used

Fix below warning
arch/arm/imx-common/cpu.c:29:14: warning: ?get_reset_cause? defined but not used
static char *get_reset_cause(void)

---
 arch/arm/imx-common/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/imx-common/cpu.c +2 -0
index 067d08f..0cd08cb 100644
@@ -24,6 +24,7 @@
 #include <fsl_esdhc.h>
 #endif
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 static u32 reset_cause = -1;
 
 static char *get_reset_cause(void)
@@ -60,6 +61,7 @@ u32 get_imx_reset_cause(void)
 {
 	return reset_cause;
 }
+#endif
 
 #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
 #if defined(CONFIG_MX53)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm/imx-common: Fix warning 'get_reset_cause' defined but not used

Hi Prabhakar,

Quoted 24 lines · Prabhakar Kushwaha

Fix below warning
arch/arm/imx-common/cpu.c:29:14: warning: ?get_reset_cause? defined but not used
static char *get_reset_cause(void)

---
 arch/arm/imx-common/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/imx-common/cpu.c +1 -0
index 067d08f..0cd08cb 100644
@@ -24,6 +24,7 @@
 #include <fsl_esdhc.h>
 #endif
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 static u32 reset_cause = -1;
 
 static char *get_reset_cause(void)

arch/arm/imx-common/cpu.c u32 get_imx_reset_cause(void) · line 67

Quoted 7 lines
arch/arm/imx-common/cpu.c +1 -0
@@ -60,6 +61,7 @@ u32 get_imx_reset_cause(void)
 {
 	return reset_cause;
 }
+#endif
 
 #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
 #if defined(CONFIG_MX53)

This makes the dependency clear, even if it's odd.

#2 lore raw

PATCH 1/1 arm/imx-common: Fix warning 'get_reset_cause' defined but not used

Hi Prabhakar, Eric,

Quoted 31 lines · Eric Nelson

Hi Prabhakar,

Quoted 28 lines · Prabhakar Kushwaha

Fix below warning
arch/arm/imx-common/cpu.c:29:14: warning: ?get_reset_cause? defined but not used
static char *get_reset_cause(void)

---
 arch/arm/imx-common/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/imx-common/cpu.c +2 -0
index 067d08f..0cd08cb 100644
@@ -24,6 +24,7 @@
 #include <fsl_esdhc.h>
 #endif
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 static u32 reset_cause = -1;
 
 static char *get_reset_cause(void)
@@ -60,6 +61,7 @@ u32 get_imx_reset_cause(void)
 {
 	return reset_cause;
 }
+#endif
 
Quoted 8 lines

arch/arm/imx-common/cpu.c u32 get_imx_reset_cause(void) · line 67

Quoted 3 lines
arch/arm/imx-common/cpu.c +0 -0
 #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
 #if defined(CONFIG_MX53)

This makes the dependency clear, even if it's odd.

Yes, anyway this is what we already use for other SOCs (iMX31, iMX35,.. they have a local get_reset_cause() protected by this switch).

Best regards,
Stefano babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/1 arm/imx-common: Fix warning 'get_reset_cause' defined but not used

In reply to Prabhakar Kushwaha
Quoted 7 lines · Prabhakar Kushwaha

Fix below warning
arch/arm/imx-common/cpu.c:29:14: warning: ?get_reset_cause? defined but not used
static char *get_reset_cause(void)

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================