diff mbox

PM / Domains: Do not print PM domain add error message if EPROBE_DEFER

Message ID 1480508696-19294-1-git-send-email-geert+renesas@glider.be (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Geert Uytterhoeven Nov. 30, 2016, 12:24 p.m. UTC
EPROBE_DEFER is not an error, hence printing an error message like

    renesas_irqc e61c0000.interrupt-controller: failed to add to PM domain always-on: -517

may confuse the user.

Suppress the error message in case of EPROBE_DEFER to fix this.

Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/base/power/domain.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Simon Horman Nov. 30, 2016, 12:41 p.m. UTC | #1
On Wed, Nov 30, 2016 at 01:24:56PM +0100, Geert Uytterhoeven wrote:
> EPROBE_DEFER is not an error, hence printing an error message like
> 
>     renesas_irqc e61c0000.interrupt-controller: failed to add to PM domain always-on: -517
> 
> may confuse the user.
> 
> Suppress the error message in case of EPROBE_DEFER to fix this.
> 
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Nov. 30, 2016, 2:34 p.m. UTC | #2
On 30 November 2016 at 13:24, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> EPROBE_DEFER is not an error, hence printing an error message like
>
>     renesas_irqc e61c0000.interrupt-controller: failed to add to PM domain always-on: -517
>
> may confuse the user.
>
> Suppress the error message in case of EPROBE_DEFER to fix this.
>
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by; Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
>  drivers/base/power/domain.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 64164aac6ae3990a..f22137b52dcb641b 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -2032,8 +2032,9 @@ int genpd_dev_pm_attach(struct device *dev)
>         mutex_unlock(&gpd_list_lock);
>
>         if (ret < 0) {
> -               dev_err(dev, "failed to add to PM domain %s: %d",
> -                       pd->name, ret);
> +               if (ret != -EPROBE_DEFER)
> +                       dev_err(dev, "failed to add to PM domain %s: %d",
> +                               pd->name, ret);
>                 goto out;
>         }
>
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kevin Hilman Nov. 30, 2016, 4:41 p.m. UTC | #3
Geert Uytterhoeven <geert+renesas@glider.be> writes:

> EPROBE_DEFER is not an error, hence printing an error message like
>
>     renesas_irqc e61c0000.interrupt-controller: failed to add to PM domain always-on: -517
>
> may confuse the user.
>
> Suppress the error message in case of EPROBE_DEFER to fix this.
>
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Yes, I had noticed this too but not got around to fixing it.

Acked-by: Kevin Hilman <khilman@baylibre.com>

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Dec. 1, 2016, 2:25 p.m. UTC | #4
On Wednesday, November 30, 2016 01:24:56 PM Geert Uytterhoeven wrote:
> EPROBE_DEFER is not an error, hence printing an error message like
> 
>     renesas_irqc e61c0000.interrupt-controller: failed to add to PM domain always-on: -517
> 
> may confuse the user.
> 
> Suppress the error message in case of EPROBE_DEFER to fix this.
> 
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/base/power/domain.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 64164aac6ae3990a..f22137b52dcb641b 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -2032,8 +2032,9 @@ int genpd_dev_pm_attach(struct device *dev)
>  	mutex_unlock(&gpd_list_lock);
>  
>  	if (ret < 0) {
> -		dev_err(dev, "failed to add to PM domain %s: %d",
> -			pd->name, ret);
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(dev, "failed to add to PM domain %s: %d",
> +				pd->name, ret);
>  		goto out;
>  	}
>  
> 

Applied (with ACKs etc).

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 64164aac6ae3990a..f22137b52dcb641b 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2032,8 +2032,9 @@  int genpd_dev_pm_attach(struct device *dev)
 	mutex_unlock(&gpd_list_lock);
 
 	if (ret < 0) {
-		dev_err(dev, "failed to add to PM domain %s: %d",
-			pd->name, ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(dev, "failed to add to PM domain %s: %d",
+				pd->name, ret);
 		goto out;
 	}