[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <552B7A54.3070309@samsung.com>
Date: Mon, 13 Apr 2015 10:12:04 +0200
From: Sylwester Nawrocki <s.nawrocki@...sung.com>
To: Michael Turquette <mturquette@...aro.org>,
Chanwoo Choi <cw00.choi@...sung.com>, sboyd@...eaurora.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: Show clock rate instead of return value
Hello,
On 13/04/15 06:56, Michael Turquette wrote:
> +Sylwester
>
> Quoting Chanwoo Choi (2015-04-01 23:40:36)
>> This patch shows the current clock rate instead of return value
>> when clk_set_rate() return fail because log message means the clock rate.
>>
>> Cc: Mike Turquette <mturquette@...aro.org>
>> Cc: Stephen Boyd <sboyd@...eaurora.org>
>> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
>> ---
>> drivers/clk/clk-conf.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
>> index aad4796..fb1ee65 100644
>> --- a/drivers/clk/clk-conf.c
>> +++ b/drivers/clk/clk-conf.c
>> @@ -107,8 +107,8 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)
>>
>> rc = clk_set_rate(clk, rate);
>> if (rc < 0)
>> - pr_err("clk: couldn't set %s clock rate: %d\n",
>> - __clk_get_name(clk), rc);
>> + pr_err("clk: couldn't set %s clock rate: %ld\n",
>> + __clk_get_name(clk), clk_get_rate(clk));
>
> Change seems OK, but what was Sylwester's original intent? We can always
> look up the original/current rate in sysfs, but getting the error code
> printed might be useful for debugging...
Indeed, I thought it was more useful to have the error code shown here.
Alternatively we could make it:
pr_err("clk: couldn't set %s clock rate to %ld (%d)\n",
__clk_get_name(clk), clk_get_rate(clk), rc);
--
Thanks
Sylwester
--
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