public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clocksource: arm_arch_timer: Fix mem frame loop initialization
Date: Tue, 1 Aug 2017 13:34:44 +0200	[thread overview]
Message-ID: <20170801113444.GB1919@mai> (raw)
In-Reply-To: <20170801111222.GC9347@leverpostej>

On Tue, Aug 01, 2017 at 12:12:23PM +0100, Mark Rutland wrote:
> On Mon, Jul 31, 2017 at 11:37:28AM -0700, Matthias Kaehlcke wrote:
> > The loop to find the best memory frame in arch_timer_mem_acpi_init()
> > initializes the loop counter with itself ('i = i'), which is suspicious
> > in the first place and pointed out by clang. The loop condition is
> > 'i < timer_count' and a prior for loop exits when 'i' reaches
> > 'timer_count', therefore the second loop is never executed.
> > 
> > Initialize the loop counter with 0 to iterate over all timers, which
> > supposedly was the intention before the typo monster attacked.
> > 
> > Fixes: c2743a36765d3 ("clocksource: arm_arch_timer: add GTDT support for memory-mapped timer")
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> 
> Ard also spotted this issue [1], along with another issue we still need
> to solve. In the mean time it would be nice to have this fixed, so:
> 
> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> 
> Daniel, Thomas,
> 
> Could one of you please pick this up as a fix, with the above tags?


Hi Mark,

picked as a fix with the above tags.

Thanks.

  -- Daniel

      reply	other threads:[~2017-08-01 11:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 18:37 [PATCH] clocksource: arm_arch_timer: Fix mem frame loop initialization Matthias Kaehlcke
2017-08-01 11:12 ` Mark Rutland
2017-08-01 11:34   ` Daniel Lezcano [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=20170801113444.GB1919@mai \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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