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:	Tue, 22 Jul 2014 01:01:05 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	sonic.adi@...il.com, netdev@...r.kernel.org, romieu@...zoreil.com,
	adi-buildroot-devel@...ts.sourceforge.net, sonic.zhang@...log.com
Subject: Re: [PATCH v7] bfin_mac: convert bfin Ethernet driver to NAPI
 framework

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 22 Jul 2014 09:59:44 +0200

> On Tue, 2014-07-22 at 15:38 +0800, Sonic Zhang wrote:
>> From: Sonic Zhang <sonic.zhang@...log.com>
> 
>> +	if (i < budget) {
>> +		napi_complete(napi);
>> +		if (lp->rx_irq_disabled--)
>> +			if (!lp->rx_irq_disabled)
>> +				enable_irq(IRQ_MAC_RX);
> 
> 
> You wrote :
> 
> 	if (A--)
> 		if (!A)
> 			something();
> 
> Isnt a bit strange ???

Indeed, it's very strange, how about:

	if (!--lp->rx_irq_disabled)

which is the canonical way to express this.
--
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