Re: [PATCH 1/4] device property: Introduce fwnode_name()

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

 



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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux