From patchwork Mon Nov 15 21:12:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 71295 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 31393B712A for ; Tue, 16 Nov 2010 08:15:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758498Ab0KOVMo (ORCPT ); Mon, 15 Nov 2010 16:12:44 -0500 Received: from mail.perches.com ([173.55.12.10]:1379 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758323Ab0KOVMn (ORCPT ); Mon, 15 Nov 2010 16:12:43 -0500 Received: from Joe-Laptop.home (unknown [192.168.1.162]) by mail.perches.com (Postfix) with ESMTP id 4BADA2436C; Mon, 15 Nov 2010 13:10:52 -0800 (PST) From: Joe Perches To: Jiri Kosina Cc: Jay Vosburgh , bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/10] drivers/net/bonding: Remove unnecessary casts of netdev_priv Date: Mon, 15 Nov 2010 13:12:25 -0800 Message-Id: <6cbd8cc45eab4a2f85017c5b7ea926781d977c05.1289855436.git.joe@perches.com> X-Mailer: git-send-email 1.7.3.1.g432b3.dirty In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Joe Perches --- drivers/net/bonding/bond_3ad.c | 3 +-- drivers/net/bonding/bonding.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 106718c..171782e 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -2474,8 +2474,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac goto out; read_lock(&bond->lock); - slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev), - orig_dev); + slave = bond_get_slave_by_dev(netdev_priv(dev), orig_dev); if (!slave) goto out_unlock; diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 4eedb12..ad3ae46 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -286,7 +286,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) return NULL; } - return (struct bonding *)netdev_priv(slave->dev->master); + return netdev_priv(slave->dev->master); } static inline bool bond_is_lb(const struct bonding *bond)