dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dmidecode] [PATCH 6/6] dmidecode: Save the CPUID format


From: Jean Delvare
Subject: Re: [dmidecode] [PATCH 6/6] dmidecode: Save the CPUID format
Date: Fri, 5 Mar 2021 13:50:53 +0100

On Thu, 4 Mar 2021 18:13:46 -0700, Jerry Hoemann wrote:
> On Thu, Mar 04, 2021 at 05:49:25PM +0100, Jean Delvare wrote:
> > In order to decode the information from HPE type 199 in a
> > human-friendly way, we need to know how the CPUID data is encoded.
> > This depends on the CPU brand and family, so save this information for
> > later.
> > 
> > Signed-off-by: Jean Delvare <jdelvare@suse.de>
> > ---
> >  dmidecode.c |    6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > --- dmidecode.orig/dmidecode.c      2021-03-04 16:01:59.641999933 +0100
> > +++ dmidecode/dmidecode.c   2021-03-04 17:30:29.168678385 +0100
> > @@ -5248,12 +5248,12 @@ static void dmi_table_decode(u8 *buf, u3
> >  
> >             /* Assign vendor for vendor-specific decodes later */
> >             if (h.type == 1 && h.length >= 6)
> > -           {
> >                     dmi_set_vendor(_dmi_string(&h, data[0x04], 0),
> >                                    _dmi_string(&h, data[0x05], 0));
> > -                   break;
> > -           }
> >  
> > +           /* Remember CPUID type for HPE type 199 */
> > +           if (h.type == 4 && h.length >= 0x1A && cpuid_type != 
> > cpuid_none)  
> 
> Inverted sense on cpuid_type comparison.  Should be:
> 
>               if (h.type == 4 && h.length >= 0x1A && cpuid_type == cpuid_none)

Oops. Originally I wanted to write "!cpuid_type", then thought it would
be cleaner to compare to an actual enum value, but forgot to remove the
negation. Thanks for catching it.

Thank you very much for the fast review, very appreciated.
-- 
Jean Delvare
SUSE L3 Support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]