From: Kepplinger-Novakovic Martin <Martin.Kepplinger-Novakovic@ginzinger.com>
To: "u.kleine-koenig@baylibre.com" <u.kleine-koenig@baylibre.com>
Cc: "daniel.thompson@linaro.org" <daniel.thompson@linaro.org>,
"lee@kernel.org" <lee@kernel.org>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"jingoohan1@gmail.com" <jingoohan1@gmail.com>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] backlight: pwm_bl: print errno for probe errors
Date: Thu, 1 Aug 2024 09:52:01 +0000 [thread overview]
Message-ID: <00f4f77151de3c3a4964fe697a7d1841c670284b.camel@ginzinger.com> (raw)
In-Reply-To: <fjke5js43aqxdxmoau2l275a26o52sq7hyjgzwxnnsrptqlcvs@mohkvblfqkhg>
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
Am Donnerstag, dem 01.08.2024 um 11:26 +0200 schrieb Uwe Kleine-König:
> Hello Martin,
>
> On Thu, Aug 01, 2024 at 11:12:55AM +0200, Martin Kepplinger-Novaković
> wrote:
> > This makes debugging often easier.
> >
> > Signed-off-by: Martin Kepplinger-Novaković
> > <martin.kepplinger-novakovic@ginzinger.com>
> > ---
> > drivers/video/backlight/pwm_bl.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/video/backlight/pwm_bl.c
> > b/drivers/video/backlight/pwm_bl.c
> > index f1005bd0c41e3..cc7e7af71891f 100644
> > --- a/drivers/video/backlight/pwm_bl.c
> > +++ b/drivers/video/backlight/pwm_bl.c
> > @@ -502,7 +502,8 @@ static int pwm_backlight_probe(struct
> > platform_device *pdev)
> > GPIOD_ASIS);
> > if (IS_ERR(pb->enable_gpio)) {
> > ret = dev_err_probe(&pdev->dev, PTR_ERR(pb-
> > >enable_gpio),
> > - "failed to acquire enable
> > GPIO\n");
> > + "failed to acquire enable GPIO:
> > %ld\n",
> > + PTR_ERR(pb->enable_gpio));
>
> AFAIK dev_err_probe already emits the error code passed as 2nd
> parameter. So I wonder about this patch's benefit.
>
It does. Other messages only take the deferred_probe_reason without the
error code. It's actually fine if users properly enable debugging after
seeing an error and then this change is not needed :)
thanks,
martin
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7522 bytes --]
next prev parent reply other threads:[~2024-08-01 9:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 9:12 [PATCH] backlight: pwm_bl: print errno for probe errors Martin Kepplinger-Novaković
2024-08-01 9:26 ` Uwe Kleine-König
2024-08-01 9:52 ` Kepplinger-Novakovic Martin [this message]
2024-08-01 10:09 ` Uwe Kleine-König
2024-08-01 10:12 ` Kepplinger-Novakovic Martin
2024-08-01 12:31 ` Lee Jones
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=00f4f77151de3c3a4964fe697a7d1841c670284b.camel@ginzinger.com \
--to=martin.kepplinger-novakovic@ginzinger.com \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/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