diff mbox series

[U-Boot] spl: spl_mmc: add __maybe_unused to mmc_load_image_raw_sector()

Message ID 1505795385-29740-1-git-send-email-sw0312.kim@samsung.com
State Accepted
Commit b016b585425b66ea53eef6b8600aff78a4205b9e
Delegated to: Jaehoon Chung
Headers show
Series [U-Boot] spl: spl_mmc: add __maybe_unused to mmc_load_image_raw_sector() | expand

Commit Message

Seung-Woo Kim Sept. 19, 2017, 4:29 a.m. UTC
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.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
---
 common/spl/spl_mmc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Jaehoon Chung Sept. 29, 2017, 2:30 a.m. UTC | #1
On 09/19/2017 01:29 PM, Seung-Woo Kim wrote:
> 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.
> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>

Applied to u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  common/spl/spl_mmc.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index b2cccc6..b57e0b0 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -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;
>
diff mbox series

Patch

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index b2cccc6..b57e0b0 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -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;