lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Mar 2019 13:43:51 +0200
From:   Sakari Ailus <sakari.ailus@...ux.intel.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org, rafael@...nel.org,
        linux-acpi@...r.kernel.org, devicetree@...r.kernel.org,
        Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v2 3/6] device property: Add a function to obtain a
 node's prefix

On Wed, Mar 27, 2019 at 01:36:59PM +0100, Petr Mladek wrote:
> On Tue 2019-03-26 15:32:48, Sakari Ailus wrote:
> > Hi Andy,
> > 
> > On Tue, Mar 26, 2019 at 03:16:26PM +0200, Andy Shevchenko wrote:
> > > On Tue, Mar 26, 2019 at 02:41:03PM +0200, Sakari Ailus wrote:
> > > > The prefix is used for printing purpose before a node, and it also works
> > > > as a separator between two nodes.
> > > > 
> > > 
> > > One nit below.
> > > 
> > > > +static const char *
> > > > +acpi_fwnode_get_name_prefix(const struct fwnode_handle *fwnode)
> > > > +{
> > > > +	struct fwnode_handle *parent;
> > > > +
> > > 
> > > > +	parent = fwnode_get_parent(fwnode);
> > > > +	/* Root node. */
> > > 
> > > I guess a comment could be easier to read if it goes before parent assignment
> > > line.
> > 
> > Only if the comments are changed accordingly. What we're doing here is
> > trying to figure out whether this is the root node. I can do that for v3.
> 
> IMHO, the comment in acpi_fwnode_get_name() is easier to understand:
> 
> /* Is this the root node? */
> 
> > > 
> > > > +	if (!parent)
> > > > +		return "";
> > > > +
> > > > +	parent = fwnode_get_next_parent(parent);
> > > > +	/* Second node from the root; no prefix here either. */
> > > 
> > > Ditto.
> 
> /* Is this 2nd node from the root? */

I used both the strings.

-- 
Sakari Ailus
sakari.ailus@...ux.intel.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ