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

From: Heikki Krogerus
Date: Mon Nov 05 2018 - 09:57:39 EST


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