linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().
  2013-07-23  1:39 [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic() Tang Chen
@ 2013-07-23  1:38 ` Brown, Len
  2013-07-23  7:39 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Brown, Len @ 2013-07-23  1:38 UTC (permalink / raw)
  To: Tang Chen, pavel@ucw.cz, rjw@sisk.pl, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org

Reviewed-by: Len Brown <len.brown@intel.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().
@ 2013-07-23  1:39 Tang Chen
  2013-07-23  1:38 ` Brown, Len
  2013-07-23  7:39 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Tang Chen @ 2013-07-23  1:39 UTC (permalink / raw)
  To: len.brown, pavel, rjw, tglx, mingo, hpa, x86, linux-pm,
	linux-kernel

We wanted to check if the acpi id is out of range. It should be:
	if (id >= (MAX_LOCAL_APIC)).

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 arch/x86/kernel/acpi/boot.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index d81a972..2a15ae7 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -199,7 +199,7 @@ static void __cpuinit acpi_register_lapic(int id, u8 enabled)
 {
 	unsigned int ver = 0;
 
-	if (id >= (MAX_LOCAL_APIC-1)) {
+	if (id >= (MAX_LOCAL_APIC)) {
 		printk(KERN_INFO PREFIX "skipped apicid that is too big\n");
 		return;
 	}
-- 
1.7.10.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().
  2013-07-23  1:39 [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic() Tang Chen
  2013-07-23  1:38 ` Brown, Len
@ 2013-07-23  7:39 ` Ingo Molnar
  2013-07-23  7:55   ` Tang Chen
  1 sibling, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2013-07-23  7:39 UTC (permalink / raw)
  To: Tang Chen
  Cc: len.brown, pavel, rjw, tglx, mingo, hpa, x86, linux-pm,
	linux-kernel


* Tang Chen <tangchen@cn.fujitsu.com> wrote:

> We wanted to check if the acpi id is out of range. It should be:
> 	if (id >= (MAX_LOCAL_APIC)).

Does this have any practical impact, or can it wait until v3.12?

> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> ---
>  arch/x86/kernel/acpi/boot.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index d81a972..2a15ae7 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -199,7 +199,7 @@ static void __cpuinit acpi_register_lapic(int id, u8 enabled)
>  {
>  	unsigned int ver = 0;
>  
> -	if (id >= (MAX_LOCAL_APIC-1)) {
> +	if (id >= (MAX_LOCAL_APIC)) {

The parentheses are now superfluous.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic().
  2013-07-23  7:39 ` Ingo Molnar
@ 2013-07-23  7:55   ` Tang Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Tang Chen @ 2013-07-23  7:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: len.brown, pavel, rjw, tglx, mingo, hpa, x86, linux-pm,
	linux-kernel

On 07/23/2013 03:39 PM, Ingo Molnar wrote:
>
> * Tang Chen<tangchen@cn.fujitsu.com>  wrote:
>
>> We wanted to check if the acpi id is out of range. It should be:
>> 	if (id>= (MAX_LOCAL_APIC)).
>
> Does this have any practical impact, or can it wait until v3.12?

I haven't tested out any impact now, just found it when reading the code.
We can wait until v3.12.

>
>> Signed-off-by: Tang Chen<tangchen@cn.fujitsu.com>
>> ---
>>   arch/x86/kernel/acpi/boot.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
>> index d81a972..2a15ae7 100644
>> --- a/arch/x86/kernel/acpi/boot.c
>> +++ b/arch/x86/kernel/acpi/boot.c
>> @@ -199,7 +199,7 @@ static void __cpuinit acpi_register_lapic(int id, u8 enabled)
>>   {
>>   	unsigned int ver = 0;
>>
>> -	if (id>= (MAX_LOCAL_APIC-1)) {
>> +	if (id>= (MAX_LOCAL_APIC)) {
>
> The parentheses are now superfluous.

Oh, yes. I'll send a new version without the parentheses.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-23  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23  1:39 [PATCH 1/1] x86, acpi: Fix wrong checking condition in acpi_register_lapic() Tang Chen
2013-07-23  1:38 ` Brown, Len
2013-07-23  7:39 ` Ingo Molnar
2013-07-23  7:55   ` Tang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).