[PATCH] ARM: i.MX: Make sure *_get_boot_source always assignes *src

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Jun 10 13:41:56 PDT 2022


Hey Ahmad,

On Fri, Jun 10, 2022 at 07:34:49PM +0200, Ahmad Fatoum wrote:
> On 10.06.22 18:50, Uwe Kleine-König wrote:
> > Callers of *_get_boot_source (e.g. start_atf() of
> > nxp-imx8mm-evk or protonic-imx8m) expect src to hold the bootsource
> > after return. So assign a value also for the "unknown" case.
> 
> Did you check existing in-tree users to make sure none assigned
> a different fallback value and assumed it won't be overwritten
> if no bootsource could be found?

I checked that now as of 345ef59aa0ea:

There are ten users, 3 of them initialize src to BOOTSOURCE_UNKNOWN, the
other 7 don't initialize at all.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20220610/42cab016/attachment.sig>


More information about the barebox mailing list