From patchwork Fri Jan 4 08:49:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1931511 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B2ACFE016D for ; Fri, 4 Jan 2013 08:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754404Ab3ADIux (ORCPT ); Fri, 4 Jan 2013 03:50:53 -0500 Received: from mail-ea0-f172.google.com ([209.85.215.172]:63846 "EHLO mail-ea0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754534Ab3ADIuG (ORCPT ); Fri, 4 Jan 2013 03:50:06 -0500 Received: by mail-ea0-f172.google.com with SMTP id a1so6780331eaa.3 for ; Fri, 04 Jan 2013 00:50:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=T1j/HV0UgOEFmbPFlOx9tUpNno1GE9jQ0yP/kX2sx+E=; b=Ea0W8zb3VK+vrl2N4TRvstU5+slfeczrmQg9ypr883PiLNyaGy4iMp9JWytTCwM/hb yQFKNYsLX22gLmuZ6g2w43Ovq+2qNRZV2rDI3tXPBBuxyVxiOGdrxSHF02L96X1ecCH7 sHmLTOQQizbjuH20U9DSDhEvKoV7HayyLQB0RtvZ/s16z1XL636YhyW5Kkqez+sts6xt lXL13FHsn1wHEKreFZ/mV4xuXNuDGOKt+ktgASk2+th0VeB0/j4p9EIiZf4IrlAAGoAJ qx/4zJK6SYDrH9A2v48mhTU1cMJFn2cyuIKqh6OGD05SmQ3Pe6ZRWCVwtd52oC75S/8o mxEQ== X-Received: by 10.14.203.8 with SMTP id e8mr141988796eeo.2.1357289404707; Fri, 04 Jan 2013 00:50:04 -0800 (PST) Received: from localhost (ip-89-103-8-129.net.upcbroadband.cz. [89.103.8.129]) by mx.google.com with ESMTPS id e2sm109311565eeo.8.2013.01.04.00.50.02 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 00:50:03 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, faisal.latif@intel.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, fubar@us.ibm.com, andy@greyhouse.net, divy@chelsio.com, jitendra.kalsaria@qlogic.com, sony.chacko@qlogic.com, linux-driver@qlogic.com, kaber@trash.net, ursula.braun@de.ibm.com, blaschka@linux.vnet.ibm.com, linux390@de.ibm.com, shemminger@vyatta.com, bhutchings@solarflare.com, therbert@google.com, xiyou.wangcong@gmail.com, joe@perches.com, gregory.v.rose@intel.com, john.r.fastabend@intel.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux-foundation.org, fbl@redhat.com Subject: [patch net-next V6 14/15] net: remove no longer used netdev_set_bond_master() and netdev_set_master() Date: Fri, 4 Jan 2013 09:49:02 +0100 Message-Id: <1357289343-817-15-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357289343-817-1-git-send-email-jiri@resnulli.us> References: <1357289343-817-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQnn+aoVQN2uuZVPtMyx6zBH9b+oZyvKweZ1EX/vRqXW2mn1QR4EDjzX4Y8dHS2j4K3EsDxU Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Jiri Pirko --- include/linux/netdevice.h | 6 +---- net/core/dev.c | 63 ----------------------------------------------- 2 files changed, 1 insertion(+), 68 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 52d1146..c3723ef 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -856,8 +856,7 @@ struct netdev_fcoe_hbainfo { * flow_id is a flow ID to be passed to rps_may_expire_flow() later. * Return the filter ID on success, or a negative error code. * - * Slave management functions (for bridge, bonding, etc). User should - * call netdev_set_master() to set dev->master properly. + * Slave management functions (for bridge, bonding, etc). * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev); * Called to make another netdev an underling. * @@ -2648,9 +2647,6 @@ extern int netdev_master_upper_dev_link(struct net_device *dev, struct net_device *upper_dev); extern void netdev_upper_dev_unlink(struct net_device *dev, struct net_device *upper_dev); -extern int netdev_set_master(struct net_device *dev, struct net_device *master); -extern int netdev_set_bond_master(struct net_device *dev, - struct net_device *master); extern int skb_checksum_help(struct sk_buff *skb); extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features); diff --git a/net/core/dev.c b/net/core/dev.c index 3cd8424..ba50a17 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4826,69 +4826,6 @@ void netdev_upper_dev_unlink(struct net_device *dev, } EXPORT_SYMBOL(netdev_upper_dev_unlink); -/** - * netdev_set_master - set up master pointer - * @slave: slave device - * @master: new master device - * - * Changes the master device of the slave. Pass %NULL to break the - * bonding. The caller must hold the RTNL semaphore. On a failure - * a negative errno code is returned. On success the reference counts - * are adjusted and the function returns zero. - */ -int netdev_set_master(struct net_device *slave, struct net_device *master) -{ - struct net_device *old = slave->master; - int err; - - ASSERT_RTNL(); - - if (master) { - if (old) - return -EBUSY; - err = netdev_master_upper_dev_link(slave, master); - if (err) - return err; - } - - slave->master = master; - - if (old) - netdev_upper_dev_unlink(slave, master); - - return 0; -} -EXPORT_SYMBOL(netdev_set_master); - -/** - * netdev_set_bond_master - set up bonding master/slave pair - * @slave: slave device - * @master: new master device - * - * Changes the master device of the slave. Pass %NULL to break the - * bonding. The caller must hold the RTNL semaphore. On a failure - * a negative errno code is returned. On success %RTM_NEWLINK is sent - * to the routing socket and the function returns zero. - */ -int netdev_set_bond_master(struct net_device *slave, struct net_device *master) -{ - int err; - - ASSERT_RTNL(); - - err = netdev_set_master(slave, master); - if (err) - return err; - if (master) - slave->flags |= IFF_SLAVE; - else - slave->flags &= ~IFF_SLAVE; - - rtmsg_ifinfo(RTM_NEWLINK, slave, IFF_SLAVE); - return 0; -} -EXPORT_SYMBOL(netdev_set_bond_master); - static void dev_change_rx_flags(struct net_device *dev, int flags) { const struct net_device_ops *ops = dev->netdev_ops;