lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150617160730.GE2906@xsjsorenbubuntu>
Date:	Wed, 17 Jun 2015 09:07:30 -0700
From:	Sören Brinkmann <soren.brinkmann@...inx.com>
To:	Nicholas Krause <xerofoify@...il.com>
CC:	<anirudh@...inx.com>, <John.Linn@...inx.com>,
	<michal.simek@...inx.com>, <netdev@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xilinx:Remove unused variable num_frag in the function
 axienet_start_xmit

On Wed, 2015-06-17 at 11:52AM -0400, Nicholas Krause wrote:
> 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@...il.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)) {

It's used right here, isn't it (and further down in this function too)?
Does your tree compile with this change?

	Sören
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ