public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: sbabic at denx.de <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCHv2 1/5] compiler.h: add host_build()
Date: Sat, 26 Dec 2020 16:53:56 +0100 (CET)	[thread overview]
Message-ID: <20201226155356.E545D82677@phobos.denx.de> (raw)
In-Reply-To: <20201214234157.202120-2-sebastian.reichel@collabora.com>

> Add a host_build() function, so that it's possible to
> check for software being build with USE_HOSTCC without
> relying on preprocessor conditions. In other words
>  #ifdef USE_HOSTCC
>  	host_only_code();
>  #endif
> can be written like this instead:
>  if (host_build())
>  	host_only_code();
> This improves code readability and test coverage and
> compiler will eleminate this unreachable code.
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  parent reply	other threads:[~2020-12-26 15:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 23:41 [PATCHv2 0/5] GE Bx50v3 cleanups Sebastian Reichel
2020-12-14 23:41 ` [PATCHv2 1/5] compiler.h: add host_build() Sebastian Reichel
2020-12-19  2:28   ` Simon Glass
2020-12-26 15:53   ` sbabic at denx.de [this message]
2020-12-14 23:41 ` [PATCHv2 2/5] image: cleanup pre-processor usage Sebastian Reichel
2020-12-19  2:28   ` Simon Glass
2020-12-14 23:41 ` [PATCHv2 3/5] image: support board_fit_config_name_match Sebastian Reichel
2020-12-19  2:28   ` Simon Glass
2020-12-28 11:39   ` Stefano Babic
2021-01-04 19:27     ` Sebastian Reichel
2021-01-04 19:41       ` Stefano Babic
2021-01-05 17:27         ` Sebastian Reichel
2021-01-05 19:33           ` Stefano Babic
2020-12-14 23:41 ` [PATCHv2 4/5] board: ge: bx50v3: remove confidx magic numbers Sebastian Reichel
2020-12-26 15:53   ` sbabic at denx.de
2020-12-14 23:41 ` [PATCHv2 5/5] board: ge: bx50v3: cleanup phy config Sebastian Reichel
2020-12-26 15:54   ` sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201226155356.E545D82677@phobos.denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox