[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439954830-24947-3-git-send-email-razor@blackwall.org>
Date: Wed, 19 Aug 2015 06:27:08 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: dsa@...ulusnetworks.com, shm@...ulusnetworks.com,
davem@...emloft.net,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH net-next 2/4] vrf: remove unnecessary duplicate check
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
The upper/lower functions already check for duplicate slaves so no need
to do it again.
Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
---
drivers/net/vrf.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 01dc91562a88..9907550ff640 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -352,7 +352,6 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
{
struct net_vrf_dev *vrf_ptr = kmalloc(sizeof(*vrf_ptr), GFP_KERNEL);
struct slave *slave = kzalloc(sizeof(*slave), GFP_KERNEL);
- struct slave *duplicate_slave;
struct net_vrf *vrf = netdev_priv(dev);
struct slave_queue *queue = &vrf->queue;
int ret = -ENOMEM;
@@ -361,16 +360,9 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
goto out_fail;
slave->dev = port_dev;
-
vrf_ptr->ifindex = dev->ifindex;
vrf_ptr->tb_id = vrf->tb_id;
- duplicate_slave = __vrf_find_slave_dev(queue, port_dev);
- if (duplicate_slave) {
- ret = -EBUSY;
- goto out_fail;
- }
-
__vrf_insert_slave(queue, slave);
/* register the packet handler for slave ports */
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists