Re: [PATCH v2] net: fix register_netdev description

From: Ivan Safonov
Date: Sun Oct 06 2024 - 18:00:31 EST




On 10/7/24 00:16, Andrew Lunn wrote:
On Sun, Oct 06, 2024 at 08:57:20PM +0300, Ivan Safonov wrote:
register_netdev() does not expands the device name.

Please could you explain what makes you think it will not expand the
device name.

Andrew

It is the register_netdev implementation:

int register_netdev(struct net_device *dev)
{
int err;

if (rtnl_lock_killable())
return -EINTR;
err = register_netdevice(dev);
rtnl_unlock();
return err;
}

There is no device name expansion, rtnl lock and register_netdevice call only. The register_netdevice expands device name using dev_get_valid_name().