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]
Message-ID: <20181105145733.GA1777@kuha.fi.intel.com>
Date:   Mon, 5 Nov 2018 16:57:33 +0200
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH 1/4] device property: Introduce fwnode_name()

Hi,

> > +const char *fwnode_name(const struct fwnode_handle *fwnode)
> > +{
> > +	const char *name = fwnode_call_ptr_op(fwnode, name);
> > +
> > +	if (!name)
> > +		fwnode_call_int_op(fwnode, property_read_string_array,
> > +				   "name", &name, 1);
> 
> Is it going to be extended in the future?
> 
> Otherwise I would rather go with (few more LOCs, yes)
> 
> 	const char *name;
> 
> 	name = fwnode_call_ptr_op(fwnode, name);
> 	if (name)
> 		return name;
> 
> 	fwnode_call_int_op(fwnode, property_read_string_array, "name", &name, 1);
> 	return name;

That does look better. I'll fix it.

thanks,

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ