netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Krause <xerofoify@gmail.com>
To: anirudh@xilinx.com
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
Subject: [PATCH] xilinx:Remove unused variable num_frag in the function axienet_start_xmit
Date: Wed, 17 Jun 2015 11:52:42 -0400	[thread overview]
Message-ID: <1434556362-3748-1-git-send-email-xerofoify@gmail.com> (raw)

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 <xerofoify@gmail.com>
---
 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)) {
-- 
2.1.4

             reply	other threads:[~2015-06-17 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 15:52 Nicholas Krause [this message]
2015-06-17 16:07 ` [PATCH] xilinx:Remove unused variable num_frag in the function axienet_start_xmit Sören Brinkmann
2015-06-17 16:21   ` Nicholas Krause
2015-06-17 18:58     ` Sören Brinkmann
2015-06-18  3:10       ` nick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434556362-3748-1-git-send-email-xerofoify@gmail.com \
    --to=xerofoify@gmail.com \
    --cc=John.Linn@xilinx.com \
    --cc=anirudh@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).