All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: tomm.merciai@gmail.com, linuxfancy@googlegroups.com,
	Peng Fan <peng.fan@nxp.com>, Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	u-boot@lists.denx.de
Subject: [PATCH] freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef
Date: Sun, 26 Dec 2021 18:23:11 +0100	[thread overview]
Message-ID: <20211226172311.176475-1-tomm.merciai@gmail.com> (raw)

Use IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG) to make the code
more readable and fix checkpatch.pl warning

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
---
 board/freescale/imx8mm_evk/imx8mm_evk.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
index ab55135a97..e0975fcda7 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.c
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
@@ -60,9 +60,10 @@ int board_mmc_get_env_dev(int devno)
 
 int board_late_init(void)
 {
-#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-	env_set("board_name", "EVK");
-	env_set("board_rev", "iMX8MM");
-#endif
+	if (IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) {
+		env_set("board_name", "EVK");
+		env_set("board_rev", "iMX8MM");
+	}
+
 	return 0;
 }
-- 
2.25.1


             reply	other threads:[~2021-12-26 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 17:23 Tommaso Merciai [this message]
2022-02-19 13:08 ` [PATCH] freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef sbabic
2022-02-24  9:29   ` Tommaso Merciai

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=20211226172311.176475-1-tomm.merciai@gmail.com \
    --to=tomm.merciai@gmail.com \
    --cc=festevam@gmail.com \
    --cc=linuxfancy@googlegroups.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.