linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-media@vger.kernel.org, linux-pwm@vger.kernel.org,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/4] pwm: bcm2835: allow pwm driver to be used in atomic context
Date: Sun, 29 Oct 2023 08:39:42 +0000	[thread overview]
Message-ID: <ZT4aTsQJ_LUzGYay@gofer.mess.org> (raw)
In-Reply-To: <20231027133818.f5zpeqxfw7ghs7sk@pengutronix.de>

Hello Uwe,

On Fri, Oct 27, 2023 at 03:38:18PM +0200, Uwe Kleine-König wrote:
> On Fri, Oct 27, 2023 at 10:20:46AM +0100, Sean Young wrote:
> > +	pc->rate = clk_get_rate(pc->clk);
> > +	if (!pc->rate) {
> > +		dev_err(pc->dev, "failed to get clock rate\n");
> > +		ret = -EINVAL;
> 
> Other error paths in this driver use dev_err_probe(). The most compact
> way here would be:
> 
> 	ret = dev_err_probe(pc->dev, -EINVAL, "....");
> 
> but maybe
> 
> 	ret = -EINVAL;
> 	dev_err_probe(pc->dev, ret, "...");
> 
> is a bit easier to parse for a human?!

Using the same dev_err_probe() function for all error paths is nice, so
I will change it for the next version. This change will print the EINVAL
error as well which does not really add anything, but no harm done there.

Thanks,

Sean

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

      parent reply	other threads:[~2023-10-29  8:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1698398004.git.sean@mess.org>
2023-10-27  9:20 ` [PATCH v4 1/4] pwm: rename pwm_apply_state() to pwm_apply_cansleep() Sean Young
2023-10-27  9:20 ` [PATCH v4 3/4] pwm: bcm2835: allow pwm driver to be used in atomic context Sean Young
     [not found]   ` <20231027133818.f5zpeqxfw7ghs7sk@pengutronix.de>
2023-10-29  8:39     ` Sean Young [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=ZT4aTsQJ_LUzGYay@gofer.mess.org \
    --to=sean@mess.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --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).