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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Apr 2015 20:30:07 +0800
From:	Ding Tianhong <dingtianhong@...wei.com>
To:	<arnd@...db.de>, <davem@...emloft.net>, <grant.likely@...aro.org>
CC:	<sergei.shtylyov@...entembedded.com>,
	<linux-arm-kernel@...ts.infradead.org>, <eric.dumazet@...il.com>,
	<zhangfei.gao@...aro.org>, <joe@...ches.com>,
	<netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
	<linux@....linux.org.uk>
Subject: [PATCH net-next 5/6] net: hip04: remove the unnecessary check

Testing bytes_compl should be enough, because there is no way
that pkt_compl could be 0 if bytes_compl is not 0.

Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Eric Dumazet <eric.dumazet@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Zhangfei Gao <zhangfei.gao@...aro.org>
Cc: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Joe Perches <joe@...ches.com>
---
 drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index ff9d19c..a7ab1d9 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -440,7 +440,7 @@ static int hip04_tx_reclaim(struct net_device *ndev, bool force)
 	smp_wmb(); /* Ensure tx_tail visible to xmit */
 
 out:
-	if (pkts_compl || bytes_compl)
+	if (bytes_compl)
 		netdev_completed_queue(ndev, pkts_compl, bytes_compl);
 
 	if (unlikely(netif_queue_stopped(ndev)) && (count < (TX_DESC_NUM - 1)))
-- 
1.8.0


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ