diff mbox series

freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef

Message ID 20211226172311.176475-1-tomm.merciai@gmail.com
State Accepted
Commit 22636ca23b0ff2bf89b50b0b9c5c745e2fe9d55e
Delegated to: Stefano Babic
Headers show
Series freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef | expand

Commit Message

Tommaso Merciai Dec. 26, 2021, 5:23 p.m. UTC
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(-)

Comments

Stefano Babic Feb. 19, 2022, 1:08 p.m. UTC | #1
> 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
Tommaso Merciai Feb. 24, 2022, 9:29 a.m. UTC | #2
On Sat, Feb 19, 2022 at 02:08:09PM +0100, sbabic@denx.de wrote:
> > 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>
> Applied to u-boot-imx, master, thanks !

Hi Stefano,
Thanks for the update.

Tommaso
> 
> 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@denx.de
> =====================================================================
diff mbox series

Patch

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;
 }