public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: yakui_zhao <yakui.zhao@intel.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: "lenb@kernel.org" <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] ACPI: get_throttling_state() cannot be larger state_count
Date: Thu, 12 Feb 2009 10:35:26 +0800	[thread overview]
Message-ID: <1234406126.3652.61.camel@localhost.localdomain> (raw)
In-Reply-To: <49932BF4.2010005@gmail.com>

On Thu, 2009-02-12 at 03:50 +0800, Roel Kluin wrote:
   In fact the function of acpi_get_throttling_state will be used only
when the _PTC(throttling object) exists. The status argument will be
compared with the _TSS package. In theory it will be found in the _TSS
package and the corresponding T-state will be obtained. 

But from the program logic it will be OK.

acked-by: <yakui.zhao@intel.com>

Thanks.    
> With for(i = 0; i < n; i++) { ... } i reaches n.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
> index d278381..6feb9ab 100644
> --- a/drivers/acpi/processor_throttling.c
> +++ b/drivers/acpi/processor_throttling.c
> @@ -785,7 +785,7 @@ static int acpi_get_throttling_state(struct acpi_processor *pr,
>  		if (tx->control == value)
>  			break;
>  	}
> -	if (i > pr->throttling.state_count)
> +	if (i >= pr->throttling.state_count)
>  		i = -1;
>  	return i;
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


      reply	other threads:[~2009-02-12  2:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 19:50 [PATCH] ACPI: get_throttling_state() cannot be larger state_count Roel Kluin
2009-02-12  2:35 ` yakui_zhao [this message]

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=1234406126.3652.61.camel@localhost.localdomain \
    --to=yakui.zhao@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /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