Re: [PATCH 2/2] x86, ACPI: Fix the wrong assignment when Handle apic/x2apic entries

From: Baoquan He
Date: Thu Aug 11 2016 - 10:20:38 EST


On 08/11/16 at 10:46am, Ingo Molnar wrote:
> > > > - count = madt_proc[1].count;
> > > > + count = madt_proc[0].count;
> > > > + x2count = madt_proc[1].count;
> > > > }
> > > > if (!count && !x2count) {
> > ~~~~~~~~~~~~~~~~~~~~~
> > I mean here the value checking won't be impacted by the wrong
> > assignment.
>
> Indeed!
>
> Mind putting that into the changelog? Something like:
>
> "By pure accident the bug makes no functional difference, because the only
> expression where we are using these values is (!count && !x2count), in which
> the variables are interchangeable, but it makes sense to fix the bug
> nevertheless."

Sure, this is much clearer. Will use this and repost. Thanks a lot, will
try to do each post using patch log like this.

Thanks
Baoquan