Hello Walter, On Thu, Dec 05, 2019 at 09:37:55AM +0100, walter harms wrote: > Am 05.12.2019 08:24, schrieb Uwe Kleine-König: > > + unsigned int pval; > > + > > if (!prescaler_table[prescaler]) > > continue; > > pval = prescaler_table[prescaler]; > > > nit picking: > Doing the assignment first would remove the only use > of prescaler_table[prescaler]. nit picking: it would be reduced to a single use?! > unsigned int pval = prescaler_table[prescaler]; > if ( ! pval ) > continue; Right, will send a v2 with that. > if you feel adventures you could also replace the for() for a while() > since we know that prescaler == 0. > > while ( prescaler < PWM_PRESCAL_MASK ) > { > unsigned int pval = prescaler_table[prescaler++]; > .... That however has some side effects as prescaler is used after leaving the loop. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |