Hi Nora, On 2026-05-08T08:48:28, Feilke, Alexander <[email protected]> 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 <[email protected]> > Signed-off-by: Alexander Feilke <[email protected]> > Signed-off-by: Nora Schiffer <[email protected]> > Signed-off-by: Alexander Feilke <[email protected]> > > include/sysinfo.h | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+)
Reviewed-by: Simon Glass <[email protected]> > commit 4e2201c3294275168ba5ae00b20c9db89879474e > Signed-off-by: Nora Schiffer <[email protected]> > Signed-off-by: Alexander Feilke <[email protected]> > Signed-off-by: Nora Schiffer <[email protected]> > Signed-off-by: Alexander Feilke <[email protected]> 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

