From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>,
Lee Jones <lee.jones@linaro.org>,
Martin Botka <martin.botka1@gmail.com>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-pwm@vger.kernel.org
Subject: Re: [PATCH v6 2/4] leds: Add driver for Qualcomm LPG
Date: Thu, 29 Apr 2021 15:54:36 -0500 [thread overview]
Message-ID: <20210429205436.GA2484@yoga> (raw)
In-Reply-To: <f7fa3d57-3541-130a-e5fc-0df31206598f@somainline.org>
On Thu 29 Apr 14:31 CDT 2021, Marijn Suijten wrote:
> On 4/29/21 12:39 AM, Bjorn Andersson wrote:
> > On Sun 18 Apr 16:54 CDT 2021, Marijn Suijten wrote:
[..]
> > > > + ret = lpg_init_lut(lpg);
> > > > + if (ret < 0)
> > > > + return ret;
> > >
> > >
> > > How about turning these returns into dev_err_probe? I'm not sure if that's
> > > the expected way to go nowadays, but having some form of logging when a
> > > driver fails to probe is always good to have.
> > >
> >
> > The intention is that each code path through these functions will either
> > pass or spit out an error in the log. I looked through them again and
> > think I cover all paths...
>
>
> That is true, all the errors not covered are extremely unlikely like
> -ENOMEM. I vaguely recall having to insert extra logging to get through
> initial probe, but that might have been something inside lpg_add_led as
> well. Fine to leave this as it is.
>
When kzalloc et al returns -ENOMEM it will be done with an error print,
so that does not need an additional print. That said, another pass
through lpg_add_led() made me spot that if you get a parse error on
the "color" property we would silently return -EINVAL. I've corrected
this.
Thanks,
Bjorn
next prev parent reply other threads:[~2021-04-29 20:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 20:12 [PATCH v6 0/4] Qualcomm Light Pulse Generator Bjorn Andersson
2020-10-21 20:12 ` [PATCH v6 1/4] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Bjorn Andersson
2020-10-26 15:02 ` Rob Herring
2020-10-21 20:12 ` [PATCH v6 2/4] leds: Add driver for Qualcomm LPG Bjorn Andersson
2020-10-22 19:25 ` Luca Weiss
2020-10-29 18:13 ` Pavel Machek
2021-04-29 0:12 ` Bjorn Andersson
2021-04-29 21:12 ` Pavel Machek
2021-04-29 21:29 ` Bjorn Andersson
2021-05-04 15:43 ` Pavel Machek
2021-05-04 16:13 ` Bjorn Andersson
2021-05-05 5:21 ` Uwe Kleine-König
2021-04-18 21:54 ` Marijn Suijten
2021-04-28 22:39 ` Bjorn Andersson
2021-04-29 19:31 ` Marijn Suijten
2021-04-29 20:54 ` Bjorn Andersson [this message]
2021-05-05 5:15 ` Uwe Kleine-König
2021-05-05 5:19 ` Uwe Kleine-König
2021-05-13 17:43 ` Bjorn Andersson
2020-10-21 20:12 ` [PATCH v6 3/4] arm64: dts: qcom: pm(i)8994: Add mpp and lpg blocks Bjorn Andersson
2020-10-21 20:12 ` [PATCH v6 4/4] arm64: dts: qcom: Add user LEDs on db820c Bjorn Andersson
2021-04-15 10:46 [PATCH v6 2/4] leds: Add driver for Qualcomm LPG Yassine Oudjana
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=20210429205436.GA2484@yoga \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=martin.botka1@gmail.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).