* [PATCH net-next] veth: remove redundant call of dev_alloc_name
@ 2013-06-09 12:15 Hong Zhiguo
2013-06-12 8:21 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hong Zhiguo @ 2013-06-09 12:15 UTC (permalink / raw)
To: netdev; +Cc: davem, stephen, xemul, ebiederm
it's called in the following register_netdevice. No need to call it
here.
Tested with "ip link add type veth" and "ip link add xxx%d type veth".
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
drivers/net/veth.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 177f911..da86652 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -379,12 +379,6 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
else
snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d");
- if (strchr(dev->name, '%')) {
- err = dev_alloc_name(dev, dev->name);
- if (err < 0)
- goto err_alloc_name;
- }
-
err = register_netdevice(dev);
if (err < 0)
goto err_register_dev;
@@ -404,7 +398,6 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
err_register_dev:
/* nothing to do */
-err_alloc_name:
err_configure_peer:
unregister_netdevice(peer);
return err;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] veth: remove redundant call of dev_alloc_name
2013-06-09 12:15 [PATCH net-next] veth: remove redundant call of dev_alloc_name Hong Zhiguo
@ 2013-06-12 8:21 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-06-12 8:21 UTC (permalink / raw)
To: honkiko; +Cc: netdev, stephen, xemul, ebiederm
From: Hong Zhiguo <honkiko@gmail.com>
Date: Sun, 9 Jun 2013 20:15:20 +0800
> it's called in the following register_netdevice. No need to call it
> here.
> Tested with "ip link add type veth" and "ip link add xxx%d type veth".
>
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-12 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-09 12:15 [PATCH net-next] veth: remove redundant call of dev_alloc_name Hong Zhiguo
2013-06-12 8:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).