Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-21 Thread Simon Glass
Hi Peter, On Thu, Dec 21, 2023 at 9:13 AM Peter Robinson wrote: > > Hi Simon, > > > > > > > Hmm I don't know, but I wonder why I am not just checking > > > > > > t->bios_ver for Unknown. > > > > > > I'll have a look and change it > > > > > > > > > > Ok, this can't be changed as easily. smbios_a

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-21 Thread Peter Robinson
Hi Simon, > > > > > Hmm I don't know, but I wonder why I am not just checking t->bios_ver > > > > > for Unknown. > > > > > I'll have a look and change it > > > > > > > > Ok, this can't be changed as easily. smbios_add_prop() will not > > > > return NULL in any case. It returns an integer. With t

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-20 Thread Tom Rini
On Wed, Dec 20, 2023 at 10:32:26AM -0700, Simon Glass wrote: > Hi Peter, > > On Tue, 19 Dec 2023 at 13:40, Peter Robinson wrote: > > > > Hi Simon, > > > > On Mon, Dec 18, 2023 at 3:02 PM Simon Glass wrote: > > > > > > Hi Ilias, > > > > > > On Wed, 6 Dec 2023 at 04:36, Ilias Apalodimas > > > wro

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-20 Thread Simon Glass
Hi Peter, On Tue, 19 Dec 2023 at 13:40, Peter Robinson wrote: > > Hi Simon, > > On Mon, Dec 18, 2023 at 3:02 PM Simon Glass wrote: > > > > Hi Ilias, > > > > On Wed, 6 Dec 2023 at 04:36, Ilias Apalodimas > > wrote: > > > > > > [...] > > > > > > > > > > >> > > > >> > str = "Unknow

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-20 Thread Ilias Apalodimas
Hi Simon, The discussion is mostly on v3 now, so I assume this is outdated? Thanks /Ilias On Mon, 18 Dec 2023 at 17:02, Simon Glass wrote: > > Hi Ilias, > > On Wed, 6 Dec 2023 at 04:36, Ilias Apalodimas > wrote: > > > > [...] > > > > > > > >> > > >> > str = "Unknown"; > > >> > >

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-19 Thread Peter Robinson
Hi Simon, On Mon, Dec 18, 2023 at 3:02 PM Simon Glass wrote: > > Hi Ilias, > > On Wed, 6 Dec 2023 at 04:36, Ilias Apalodimas > wrote: > > > > [...] > > > > > > > >> > > >> > str = "Unknown"; > > >> > > > >> > for (;;) { > > >> > @@ -151,8 +151,7 @@ static int smbios_add_p

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-18 Thread Simon Glass
Hi Ilias, On Wed, 6 Dec 2023 at 04:36, Ilias Apalodimas wrote: > > [...] > > > > >> > >> > str = "Unknown"; > >> > > >> > for (;;) { > >> > @@ -151,8 +151,7 @@ static int smbios_add_prop_si(struct smbios_ctx > >> > *ctx, const char *prop, > >> > const char

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-12-06 Thread Ilias Apalodimas
[...] > >> >> > str = "Unknown"; >> > >> > for (;;) { >> > @@ -151,8 +151,7 @@ static int smbios_add_prop_si(struct smbios_ctx *ctx, >> > const char *prop, >> > const char *str; >> > >> > str = ofnode_read_string(ctx->node, prop); >> > -

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-11-29 Thread Ilias Apalodimas
Hi Simon, On Thu, 30 Nov 2023 at 04:46, Simon Glass wrote: > Hi Ilias, > > On Mon, 27 Nov 2023 at 10:11, Ilias Apalodimas > wrote: > > > > If a value is not valid during the DT or SYSINFO parsing, we explicitly > > set that to "Unknown Product" and "Unknown" for the product and > > manufactur

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-11-29 Thread Simon Glass
Hi Ilias, On Mon, 27 Nov 2023 at 10:11, Ilias Apalodimas wrote: > > If a value is not valid during the DT or SYSINFO parsing, we explicitly > set that to "Unknown Product" and "Unknown" for the product and > manufacturer respectively. It's cleaner if we move the checks insisde > smbios_add_stri

Re: [PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-11-27 Thread Tom Rini
On Mon, Nov 27, 2023 at 07:10:57PM +0200, Ilias Apalodimas wrote: > If a value is not valid during the DT or SYSINFO parsing, we explicitly > set that to "Unknown Product" and "Unknown" for the product and > manufacturer respectively. It's cleaner if we move the checks insisde > smbios_add_strin

[PATCH 1/2 v2] smbios: Simplify reporting of unknown values

2023-11-27 Thread Ilias Apalodimas
If a value is not valid during the DT or SYSINFO parsing, we explicitly set that to "Unknown Product" and "Unknown" for the product and manufacturer respectively. It's cleaner if we move the checks insisde smbios_add_string() and always report "Unknown" regardless of the missing field. pre-patch