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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux