From: "Grygorii.Strashko@linaro.org" <grygorii.strashko@linaro.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-pm@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH] PM / clock_ops: Print acquired clock name instead of con_id
Date: Fri, 29 May 2015 13:40:58 +0300 [thread overview]
Message-ID: <5568423A.4080200@linaro.org> (raw)
In-Reply-To: <1432839849-1432-1-git-send-email-geert+renesas@glider.be>
On 05/28/2015 10:04 PM, Geert Uytterhoeven wrote:
> Currently the con_id of the acquired clock is printed for debugging
> purposes. But in several cases, the con_id is NULL, which doesn't
> provide much debugging information when printed. These cases are:
> - When explicitly passing a NULL con_id (which means the first clock
> tied to the device, if available),
> - When not using pm_clk_add(), but pm_clk_add_clk() (which takes a
> "struct clk *" directly).
>
> Hence print the actual clock name instead of the con_id.
>
> As the clock name is not available with legacy clock frameworks, and a
> (non-NULL) con_id is more useful than a hex address, keep printing the
> con_id if the Common Clock Framework is not enabled.
overall:
Reviewed-by: Grygorii Strashko <grygorii.strashko@linaro.org>
But, It seems case !CONFIG_COMMON_CLK is handled by vsprintf, may we can assume
that printk will handle invalid input parameters values correctly:
like
dev_dbg(dev, "Clock %pC con_id:%s managed by runtime PM.\n", ce->clk, ce->con_id);
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/base/power/clock_ops.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
> index 442ce010559bf531..6d56577903bd01e1 100644
> --- a/drivers/base/power/clock_ops.c
> +++ b/drivers/base/power/clock_ops.c
> @@ -68,7 +68,11 @@ static void pm_clk_acquire(struct device *dev, struct pm_clock_entry *ce)
> } else {
> clk_prepare(ce->clk);
> ce->status = PCE_STATUS_ACQUIRED;
> +#ifdef CONFIG_COMMON_CLK
> + dev_dbg(dev, "Clock %pC managed by runtime PM.\n", ce->clk);
> +#else
> dev_dbg(dev, "Clock %s managed by runtime PM.\n", ce->con_id);
> +#endif
> }
> }
>
>
--
regards,
-grygorii
next prev parent reply other threads:[~2015-05-29 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 19:04 [PATCH] PM / clock_ops: Print acquired clock name instead of con_id Geert Uytterhoeven
2015-05-29 10:40 ` Grygorii.Strashko@linaro.org [this message]
2015-05-29 10:53 ` Geert Uytterhoeven
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=5568423A.4080200@linaro.org \
--to=grygorii.strashko@linaro.org \
--cc=geert+renesas@glider.be \
--cc=khilman@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.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.