[U-Boot] [PATCH 02/14] spl: mmc: Fix build without LIBCOMMON_SUPPORT
Tom Rini
trini at konsulko.com
Sat Nov 26 21:45:47 CET 2016
On Fri, Nov 25, 2016 at 11:32:23PM +0100, Marek Vasut wrote:
> If CONFIG_SPL_LIBCOMMON_SUPPORT is undefined, the following error
> will happen, so fix it.
>
> In file included from common/spl/spl_mmc.c:11:0:
> common/spl/spl_mmc.c: In function ‘spl_mmc_load_image’:
> include/spl.h:18:30: error: label at end of compound statement
> #define MMCSD_MODE_UNDEFINED 0
> ^
> common/spl/spl_mmc.c:335:7: note: in expansion of macro ‘MMCSD_MODE_UNDEFINED’
> case MMCSD_MODE_UNDEFINED:
> ^
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Pantelis Antoniou <panto at antoniou-consulting.com>
> Cc: Tom Rini <trini at konsulko.com>
> ---
> common/spl/spl_mmc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index 0b681c2..43c1030 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -343,10 +343,12 @@ static int spl_mmc_load_image(struct spl_image_info *spl_image,
>
> break;
> case MMCSD_MODE_UNDEFINED:
> -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
> default:
> + {
> +#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
> puts("spl: mmc: wrong boot mode\n");
> #endif
> + }
> }
>
> return err;
I think we have something slightly off here. Is
CONFIG_SPL_SERIAL_SUPPORT also enabled? That would turn this into a
no-op as puts becomes a do { } while(0), if disabled. So I think we
should just remove the ifdef here.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161126/51959093/attachment.sig>
More information about the U-Boot
mailing list