lkml.org 
[lkml]   [2018]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [alsa-devel] [PATCH] ASoC: adav80x: mark expected switch fall-through
From
Date
On 08/09/2018 11:30 AM, Mark Brown wrote:
> On Wed, Aug 08, 2018 at 02:19:33PM -0500, Gustavo A. R. Silva wrote:
>
>> @@ -648,6 +648,7 @@ static int adav80x_set_pll(struct snd_soc_component *component, int pll_id,
>> pll_ctrl1 |= ADAV80X_PLL_CTRL1_PLLDIV;
>> break;
>> }
>> + /* fall through */
>> default:
>> return -EINVAL;
>> }
>
> Are you *positive* this is a deliberate fall through?

It is. But it might make sense to re-order the code to look like

case 54000000:
if (source != ADAV80X_PLL_SRC_XIN)
return -EINVAL;

pll_ctrl1 |= ADAV80X_PLL_CTRL1_PLLDIV;
break;

It is just as many lines added when adding the /* fall through */, but it
makes it more obvious what is going on.

Either way:

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

\
 
 \ /
  Last update: 2018-08-09 13:24    [W:0.056 / U:31.840 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site