Subject: Re: [PATCH net 1/4] ice: Fix improper extts handling

From: Jakub Kicinski <[email-masked]>
Date: Thu, 27 Jun 2024 16:16:45 -0700

On Wed, 26 Jun 2024 15:36:00 +0200 Maciej Fijalkowski wrote:
> > +
> > +	for (i = 0; i < pf->ptp.info.n_ext_ts; i++) {
> > +		if (pf->ptp.extts_channels[i].ena) {
> > +			ice_ptp_cfg_extts(pf, i, &pf->ptp.extts_channels[i],
> > +					  false);
> > +		}
> > +	}  
> 
> nit: you don't need braces for single line statements.
> 
> maybe you could rewrite it as below but i'm not sure if it's more
> readable. up to you.
> 
> 	int i, cnt = pf->ptp.info.n_ext_ts;
> 
> 	for (i = 0; i < cnt && pf->ptp.extts_channels[i].ena; i++)
> 		ice_ptp_cfg_extts(pf, i, &pf->ptp.extts_channels[i], false);

not sure this is functionally equivalent, but agreed on the point about
the braces.

Also, FWIW, the commit message doesn't read super well..