- const struct net *dev1_parent_net = net1;
- const struct net *dev2_parent_net = net2;
- if (dev1->rtnl_link_ops && dev1->rtnl_link_ops->get_link_net)
dev1_parent_net = dev1->rtnl_link_ops->get_link_net(dev1);
- if (dev2->rtnl_link_ops && dev2->rtnl_link_ops->get_link_net)
dev2_parent_net = dev2->rtnl_link_ops->get_link_net(dev2);
[...]
struct net *parent_net = net;
[...]
- if (net_dev->rtnl_link_ops && net_dev->rtnl_link_ops->get_link_net)
parent_net = net_dev->rtnl_link_ops->get_link_net(net_dev);
My proposal is there to move this in an extra function [1] so adding compat code is easier [2].
Hi Sven
Do you want to squash your compact changes in and add your own Signed-off-by?
Andrew