On Thu, 25 Apr 2024 00:45:35 +0200 Andrew Lunn wrote: > > Rename the local variable dev_name, as it shadows the dev_name() > > function, and pre-initialize it, to simplify the code. > > Another option is to call dev_alloc_name() soon after alloc_netdev(), > to give the device its name earlier than register_netdev(). Maybe we shouldn't be advertising that option too broadly. One has to hold rtnl for that to work. Mostly old and staging drivers seem to do this. Name are not stable. If other identifiers are available, that's a better option, IMHO.