[PATCH V8 14/14] common: Replace #ifdef and #if with if's

Simon Glass sjg at chromium.org
Thu Apr 20 00:40:20 CEST 2023


On Wed, 19 Apr 2023 at 18:11, Nikhil M Jain <n-jain1 at ti.com> wrote:
>
> Avoid using preprocessor compilation directives and instead use simple
> logical expressions for better readability since compiler will anyway
> optimize out the respective code block if condition is not satisfied.
>
> Signed-off-by: Nikhil M Jain <n-jain1 at ti.com>
> ---
> V8:
> - Update as per review comments.
> - Call bmp_display only when CONFIG_BMP is defined.
>
> V7(patch introduced):
> - Replace #ifdef and #if with if's.
>
>  common/bmp.c     | 14 +++++---------
>  common/splash.c  | 14 +++++++-------
>  include/splash.h | 11 -----------
>  3 files changed, 12 insertions(+), 27 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list