
13 Mar
2021
13 Mar
'21
3:32 p.m.
Hi Vladimir,
On Sat, Mar 13, 2021 at 9:03 PM Vladimir Oltean olteanv@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