[PATCH v2 06/16] bootsource: stub out when in PBL
Sascha Hauer
s.hauer at pengutronix.de
Thu Nov 28 01:47:45 PST 2024
On Mon, Nov 25, 2024 at 04:12:18PM +0100, Ahmad Fatoum wrote:
> To optimize out calls to undefined functions in PBL at compile-time
> instead of link time, let's use IS_PROPER instead of IS_ENABELED(),
The last part of the sentence doesn't match this patch anymore.
Sascha
> so the remainder of the code is skipped in PBL build instead of relying
> on linker garbage collection.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> common/bootsource.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/bootsource.c b/common/bootsource.c
> index 6808c9c51d88..d82bb5f18c52 100644
> --- a/common/bootsource.c
> +++ b/common/bootsource.c
> @@ -158,7 +158,7 @@ int bootsource_of_alias_xlate(enum bootsource src, int instance)
> struct device_node *np;
> int alias_id;
>
> - if (!IS_ENABLED(CONFIG_OFDEVICE))
> + if (!IS_ENABLED(CONFIG_OFDEVICE) || IN_PBL)
> return BOOTSOURCE_INSTANCE_UNKNOWN;
>
> if (src == BOOTSOURCE_UNKNOWN ||
> --
> 2.39.5
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list