[U-Boot] [RFC PATCH 05/44] image: Move timestamp #ifdefs to header file

Marek Vasut marex at denx.de
Sat Jan 5 09:03:48 CET 2013


Dear Simon Glass,

> Rather than repeat the line
>  #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || \
> 	defined(USE_HOSTCC)
> 
> everywhere, put this in a header file and #define IMAGE_ENABLE_TIMESTAMP
> to either 1 or 0. Then we can use a plain if() in most code and avoid
> the #ifdefs.
> 
> The compiler's dead code elimination ensures that the result is the same.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Acked-by: Marek Vasut <marex at denx.de>

Best regards,
Marek Vasut


More information about the U-Boot mailing list