From: Andrew Halaney <ahalaney@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org, sboyd@kernel.org, nm@ti.com,
vireshk@kernel.org, Andrew Halaney <ahalaney@redhat.com>
Subject: [PATCH] OPP: Use dev_err_probe() when failing to get icc_path
Date: Fri, 23 Jun 2023 10:53:38 -0500 [thread overview]
Message-ID: <20230623155338.943655-1-ahalaney@redhat.com> (raw)
This, in tandem with dynamic debug, can print useful information about
-EPROBE_DEFFER like below, and keeps similar behavior for other errors:
[ 16.561072] cpu cpu0: error -EPROBE_DEFER: dev_pm_opp_of_find_icc_paths: Unable to get path0
[ 16.575777] platform 18591000.cpufreq: deferred probe pending
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
drivers/opp/of.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index e6d1155d0990..1f0923cc1cd9 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -513,11 +513,7 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev,
for (i = 0; i < num_paths; i++) {
paths[i] = of_icc_get_by_index(dev, i);
if (IS_ERR(paths[i])) {
- ret = PTR_ERR(paths[i]);
- if (ret != -EPROBE_DEFER) {
- dev_err(dev, "%s: Unable to get path%d: %d\n",
- __func__, i, ret);
- }
+ ret = dev_err_probe(dev, ret, "%s: Unable to get path%d\n", __func__, i);
goto err;
}
}
--
2.40.1
next reply other threads:[~2023-06-23 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 15:53 Andrew Halaney [this message]
2023-06-26 6:40 ` [PATCH] OPP: Use dev_err_probe() when failing to get icc_path Viresh Kumar
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=20230623155338.943655-1-ahalaney@redhat.com \
--to=ahalaney@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=sboyd@kernel.org \
--cc=vireshk@kernel.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;
as well as URLs for NNTP newsgroup(s).