Message ID | 20240816154658.1866186-5-raymond.mao@linaro.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | SMBIOS improvements | expand |
On 8/16/24 17:46, Raymond Mao wrote: > During writing SMBIOS table, implementation of sysinfo detect > function for a specific platform is not mandatory. > Thus we should not return an error when platform sysinfo > detect function does not exist. first of all you should avoid we and use imperative mood. Second what you are writing here is not matching what your change does. Simon did a patch not to make it mandatory. M > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org> > --- > lib/smbios.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/lib/smbios.c b/lib/smbios.c > index 8e481365165..2f1759d419e 100644 > --- a/lib/smbios.c > +++ b/lib/smbios.c > @@ -825,10 +825,9 @@ ulong write_smbios_table(ulong addr) > if (CONFIG_IS_ENABLED(SYSINFO)) { > uclass_first_device(UCLASS_SYSINFO, &ctx.dev); > if (ctx.dev) { > - int ret; > + int ret = sysinfo_detect(ctx.dev); > > parent_node = dev_read_subnode(ctx.dev, "smbios"); > - ret = sysinfo_detect(ctx.dev); > > /* > * ignore the error since many boards don't implement
diff --git a/lib/smbios.c b/lib/smbios.c index 8e481365165..2f1759d419e 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -825,10 +825,9 @@ ulong write_smbios_table(ulong addr) if (CONFIG_IS_ENABLED(SYSINFO)) { uclass_first_device(UCLASS_SYSINFO, &ctx.dev); if (ctx.dev) { - int ret; + int ret = sysinfo_detect(ctx.dev); parent_node = dev_read_subnode(ctx.dev, "smbios"); - ret = sysinfo_detect(ctx.dev); /* * ignore the error since many boards don't implement
During writing SMBIOS table, implementation of sysinfo detect function for a specific platform is not mandatory. Thus we should not return an error when platform sysinfo detect function does not exist. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> --- lib/smbios.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)