* [U-Boot] [PATCH v2] zmx25: Fix build warning due to 'get_reset_cause' defined but not used
@ 2011-09-23 14:16 Fabio Estevam
2011-09-23 14:23 ` Stefano Babic
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2011-09-23 14:16 UTC (permalink / raw)
To: u-boot
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@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
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH v2] zmx25: Fix build warning due to 'get_reset_cause' defined but not used
2011-09-23 14:16 [U-Boot] [PATCH v2] zmx25: Fix build warning due to 'get_reset_cause' defined but not used Fabio Estevam
@ 2011-09-23 14:23 ` Stefano Babic
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2011-09-23 14:23 UTC (permalink / raw)
To: u-boot
On 09/23/2011 04:16 PM, Fabio Estevam wrote:
> 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@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
>
I know it does not change how it works...but should be not better to
move the get_reset_cause() function where the CONFIG_DISPLAY_CPUINFO is
already active ? I mean, before the print_cpuinfo() function ? This
enforces that the two functions are not disjuncted. I know this is only
a question of taste, what do you think about it ?
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-23 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23 14:16 [U-Boot] [PATCH v2] zmx25: Fix build warning due to 'get_reset_cause' defined but not used Fabio Estevam
2011-09-23 14:23 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox