All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>
Subject: [PATCH] opp: Don't print error message if getting optional regulator fails
Date: Sun, 6 Mar 2022 22:46:39 +0100	[thread overview]
Message-ID: <91e37a12-b393-8ae9-996b-6cbb63ea9255@gmail.com> (raw)

The regulators are optional, therefore I see no need to bother users
with an error level message if -ENODEV is returned.

Inspiration was the following error on my system:
lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/opp/core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 740407252..8af5979cc 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2020,7 +2020,10 @@ struct opp_table *dev_pm_opp_set_regulators(struct device *dev,
 		reg = regulator_get_optional(dev, names[i]);
 		if (IS_ERR(reg)) {
 			ret = PTR_ERR(reg);
-			if (ret != -EPROBE_DEFER)
+			if (ret == -ENODEV)
+				dev_info(dev, "%s: no regulator (%s) found\n",
+					 __func__, names[i]);
+			else if (ret != -EPROBE_DEFER)
 				dev_err(dev, "%s: no regulator (%s) found: %d\n",
 					__func__, names[i], ret);
 			goto free_regulators;
-- 
2.35.1


             reply	other threads:[~2022-03-06 21:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 21:46 Heiner Kallweit [this message]
2022-03-07  5:27 ` [PATCH] opp: Don't print error message if getting optional regulator fails Viresh Kumar
2022-03-07 17:18   ` Heiner Kallweit
2022-03-08  4:33     ` 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=91e37a12-b393-8ae9-996b-6cbb63ea9255@gmail.com \
    --to=hkallweit1@gmail.com \
    --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 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.