From patchwork Mon Aug 13 15:27:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1313611 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 A2222DF223 for ; Mon, 13 Aug 2012 15:29:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151Ab2HMP2A (ORCPT ); Mon, 13 Aug 2012 11:28:00 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:55463 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753051Ab2HMP16 (ORCPT ); Mon, 13 Aug 2012 11:27:58 -0400 Received: by mail-ey0-f174.google.com with SMTP id c11so1186782eaa.19 for ; Mon, 13 Aug 2012 08:27:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=YHaIGDLTBuMbMOGN6G4l3ersm5vYYRE1aaeGwJeSo5o=; b=P+7WlfpHuToe7LRm9oZRQ8QtR3HKNu6zxpMixYf4lLSY7xHF3g+CKNMUE/4XxEVC14 nxSrZqPVD3epeA/VUUTTGg65LNKR1l5kbRqwqy+1r/J9fNpsI3aPhGzyj/aX5t78vnUO XknnQAeUUOjZ1jHejKxH7dCP3L0vEy42v6lioPO3odqRGZb+phRWv+5WfO0G5uzHteT/ +R7NAKhdmGATO1hzdja6bD3bcVX/pJGtyslPmM+wSXwoAoLHC1ASEjm9T77W3Q7IroYs FpPM+tvnYywhT7aSy0yAu8WwoyeGT77NrB6Bxqpm7CPJlTVYsSVN/vpfCQ2w1N17xKsZ RUng== Received: by 10.14.204.200 with SMTP id h48mr10438693eeo.7.1344871677806; Mon, 13 Aug 2012 08:27:57 -0700 (PDT) Received: from localhost (nat-pool-brq-t.redhat.com. [209.132.186.34]) by mx.google.com with ESMTPS id 45sm19854015eeb.8.2012.08.13.08.27.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 08:27:57 -0700 (PDT) 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 14/16] net: remove no longer used netdev_set_bond_master() and netdev_set_master() Date: Mon, 13 Aug 2012 17:27:13 +0200 Message-Id: <1344871635-1052-15-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344871635-1052-1-git-send-email-jiri@resnulli.us> References: <1344871635-1052-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQlc2+ssVVBzp2dAJdtdvJgT1tQ1J+7u3eHcjJ1lquNgPOsNGae0tBD80BOAmIPdg3gTdyrB 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 e7a07f8..757f627 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -886,8 +886,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. * @@ -2625,9 +2624,6 @@ extern int netdev_unique_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 68db1ac..c0f9adb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4648,69 +4648,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_unique_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;