[PATCH v2 2/2] arm: imx: imx8m: soc: replace ifdef by IS_ENABLED()

Quentin Schulz quentin.schulz at cherry.de
Thu May 15 15:40:15 CEST 2025


Hi Dario,

On 5/15/25 3:30 PM, Dario Binacchi wrote:
> Standardize on using the IS_ENABLED macro.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> 
> ---
> 
> (no changes since v1)
> 
>   arch/arm/mach-imx/imx8m/soc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index 806adcf145fa..6c53555d22bf 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -791,7 +791,7 @@ int boot_mode_getprisec(void)
>   #endif
>   
>   #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP)

You can even do those two as well :)

and all the others in this file :) I would recommend to only do for 
those that start with CONFIG_ which are Kconfig symbols. E.g. 
PHYS_SDRAM_2_SIZE isn't, so I don't think you can use IS_ENABLED.

The easiest way to check everything is fine is to compile before and 
after patching the file and checking that the output is bit to bit 
identical (you may need to change the SOURCE_DATE_EPOCH to guarantee 
that though?

Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>

Thanks!
Quentin


More information about the U-Boot mailing list