Re: [PATCH v2 1/6] device property: Add functions for accessing node's parents

From: Sakari Ailus
Date: Fri Mar 29 2019 - 10:47:03 EST


Hi Andy,

On Fri, Mar 29, 2019 at 04:15:49PM +0200, Andy Shevchenko wrote:
> On Fri, Mar 29, 2019 at 03:15:07PM +0200, Sakari Ailus wrote:
> > On Thu, Mar 28, 2019 at 03:52:35PM +0100, Rafael J. Wysocki wrote:
> > > On Thu, Mar 28, 2019 at 12:13 PM Sakari Ailus
> > > <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> > > > On Thu, Mar 28, 2019 at 10:38:01AM +0100, Rafael J. Wysocki wrote:
> > > > > On Wed, Mar 27, 2019 at 3:20 PM Sakari Ailus
> > > > > <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> > > > > > On Wed, Mar 27, 2019 at 01:26:25PM +0100, Petr Mladek wrote:
> > > > > > > On Tue 2019-03-26 14:41:01, Sakari Ailus wrote:
>
> > Another option would be changing where the counting starts --- the first
> > parent. I.e.
>
> Looks better to me, though can you put comment how parents are being counted?

To the code? The kerneldoc comment contains one, and the code below is
pretty simple.

>
> > fwnode = fwnode_get_parent(fwnode);
> >
> > for (count = 0; fwnode; count++)
> > fwnode = fwnode_get_next_parent(fwnode);
> >
> > return count;
>

--
Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxx