lkml.org 
[lkml]   [2023]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v10 10/15] spi: dw: Add support for AMD Pensando Elba SoC
On Mon, Mar 6, 2023 at 6:00 PM Serge Semin <fancer.lancer@gmail.com> wrote:
> On Sun, Mar 05, 2023 at 08:07:34PM -0800, Brad Larson wrote:

...

> > - node = of_parse_phandle(np, syscon_name, 0);
>
> node = of_parse_phandle(dev_of_node(pdev->dev), syscon_name, 0);

Side note: I would rather see syscon_fwnode_to_regmap() instead of
this. And IIRC syscon already has an API to find by name.

> > + if (!node)
>
> > + return dev_err_probe(&pdev->dev, -ENODEV, "failed to find %s\n",
> > + syscon_name);
>
> Hm, using dev_err_probe() with known error value seems overkill.

It's allowed use and it helps to drop a few unnecessary lines of code.

> > + syscon = syscon_node_to_regmap(node);
> > + if (IS_ERR(syscon))
> > + return dev_err_probe(&pdev->dev, PTR_ERR(syscon),
> > + "syscon regmap lookup failed\n");

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2023-03-27 00:46    [W:0.100 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site