diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-05-11 22:07:20 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-13 02:21:11 +0300 |
commit | fa926bb3e491221a76bd476a990019cd55df8a30 (patch) | |
tree | 6e8b6433c97c099d0e8f69ed58b80adcaf643de7 /net | |
parent | 0df65743537dd6e1c8b0924714f14dc367cba2be (diff) | |
download | linux-fa926bb3e491221a76bd476a990019cd55df8a30.tar.xz |
net: update the register_netdevice() kdoc
The BUGS section looks quite dated, the registration
is under rtnl lock. Remove some obvious information
while at it.
Link: https://lore.kernel.org/r/20220511190720.1401356-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 91b7e7784da9..a601da3b4a7c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9927,22 +9927,14 @@ void netif_tx_stop_all_queues(struct net_device *dev) EXPORT_SYMBOL(netif_tx_stop_all_queues); /** - * register_netdevice - register a network device - * @dev: device to register - * - * Take a completed network device structure and add it to the kernel - * interfaces. A %NETDEV_REGISTER message is sent to the netdev notifier - * chain. 0 is returned on success. A negative errno code is returned - * on a failure to set up the device, or if the name is a duplicate. + * register_netdevice() - register a network device + * @dev: device to register * - * Callers must hold the rtnl semaphore. You may want - * register_netdev() instead of this. - * - * BUGS: - * The locking appears insufficient to guarantee two parallel registers - * will not get the same name. + * Take a prepared network device structure and make it externally accessible. + * A %NETDEV_REGISTER message is sent to the netdev notifier chain. + * Callers must hold the rtnl lock - you may want register_netdev() + * instead of this. */ - int register_netdevice(struct net_device *dev) { int ret; |