Skip to contentSkip to conversation

freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef

PATCH New Tommaso Merciai 3 participants 3 messages Dec 26, 2021 – Feb 24, 2022 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef

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

---
 board/freescale/imx8mm_evk/imx8mm_evk.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
board/freescale/imx8mm_evk/imx8mm_evk.c +5 -4
index ab55135a97..e0975fcda7 100644
@@ -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;
 }
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef

Quoted 3 lines

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

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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: [email protected]
=====================================================================
#2 lore raw
Quoted 4 lines · On Sat, Feb 19, 2022 at 02:08:09PM +0100, [email protected] wrote:
Quoted 3 lines

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

Applied to u-boot-imx, master, thanks !

Hi Stefano,
Thanks for the update.

Tommaso

Quoted 10 lines

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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: [email protected]
=====================================================================
Signature · 10 lines
Tommaso Merciai
Embedded Linux Developer
[email protected]
__________________________________

Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
[email protected]
www.amarulasolutions.com