[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3c92557-f3e9-9ea7-ad1f-c6e8924d9ee2@ti.com>
Date: Tue, 19 Dec 2017 14:00:52 +0530
From: Keerthy <j-keerthy@...com>
To: Ladislav Michl <ladis@...ux-mips.org>
CC: <daniel.lezcano@...aro.org>, <tony@...mide.com>,
<aaro.koskinen@....fi>, <thierry.reding@...il.com>,
<grygorii.strashko@...com>, <linux-omap@...r.kernel.org>,
<robh+dt@...nel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-pwm@...r.kernel.org>, <sebastian.reichel@...labora.co.uk>,
<linux-kernel@...r.kernel.org>, <t-kristo@...com>,
<linux@...linux.org.uk>
Subject: Re: [PATCH 2/2] clocksource: timer-dm: Check prescaler value
On Monday 18 December 2017 05:01 PM, Ladislav Michl wrote:
> Invalid prescaler value is silently ignored. Fix that
> by returning -EINVAL in such case. As invalid value
> disabled use of the prescaler, use -1 explicitely for
> that purpose.
Thanks. I will post this as part of my migration series.
>
> Signed-off-by: Ladislav Michl <ladis@...ux-mips.org>
> ---
> drivers/clocksource/timer-dm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clocksource/timer-dm.c b/drivers/clocksource/timer-dm.c
> index ec3a28c90c70..95cd98be8541 100644
> --- a/drivers/clocksource/timer-dm.c
> +++ b/drivers/clocksource/timer-dm.c
> @@ -609,6 +609,9 @@ static int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer,
> if (prescaler >= 0x00 && prescaler <= 0x07) {
> l |= OMAP_TIMER_CTRL_PRE;
> l |= prescaler << 2;
> + } else {
> + if (prescaler != -1)
> + return -EINVAL;
> }
> omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
>
>
Powered by blists - more mailing lists