[alsa-devel] [PATCH v2] ASoC: da7210: Add support for PLL and SRM

Ashish Chavan ashish.chavan at kpitcummins.com
Tue Apr 17 16:21:00 CEST 2012


On Tue, 2012-04-17 at 14:43 +0100, Mark Brown wrote:
> On Tue, Apr 17, 2012 at 06:04:06PM +0530, Ashish Chavan wrote:
> 
> > +	/* Search pll div array for correct divisors */
> > +	for (cnt = 0; cnt < ARRAY_SIZE(da7210_pll_div); cnt++) {
> > +		/* check fref */
> > +		if (fref == da7210_pll_div[cnt].fref) {
> > +			/* check mode */
> > +			 if (da7210->master ==  da7210_pll_div[cnt].mode) {
> > +				/* check fout */
> > +				if (fout == da7210_pll_div[cnt].fout) {
> 
> I've applied but this would be a lot clearer if it were writen as a
> single if statement with &&s.

Actually I implemented it like that first. But then realized that
because of the 80 chars limit and long conditions, readability was
hampered. Let me submit a patch to convert it to single if, if that is
preferred way of doing it.




More information about the Alsa-devel mailing list