All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: mturquette@linaro.org, sboyd@codeaurora.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: Show clock rate and error value when fail to set clock rate
Date: Mon, 27 Apr 2015 10:51:28 +0200	[thread overview]
Message-ID: <553DF890.9020002@samsung.com> (raw)
In-Reply-To: <553DF76D.9000206@samsung.com>

Hi Chanwoo,

On 27/04/15 10:46, Chanwoo Choi wrote:
>>> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
>>> >> index aad4796..2b6375f 100644
>>> >> --- a/drivers/clk/clk-conf.c
>>> >> +++ b/drivers/clk/clk-conf.c
>>> >> @@ -107,8 +107,9 @@ 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 rate to %ld (%d)\n",
>>> >> +				       __clk_get_name(clk), clk_get_rate(clk),
>>> >> +				       rc);
>> > 
>> > Apologies for my previous misleading comment, with this patch
>> > you log current clock rate as the rate which was attempted to 
>> > be set. And these two will likely be different when clk_set_rate()
>> > failed. So it should rather be:
>> > 
>> > pr_err("clk: couldn't set %s clk rate to %ld (%d)\n",
>> >        __clk_get_name(clk), rate, rc);
>
> I'll modify it as following without error value.
> If I add the error value, the number of character are over 80.
> 	pr_err("clk: couldn't set %s clk rate to %ld\n",
>         	__clk_get_name(clk), rate);

I wouldn't worry about line length over 80 characters, it not a hard rule.
Let's leave the error code as it might be useful for debugging.

-- 
Regards,
Sylwester

  reply	other threads:[~2015-04-27  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 11:08 [PATCH v2] clk: Show clock rate and error value when fail to set clock rate Chanwoo Choi
2015-04-21  8:37 ` Sylwester Nawrocki
2015-04-27  8:46   ` Chanwoo Choi
2015-04-27  8:51     ` Sylwester Nawrocki [this message]
2015-04-27  9:03       ` Chanwoo Choi
2015-04-27  9:06         ` Chanwoo Choi

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=553DF890.9020002@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=sboyd@codeaurora.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 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.