All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: heiko@sntech.de, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: Re: [PATCH V2] clockevents: rockchip: Add rockchip timer for rk3288
Date: Mon, 26 Jan 2015 10:50:39 +0100	[thread overview]
Message-ID: <54C60DEF.7090709@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1501261041580.5526@nanos>

On 01/26/2015 10:43 AM, Thomas Gleixner wrote:
> On Sun, 25 Jan 2015, Daniel Lezcano wrote:
>> +static inline void rk_timer_set_mode(enum clock_event_mode mode,
>> +				     struct clock_event_device *ce)
>> +{
>> +	switch (mode) {
>> +	case CLOCK_EVT_MODE_PERIODIC:
>> +		rk_timer_disable(ce);
>> +		rk_timer_update_counter(rk_timer(ce)->freq / HZ - 1, ce);
>> +		rk_timer_enable(ce, TIMER_MODE_FREE_RUNNING);
>
> Missing break. You disable the timer again right away ...

Oops :)

Thanks for spotting this. I figured out why when I tested the timer, 
that worked: it ends up in any case in the noop ONESHOT/RESUME's break.

Fixed.

>> +	case CLOCK_EVT_MODE_ONESHOT:
>> +	case CLOCK_EVT_MODE_RESUME:
>> +		break;
>> +	case CLOCK_EVT_MODE_UNUSED:
>> +	case CLOCK_EVT_MODE_SHUTDOWN:
>> +		rk_timer_disable(ce);
>> +		break;
>> +	}
>> +}
>> +
>> +static irqreturn_t rk_timer_interrupt(int irq, void *dev_id)
>> +{
>> +	struct clock_event_device *ce = dev_id;
>> +
>> +	rk_timer_interrupt_clear(ce);
>> +
>> +	if (ce->mode == CLOCK_EVT_MODE_ONESHOT) {
>> +		rk_timer_disable(ce);
>> +	}
>
> No need for the braces here.

Thanks ! Fixed.

   -- Daniel


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2015-01-26  9:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-25  9:42 [PATCH V2] clockevents: rockchip: Add rockchip timer for rk3288 Daniel Lezcano
     [not found] ` <1422178979-12382-1-git-send-email-daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-01-25 20:52   ` Heiko Stübner
2015-01-25 20:52     ` Heiko Stübner
2015-01-25 21:16     ` Daniel Lezcano
     [not found]       ` <54C55D1A.9010706-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-01-25 21:28         ` Heiko Stübner
2015-01-25 21:28           ` Heiko Stübner
2015-01-26  9:43   ` Thomas Gleixner
2015-01-26  9:43     ` Thomas Gleixner
2015-01-26  9:50     ` Daniel Lezcano [this message]
2015-01-26  1:25 ` Kever Yang
     [not found]   ` <54C59782.80504-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-01-26  9:33     ` Daniel Lezcano
2015-01-26  9:33       ` Daniel Lezcano

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=54C60DEF.7090709@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.