[alsa-devel] [PATCH 1/3] ASoC: support sample sizes properly in the WM8776 codec driver

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Sep 15 12:26:43 CEST 2011


On Wed, Sep 14, 2011 at 04:51:24PM -0500, Timur Tabi wrote:

> >> +	i = snd_pcm_format_width(params_format(params));
> >> +	switch (i) {

> > Just a minor nitpick. I would not have used the intermediate 'i' here
> > and would have just embedded the snd_pcm call within the switch(). I
> > guess it may not fit the line width though.

> 'i' is used twice:

> 	switch (i) {

> and

> 	dev_err(codec->dev, "Unsupported sample size: %i\n", i);

There's no meaningful cost in calling the function twice and it'd be
much more legible to do so.


More information about the Alsa-devel mailing list