From: Michael Turquette <mturquette@linaro.org>
To: Chanwoo Choi <cw00.choi@samsung.com>, sboyd@codeaurora.org
Cc: linux-kernel@vger.kernel.org,
"Chanwoo Choi" <cw00.choi@samsung.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [PATCH] clk: Show clock rate instead of return value
Date: Sun, 12 Apr 2015 21:56:24 -0700 [thread overview]
Message-ID: <20150413045624.19585.73264@quantum> (raw)
In-Reply-To: <1427956836-31382-1-git-send-email-cw00.choi@samsung.com>
+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@linaro.org>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.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...
Regards,
Mike
> clk_put(clk);
> }
> index++;
> --
> 1.8.5.5
>
next prev parent reply other threads:[~2015-04-13 4:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 6:40 [PATCH] clk: Show clock rate instead of return value Chanwoo Choi
2015-04-13 4:56 ` Michael Turquette [this message]
2015-04-13 8:12 ` Sylwester Nawrocki
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=20150413045624.19585.73264@quantum \
--to=mturquette@linaro.org \
--cc=cw00.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.nawrocki@samsung.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox