Hi,

> From: Richard Genoud <richard.gen...@posteo.net>
> Sent: mardi 13 octobre 2020 14:25
> 
> Hi Patrick,
> 
> Le 13/10/2020 à 14:18, Patrick DELAUNAY a écrit :
> > Hi Richard,
> >
> >> From: Richard Genoud <richard.gen...@posteo.net>
> >> Sent: lundi 12 octobre 2020 16:11
> >>
> >> spl_mmc_boot_partition is only defined when
> >> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION is defined.
> >>
> >> Signed-off-by: Richard Genoud <richard.gen...@posteo.net>
> >> ---
> >>   arch/arm/mach-stm32mp/spl.c | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >
> > Reviewed-by: Patrick Delaunay <patrick.delau...@st.com>
> >
> > Thanks for this missing check in spl.
> >
> > NB: after check, it is possible to IS_ENABLED to prevent #ifdef here
> >
> > <unknown>:0: warning: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if
> > or #ifdef' where possible
> 
> I don't think it's possible to use "if (IS_ENABLED(CONFIG...))"
> since we have to remove the whole function, not just some code in it.

Normally the unused function is remove by linker without compilation flag...

But after check on my side it is not possible to use IS_ENABLED(CONFIG_ here... 
 
because when the flags is absent, the 2 used CONFIG_ are also absent:
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2

And that cause compilation issue

Sorry for first feedback, I will take the patch in my next pull request.

 
> Regards,
> Richard

Regards
Patrick

Reply via email to