[PATCH 2/6] sysinfo: add sysinfo_get_and_detect() helper
Simon Glass
sjg at chromium.org
Fri May 8 19:57:47 CEST 2026
Hi Nora,
On 2026-05-08T08:48:28, Feilke, Alexander
<Alexander.Feilke at ew.tq-group.com> wrote:
> sysinfo: add sysinfo_get_and_detect() helper
>
> sysinfo_detect() is commonly called after sysinfo_get(). Make the API a
> bit more convenient to use by introducing a helper.
>
> Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
> Signed-off-by: Alexander Feilke <alexander.feilke at ew.tq-group.com>
> Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
> Signed-off-by: Alexander Feilke <alexander.feilke at ew.tq-group.com>
>
> include/sysinfo.h | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
> commit 4e2201c3294275168ba5ae00b20c9db89879474e
> Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
> Signed-off-by: Alexander Feilke <alexander.feilke at ew.tq-group.com>
> Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
> Signed-off-by: Alexander Feilke <alexander.feilke at ew.tq-group.com>
Each Signed-off-by appears twice - please drop the duplicates.
> diff --git a/include/sysinfo.h b/include/sysinfo.h
> @@ -446,3 +446,24 @@ static inline int sysinfo_get_fit_loadable(struct udevice *dev, int index,
> +/**
> + * sysinfo_get_and_detect() - Return the sysinfo device for the sysinfo in
> + * question and runs its detect operation.
> + * @devp: Pointer to structure to receive the sysinfo device.
> + *
> + * Since there can only be at most one sysinfo instance, the API can supply a
> + * function that returns the unique device. This is especially useful for use
> + * in sysinfo files.
> + *
> + * Return: 0 if OK, -ve on error.
> + */
Please rewrite to describe what the helper does, e.g. "Get the sysinfo
device and run its detect operation" and describe it as a convenience
wrapper around sysinfo_get() followed by sysinfo_detect()
Regards,
Simon
More information about the U-Boot
mailing list