[U-Boot] [PATCH v4 07/13] davinci: Use correct #ifdef around gdata/bdata

Simon Glass sjg at chromium.org
Tue Feb 21 02:32:49 CET 2012


This fixes the following warnings in an SPL build when libcommon is
in use:

spl.c:37: warning: 'gdata' defined but not used
spl.c:38: warning: 'bdata' defined but not used

Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v4:
- Add new patch to fix davinci build warnings

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

diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
index b1eff26..2861907 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -32,10 +32,12 @@
 
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
 
+#ifdef CONFIG_SPL_SPI_LOAD
 DECLARE_GLOBAL_DATA_PTR;
 /* Define global data structure pointer to it*/
 static gd_t gdata __attribute__ ((section(".data")));
 static bd_t bdata __attribute__ ((section(".data")));
+#endif
 
 #else
 
-- 
1.7.7.3



More information about the U-Boot mailing list