lkml.org 
[lkml]   [2018]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-11-05 15:59    [W:2.235 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site