[PATCH 3/5] sysinfo: Require that sysinfo_detect be called before other methods

Simon Glass sjg at chromium.org
Fri Mar 5 05:08:29 CET 2021


Hi Sean,

On Mon, 1 Mar 2021 at 15:46, Sean Anderson <sean.anderson at seco.com> wrote:
>
> This updates sysinfo documentation to document that detect() must be
> called first. This allows drivers to cache information in detect() and
> perform (cheaper) retrieval in the other accessors. This also modifies
> the only instance where this sequencing was not followed.
>
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
> ---
>
>  common/spl/spl_fit.c |  4 ++++
>  include/sysinfo.h    | 29 ++++++++++++++++++++---------
>  2 files changed, 24 insertions(+), 9 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Is it possible to enforce this in the uclass? Also I think -EPERM or
-EACCES might be better than -ENOENT.


More information about the U-Boot mailing list