Linux Power Management development
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-pm@vger.kernel.org, Stephen Boyd <sboyd@codeaurora.org>,
	linux-kernel@vger.kernel.org, Nishanth Menon <nm@ti.com>,
	Len Brown <len.brown@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Viresh Kumar <vireshk@kernel.org>
Subject: Re: [PATCH v2] PM / OPP: fix debug/error messages in dev_pm_opp_of_get_sharing_cpus()
Date: Thu, 20 Oct 2016 12:30:56 +0530	[thread overview]
Message-ID: <20161020070056.GM11766@vireshk-i7> (raw)
In-Reply-To: <1476946796-27698-1-git-send-email-yamada.masahiro@socionext.com>

On 20-10-16, 15:59, Masahiro Yamada wrote:
> These log messages are wrong because _of_get_opp_desc_node() returns
> an operating-points-v2 node.
> 
> Commit a6eed752f5fb ("PM / OPP: passing NULL to PTR_ERR()") fixed
> static checker warnings, and reworded the messages at the same time
> (but the latter was not mentioned in the git-log).
> 
> Restore the correct messages, dropping __func__.  We can grep the
> message string, so the function name would not carry much value.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
> Changes in v2:
>   - Reword git-log slightly
>      comments -> log messages
> 
>  drivers/base/power/opp/of.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c
> index 6480137..92e6d53 100644
> --- a/drivers/base/power/opp/of.c
> +++ b/drivers/base/power/opp/of.c
> @@ -562,7 +562,7 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev,
>  	/* Get OPP descriptor node */
>  	np = _of_get_opp_desc_node(cpu_dev);
>  	if (!np) {
> -		dev_dbg(cpu_dev, "%s: Couldn't find cpu_dev node.\n", __func__);
> +		dev_dbg(cpu_dev, "Couldn't find opp node.\n");
>  		return -ENOENT;
>  	}
>  
> @@ -587,8 +587,7 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev,
>  		/* Get OPP descriptor node */
>  		tmp_np = _of_get_opp_desc_node(tcpu_dev);
>  		if (!tmp_np) {
> -			dev_err(tcpu_dev, "%s: Couldn't find tcpu_dev node.\n",
> -				__func__);
> +			dev_err(tcpu_dev, "Couldn't find opp node.\n");

The error messages are very generic and it can get tricky to grep for them in
the source code..

I would prefer keeping function name in the print message.

-- 
viresh

      reply	other threads:[~2016-10-20  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  6:59 [PATCH v2] PM / OPP: fix debug/error messages in dev_pm_opp_of_get_sharing_cpus() Masahiro Yamada
2016-10-20  7:00 ` Viresh Kumar [this message]

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=20161020070056.GM11766@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.org \
    --cc=vireshk@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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