lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54C60DEF.7090709@linaro.org>
Date:	Mon, 26 Jan 2015 10:50:39 +0100
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	heiko@...ech.de, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH V2] clockevents: rockchip: Add rockchip timer for rk3288

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ