All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: ab8500: Add error message if pwmchip_add() fails
Date: Wed, 12 Aug 2020 09:11:39 +0100	[thread overview]
Message-ID: <20200812081139.GC4354@dell> (raw)
In-Reply-To: <20200812075214.499-1-u.kleine-koenig@pengutronix.de>

On Wed, 12 Aug 2020, Uwe Kleine-König wrote:

> pwmchip_add() doesn't emit an error message, so add one in the driver.

Maybe placing one there would be a good idea.

It would certainly cut down on a lot of superfluous strings.

> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/pwm/pwm-ab8500.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
> index fdf3964db4a6..4b6f9e24e11d 100644
> --- a/drivers/pwm/pwm-ab8500.c
> +++ b/drivers/pwm/pwm-ab8500.c
> @@ -106,7 +106,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
>  
>  	err = pwmchip_add(&ab8500->chip);
>  	if (err < 0)
> -		return err;
> +		return dev_err_probe(&pdev->dev, err, "Failed to add pwm chip\n");
>  
>  	dev_dbg(&pdev->dev, "pwm probe successful\n");
>  	platform_set_drvdata(pdev, ab8500);

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-pwm@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: ab8500: Add error message if pwmchip_add() fails
Date: Wed, 12 Aug 2020 09:11:39 +0100	[thread overview]
Message-ID: <20200812081139.GC4354@dell> (raw)
In-Reply-To: <20200812075214.499-1-u.kleine-koenig@pengutronix.de>

On Wed, 12 Aug 2020, Uwe Kleine-König wrote:

> pwmchip_add() doesn't emit an error message, so add one in the driver.

Maybe placing one there would be a good idea.

It would certainly cut down on a lot of superfluous strings.

> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/pwm/pwm-ab8500.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
> index fdf3964db4a6..4b6f9e24e11d 100644
> --- a/drivers/pwm/pwm-ab8500.c
> +++ b/drivers/pwm/pwm-ab8500.c
> @@ -106,7 +106,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
>  
>  	err = pwmchip_add(&ab8500->chip);
>  	if (err < 0)
> -		return err;
> +		return dev_err_probe(&pdev->dev, err, "Failed to add pwm chip\n");
>  
>  	dev_dbg(&pdev->dev, "pwm probe successful\n");
>  	platform_set_drvdata(pdev, ab8500);

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-08-12  8:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12  7:52 [PATCH] pwm: ab8500: Add error message if pwmchip_add() fails Uwe Kleine-König
2020-08-12  7:52 ` Uwe Kleine-König
2020-08-12  8:11 ` Lee Jones [this message]
2020-08-12  8:11   ` Lee Jones
2020-10-22 19:22   ` Uwe Kleine-König
2020-10-22 19:22     ` Uwe Kleine-König
2020-10-26  9:33     ` Lee Jones
2020-10-26  9:33       ` Lee Jones
2020-11-03  8:00       ` Uwe Kleine-König
2020-11-03  8:00         ` Uwe Kleine-König
2020-11-03  8:18         ` Lee Jones
2020-11-03  8:18           ` Lee Jones
2020-11-06 13:55 ` Linus Walleij
2020-11-06 13:55   ` Linus Walleij
2020-11-11 18:07 ` Thierry Reding
2020-11-11 18:07   ` Thierry Reding

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=20200812081139.GC4354@dell \
    --to=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.