Hi Vladimir,

On Sat, Mar 13, 2021 at 9:03 PM Vladimir Oltean <olte...@gmail.com> wrote:
>
> On Fri, Mar 12, 2021 at 09:35:43PM +0800, Bin Meng wrote:
> > +bool ofnode_phy_is_fixed_link(ofnode eth_node, ofnode *phy_node)
> > +{
> > +     bool found = false;
> > +     ofnode node, subnode;
> > +     int len;
> > +
> > +     /* new binding */
> > +     subnode = ofnode_find_subnode(eth_node, "fixed-link");
> > +     if (ofnode_valid(subnode)) {
> > +             node = subnode;
> > +             found = true;
> > +     }
> > +
> > +     /* old binding */
> > +     if (ofnode_get_property(eth_node, "fixed-link", &len) &&
>
> Maybe "else if" here? If an old-style and a new-style binding exist, we
> should prefer looking at the new one.
>

Agree. Will do in v3.

> And with that "else if", we could remove the "found" variable:

Regards,
Bin

Reply via email to