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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <183bb17e-8f2e-47d9-b15a-e8b6bfcb7f43@moroto.mountain>
Date: Tue, 30 Apr 2024 09:46:11 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Simon Horman <horms@...nel.org>
Cc: MD Danish Anwar <danishanwar@...com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Andrew Lunn <andrew@...n.ch>, Jan Kiszka <jan.kiszka@...mens.com>,
	Diogo Ivo <diogo.ivo@...mens.com>, Paolo Abeni <pabeni@...hat.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, srk@...com,
	Vignesh Raghavendra <vigneshr@...com>, r-gunasekaran@...com,
	Roger Quadros <rogerq@...nel.org>
Subject: Re: [PATCH net-next v2] net: ti: icssg_prueth: Add SW TX / RX
 Coalescing based on hrtimers

On Mon, Apr 29, 2024 at 07:30:34PM +0100, Simon Horman wrote:
> > -	num_tx_packets = emac_tx_complete_packets(emac, tx_chn->id, budget);
> > +	num_tx_packets = emac_tx_complete_packets(emac, tx_chn->id, budget,
> > +						  &tdown);
> >  
> >  	if (num_tx_packets >= budget)
> >  		return budget;
> >  
> > -	if (napi_complete_done(napi_tx, num_tx_packets))
> > -		enable_irq(tx_chn->irq);
> > +	if (napi_complete_done(napi_tx, num_tx_packets)) {
> > +		if (unlikely(tx_chn->tx_pace_timeout_ns && !tdown)) {
> > +			hrtimer_start(&tx_chn->tx_hrtimer,
> > +				      ns_to_ktime(tx_chn->tx_pace_timeout_ns),
> > +				      HRTIMER_MODE_REL_PINNED);
> > +		} else {
> > +			enable_irq(tx_chn->irq);
> > +		}
> 
> This compiles with gcc-13 and clang-18 W=1
> (although the inner {} are unnecessary).
> 

A lot of people have the rule that multi line indents get curly braces
even when they're not required.  I feel like it does help readability.

regards,
dan carpenter



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ