From patchwork Wed Jun 17 15:52:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 6626941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1193CC0020 for ; Wed, 17 Jun 2015 15:55:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3073620869 for ; Wed, 17 Jun 2015 15:55:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60EE420866 for ; Wed, 17 Jun 2015 15:55:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5FeQ-0006Eu-OV; Wed, 17 Jun 2015 15:53:18 +0000 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5FeL-00065y-QW for linux-arm-kernel@lists.infradead.org; Wed, 17 Jun 2015 15:53:14 +0000 Received: by iecrd14 with SMTP id rd14so36713717iec.3 for ; Wed, 17 Jun 2015 08:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=3tWmG2RKPOCVz2j5Gjlmud5+mQcoTxYEPEY6ZKnW/IU=; b=KMo038boAqyH6scO+UChqm58xtJzn4RVJD6yrUW+odPQYtsylkBfyXUi4nX+ivEW4G JsnO6aVzN9mQ56VW11lufleYrZBQdUfvM45g/bfvHWMV5TGXaAKJttsVlI5kkSJGJiwy FOCi/FlgEaz+ukeMjpILLjkKSPvr6PXuV9kiYGLpwcAd8OGgA0Y61ebMXxgWax2JZxv0 BT+vX4BRVWFpMQikOLkIGRmIH7GalI+pfP4FdSBAQza8q0E8DkqBbpuG4TsH22lK+sOD KYliKPfWxCNPK0qxOZGkFIvbl41CBeVGR/SzpVPcdeW/oScW6FvbFuk1j+S/8waA3kX5 KKnQ== X-Received: by 10.50.78.170 with SMTP id c10mr12039854igx.0.1434556367787; Wed, 17 Jun 2015 08:52:47 -0700 (PDT) Received: from nick-System-Product-Name.hitronhub.home (CPEbc4dfb2691f3-CMbc4dfb2691f0.cpe.net.cable.rogers.com. [99.231.110.121]) by mx.google.com with ESMTPSA id o19sm12161954igi.14.2015.06.17.08.52.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Jun 2015 08:52:46 -0700 (PDT) From: Nicholas Krause To: anirudh@xilinx.com Subject: [PATCH] xilinx:Remove unused variable num_frag in the function axienet_start_xmit Date: Wed, 17 Jun 2015 11:52:42 -0400 Message-Id: <1434556362-3748-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150617_085313_980588_BD80DD11 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, soren.brinkmann@xilinx.com, John.Linn@xilinx.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This removes the unused variable num_frag and the setting of it to the number of fragments from the passed sk_buff pointer by this function's caller due to this variable never being used in this particular function and is not declared as global so setting it for global use in this file is pointless. Signed-off-by: Nicholas Krause --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 28b7e7d..624dce4 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -651,7 +651,6 @@ static inline int axienet_check_tx_bd_space(struct axienet_local *lp, static int axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev) { u32 ii; - u32 num_frag; u32 csum_start_off; u32 csum_index_off; skb_frag_t *frag; @@ -659,7 +658,6 @@ static int axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev) struct axienet_local *lp = netdev_priv(ndev); struct axidma_bd *cur_p; - num_frag = skb_shinfo(skb)->nr_frags; cur_p = &lp->tx_bd_v[lp->tx_bd_tail]; if (axienet_check_tx_bd_space(lp, num_frag)) {