All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Maíra Canal" <maira.canal@usp.br>
Cc: linux-pm@vger.kernel.org, rafael@kernel.org, khilman@kernel.org,
	ulf.hansson@linaro.org, pavel@ucw.cz
Subject: Re: [PATCH] PM: domains: using dev_err_probe() to simplify error handling
Date: Tue, 12 Oct 2021 15:27:53 +0200	[thread overview]
Message-ID: <YWWNWawA857Y0TW2@kroah.com> (raw)
In-Reply-To: <YWWIw1hAQAYjjrfK@fedora>

On Tue, Oct 12, 2021 at 10:08:19AM -0300, Maíra Canal wrote:
> Replacing dev_err() for dev_err_probe() in order to reduce code size and
> uniform error handling.
> 
> Signed-off-by: Maíra Canal <maira.canal@usp.br>
> ---
>  drivers/base/power/domain.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 5db704f02e71..e7701b79494a 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -2249,10 +2249,8 @@ int of_genpd_add_provider_simple(struct device_node *np,
>  	if (genpd->set_performance_state) {
>  		ret = dev_pm_opp_of_add_table(&genpd->dev);
>  		if (ret) {
> -			if (ret != -EPROBE_DEFER)
> -				dev_err(&genpd->dev, "Failed to add OPP table: %d\n",
> +			return dev_err_probe(&genpd->dev, ret, "Failed to add OPP table: %d\n",
>  					ret);

But this isn't a probe function of a driver, shouldn't that be the only
place you use dev_err_probe()?

thanks,

greg k-h

      reply	other threads:[~2021-10-12 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 13:08 [PATCH] PM: domains: using dev_err_probe() to simplify error handling Maíra Canal
2021-10-12 13:27 ` Greg KH [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=YWWNWawA857Y0TW2@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=khilman@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maira.canal@usp.br \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --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.