From patchwork Wed Jan 2 12:28:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1923221 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 153D0DF215 for ; Wed, 2 Jan 2013 12:30:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749Ab3ABM3f (ORCPT ); Wed, 2 Jan 2013 07:29:35 -0500 Received: from mail-ea0-f177.google.com ([209.85.215.177]:61171 "EHLO mail-ea0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852Ab3ABM3c (ORCPT ); Wed, 2 Jan 2013 07:29:32 -0500 Received: by mail-ea0-f177.google.com with SMTP id c10so5702435eaa.22 for ; Wed, 02 Jan 2013 04:29:30 -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=cEvo82tUFYeZDef1YwV2kS9vVbj5i64FkZLDSClVV1E=; b=ODutYaNpWxQxYRgksSFkNO16J1f6xtmQr+vtPksZ1+SX1jqok9VUscTFlSPEjKxCc0 du+eWeGpl4JPjyi7DWm/sg2j6d7CMzJuluMPa1BTTopFaWLY5s+0jR3YC9YnwceCVSJx V1fuQ3T1gFXIVaIEFc+eyoihme4iv9HaMRBq6U2PeknDhyS0YJW7/WL1kDdK7SBHJzmF INCkYQT+JphquMISZp9wY4MLdKQaYm+qiJg/DcAJZDPbY6vnOQ3UR6qTFbccEchMz//7 sUxUGtkYNDT+lnQfFNbJZZIxwVKO2pr63pEjIG3QoYLJHbtcWwzgAJbrbkrm4+YPB7NY db5g== X-Received: by 10.14.194.195 with SMTP id m43mr125666111een.44.1357129770751; Wed, 02 Jan 2013 04:29:30 -0800 (PST) Received: from localhost (sun-0.pirko.cz. [84.16.102.25]) by mx.google.com with ESMTPS id 6sm97220130eea.3.2013.01.02.04.29.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 04:29:30 -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 V5 14/15] net: remove no longer used netdev_set_bond_master() and netdev_set_master() Date: Wed, 2 Jan 2013 13:28:35 +0100 Message-Id: <1357129716-2450-15-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357129716-2450-1-git-send-email-jiri@resnulli.us> References: <1357129716-2450-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQkHlPeQQES3P1oIAOjhXFkHiW3aOgUyQQoPD+wYiryMKp++1oypTb/M6jYiy4bLtJ55+jM/ 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 1af3141..ccca4bf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4824,69 +4824,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;