lkml.org 
[lkml]   [2023]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3/4] pwm: bcm2835: allow pwm driver to be used in atomic context
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

\
 
 \ /
  Last update: 2023-10-29 09:41    [W:0.026 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site