[U-Boot] [PATCH v2] zmx25: Fix build warning due to 'get_reset_cause' defined but not used

Fabio Estevam fabio.estevam at freescale.com
Fri Sep 23 16:16:51 CEST 2011


When building the zmx25 target we get:

Configuring for zmx25 board...
generic.c:108: warning: 'get_reset_cause' defined but not used

Fix this warning by defining get_reset_cause only if CONFIG_DISPLAY_CPUINFO is defined.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
Changes since v1:

- Only define get_reset_cause when CONFIG_DISPLAY_CPUINFO is defined.

 arch/arm/cpu/arm926ejs/mx25/generic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 1261640..91b04c1 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -105,6 +105,7 @@ ulong imx_get_perclk (int clk)
 	return lldiv (fref, div);
 }
 
+#if defined(CONFIG_DISPLAY_CPUINFO)
 static char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
@@ -127,6 +128,7 @@ static char *get_reset_cause(void)
 		return "unknown reset";
 
 }
+#endif
 
 u32 get_cpu_rev(void)
 {
-- 
1.6.0.4




More information about the U-Boot mailing list