Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1504553 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2016-10-20 09:00 +0200 |
| Last post | 2016-10-20 09:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] PM / OPP: fix debug/error messages in dev_pm_opp_of_get_sharing_cpus() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-10-20 09:00 +0200
Re: [PATCH v2] PM / OPP: fix debug/error messages in dev_pm_opp_of_get_sharing_cpus() Viresh Kumar <viresh.kumar@linaro.org> - 2016-10-20 09:10 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-10-20 09:00 +0200 |
| Subject | [PATCH v2] PM / OPP: fix debug/error messages in dev_pm_opp_of_get_sharing_cpus() |
| Message-ID | <sufuy-3ZE-9@gated-at.bofh.it> |
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");
ret = -ENOENT;
goto put_cpu_node;
}
--
1.9.1
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-10-20 09:10 +0200 |
| Subject | Re: [PATCH v2] PM / OPP: fix debug/error messages in dev_pm_opp_of_get_sharing_cpus() |
| Message-ID | <sufEd-4iL-3@gated-at.bofh.it> |
| In reply to | #1504553 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web