public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/2] x86, ACPI: Fix the wrong assignment when Handle apic/x2apic entries
Date: Thu, 11 Aug 2016 10:46:52 +0200	[thread overview]
Message-ID: <20160811084652.GA4249@gmail.com> (raw)
In-Reply-To: <20160810130333.GA5598@x1.redhat.com>


* Baoquan He <bhe@redhat.com> wrote:

> On 08/10/16 at 02:53pm, Ingo Molnar wrote:
> > 
> > * Baoquan He <bhe@redhat.com> wrote:
> > 
> > > It won't impact the result, we still should fix the code bug.
> > > 
> > > Signed-off-by: Baoquan He <bhe@redhat.com>
> > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > > Cc: Len Brown <len.brown@intel.com>
> > > Cc: Pavel Machek <pavel@ucw.cz>
> > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > Cc: Ingo Molnar <mingo@redhat.com>
> > > Cc: "H. Peter Anvin" <hpa@zytor.com>
> > > Cc: x86@kernel.org
> > > Cc: linux-pm@vger.kernel.org
> > > ---
> > >  arch/x86/kernel/acpi/boot.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> > > index 90d84c3..2b25d3f 100644
> > > --- a/arch/x86/kernel/acpi/boot.c
> > > +++ b/arch/x86/kernel/acpi/boot.c
> > > @@ -1031,8 +1031,8 @@ static int __init acpi_parse_madt_lapic_entries(void)
> > >  			return ret;
> > >  		}
> > >  
> > > -		x2count = madt_proc[0].count;
> > > -		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."

Thanks,

	Ingo

  reply	other threads:[~2016-08-11  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 23:01 [PATCH 1/2] ACPI/tables: Correct the wrong count increasing Baoquan He
2016-08-08 23:01 ` [PATCH 2/2] x86, ACPI: Fix the wrong assignment when Handle apic/x2apic entries Baoquan He
2016-08-10 12:53   ` Ingo Molnar
2016-08-10 13:03     ` Baoquan He
2016-08-11  8:46       ` Ingo Molnar [this message]
2016-08-11 14:20         ` Baoquan He
2016-08-08 23:27 ` [PATCH 1/2] ACPI/tables: Correct the wrong count increasing kbuild test robot
2016-08-09  0:28   ` Baoquan He
2016-08-09  0:30 ` [PATCH v2 " Baoquan He
2016-08-16  2:26   ` Zheng, Lv
2016-08-16  8:21     ` Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160811084652.GA4249@gmail.com \
    --to=mingo@kernel.org \
    --cc=bhe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox