spl: spl_mmc: add __maybe_unused to mmc_load_image_raw_sector() 91/150891/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 19 Sep 2017 04:13:54 +0000 (13:13 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 19 Sep 2017 04:26:38 +0000 (13:26 +0900)
If there are no CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION,
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR and CONFIG_SPL_OS_BOOT,
there is unused-function build warning. Add __maybe_unused macro
to remove the warning.

Change-Id: I4c8c8c22c949754a15cd951b5de61896ab341e32
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
common/spl/spl_mmc.c

index 18c1b59b22ccfb08533664967890bb442263a9c4..762b717c9fbe1d08ec80e13f31260f73a8d46c8f 100644 (file)
@@ -52,8 +52,9 @@ static ulong h_spl_load_read(struct spl_load_info *load, ulong sector,
        return blk_dread(mmc_get_blk_desc(mmc), sector, count, buf);
 }
 
-static int mmc_load_image_raw_sector(struct spl_image_info *spl_image,
-                                    struct mmc *mmc, unsigned long sector)
+static __maybe_unused
+int mmc_load_image_raw_sector(struct spl_image_info *spl_image,
+                             struct mmc *mmc, unsigned long sector)
 {
        unsigned long count;
        struct image_header *header;