Message ID | 200903041955.n24JtRIO027997@imap1.linux-foundation.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Andrew, you'll want to drop this one from your series b/c I checked in the simpler version. thanks, Len Brown, Intel Open Source Technology Center On Wed, 4 Mar 2009, akpm@linux-foundation.org wrote: > From: Roel Kluin <roel.kluin@gmail.com> > > With for(i = 0; i < n; i++) { ... } i reaches n. > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> > Acked-by: <yakui.zhao@intel.com> > Cc: Len Brown <lenb@kernel.org> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > > drivers/acpi/processor_throttling.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -puN drivers/acpi/processor_throttling.c~acpi-get_throttling_state-cannot-be-larger-state_count drivers/acpi/processor_throttling.c > --- a/drivers/acpi/processor_throttling.c~acpi-get_throttling_state-cannot-be-larger-state_count > +++ a/drivers/acpi/processor_throttling.c > @@ -785,7 +785,7 @@ static int acpi_get_throttling_state(str > 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
diff -puN drivers/acpi/processor_throttling.c~acpi-get_throttling_state-cannot-be-larger-state_count drivers/acpi/processor_throttling.c --- a/drivers/acpi/processor_throttling.c~acpi-get_throttling_state-cannot-be-larger-state_count +++ a/drivers/acpi/processor_throttling.c @@ -785,7 +785,7 @@ static int acpi_get_throttling_state(str if (tx->control == value) break; } - if (i > pr->throttling.state_count) + if (i >= pr->throttling.state_count) i = -1; return i; }