linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Ikjoon Jang <ikjn@chromium.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	"RafaelJ . Wysocki" <rafael.j.wysocki@intel.com>,
	DanielLezcano <daniel.lezcano@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpuidle: teo: bugfix in intervals[] array indexing
Date: Mon, 13 Jan 2020 11:44:10 +0100	[thread overview]
Message-ID: <CAJZ5v0hc37cSNidhQUnJr5Gp4D-wjhNdgpLQvXv=9ESu9NGb4g@mail.gmail.com> (raw)
In-Reply-To: <20200110174712.7019-1-ikjn@chromium.org>

On Fri, Jan 10, 2020 at 6:47 PM Ikjoon Jang <ikjn@chromium.org> wrote:
>
> Fix a simple bug in rotating array index.
>
> Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
> ---
>  drivers/cpuidle/governors/teo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
> index de7e706efd46..6deaaf5f05b5 100644
> --- a/drivers/cpuidle/governors/teo.c
> +++ b/drivers/cpuidle/governors/teo.c
> @@ -198,7 +198,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
>          * pattern detection.
>          */
>         cpu_data->intervals[cpu_data->interval_idx++] = measured_ns;
> -       if (cpu_data->interval_idx > INTERVALS)
> +       if (cpu_data->interval_idx >= INTERVALS)
>                 cpu_data->interval_idx = 0;
>  }
>
> --

Applied as a fix for 5,5 and "stable", thanks!

      reply	other threads:[~2020-01-13 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 17:47 [PATCH] cpuidle: teo: bugfix in intervals[] array indexing Ikjoon Jang
2020-01-13 10:44 ` Rafael J. Wysocki [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='CAJZ5v0hc37cSNidhQUnJr5Gp4D-wjhNdgpLQvXv=9ESu9NGb4g@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=ikjn@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.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;
as well as URLs for NNTP newsgroup(s).