poplar: fix build error with POPLAR_RECOVERY=1
authorShawn Guo <shawn.guo@linaro.org>
Thu, 27 Sep 2018 08:48:00 +0000 (16:48 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Thu, 27 Sep 2018 09:04:46 +0000 (17:04 +0800)
Commit eba1b6b3c724 ("plat/poplar: migrate to mmc framework") defines
variable 'info' without !POPLAR_RECOVERY protection, and hence causes
the following unused variable error with POPLAR_RECOVERY=1 build.

plat/hisilicon/poplar/bl1_plat_setup.c: In function ‘bl1_platform_setup’:
plat/hisilicon/poplar/bl1_plat_setup.c:95:25: error: unused variable ‘info’ [-Werror=unused-variable]
  struct mmc_device_info info;
                         ^~~~

The patches fixes the build error with POPLAR_RECOVERY=1.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
plat/hisilicon/poplar/bl1_plat_setup.c
plat/hisilicon/poplar/bl2_plat_setup.c

index 6fc4f3328c508b31e9cc3e5957b087e59bb2dc6b..f40bcf319fd0cc351b61f9dfc6c34496f6d22bd3 100644 (file)
@@ -92,8 +92,8 @@ void bl1_plat_arch_setup(void)
 void bl1_platform_setup(void)
 {
        int i;
-       struct mmc_device_info info;
 #if !POPLAR_RECOVERY
+       struct mmc_device_info info;
        dw_mmc_params_t params = EMMC_INIT_PARAMS(POPLAR_EMMC_DESC_BASE);
 #endif
 
index 041ed4ad5e83a7c00bc578489b26dca7cd69a5b2..94d59ffb863a433ad5404ab22499ede83edb3cee 100644 (file)
@@ -333,9 +333,9 @@ void bl2_plat_get_bl33_meminfo(meminfo_t *bl33_meminfo)
 
 void bl2_early_platform_setup(meminfo_t *mem_layout)
 {
+#if !POPLAR_RECOVERY
        struct mmc_device_info info;
 
-#if !POPLAR_RECOVERY
        dw_mmc_params_t params = EMMC_INIT_PARAMS(POPLAR_EMMC_DESC_BASE);
 #endif