OSDN Git Service

ASoC: codecs: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 9 Jul 2020 01:03:59 +0000 (20:03 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 9 Jul 2020 21:20:31 +0000 (22:20 +0100)
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200709010359.GA18971@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>
29 files changed:
sound/soc/codecs/ab8500-codec.c
sound/soc/codecs/adau1761.c
sound/soc/codecs/adau17x1.c
sound/soc/codecs/adav80x.c
sound/soc/codecs/ak4613.c
sound/soc/codecs/es8328.c
sound/soc/codecs/max9860.c
sound/soc/codecs/msm8916-wcd-analog.c
sound/soc/codecs/rt274.c
sound/soc/codecs/rt5640.c
sound/soc/codecs/rt5677.c
sound/soc/codecs/sta32x.c
sound/soc/codecs/sta350.c
sound/soc/codecs/tas2552.c
sound/soc/codecs/tlv320aic23.c
sound/soc/codecs/tlv320aic31xx.c
sound/soc/codecs/tpa6130a2.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8955.c
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8961.c
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm8995.c
sound/soc/codecs/wm8996.c
sound/soc/codecs/wm9081.c

index ea92007..31a8c41 100644 (file)
@@ -2126,7 +2126,7 @@ static int ab8500_codec_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
                dev_err(dai->component->dev,
                        "%s: ERROR: The device is either a master or a slave.\n",
                        __func__);
-               /* fall through */
+               fallthrough;
        default:
                dev_err(dai->component->dev,
                        "%s: ERROR: Unsupporter master mask 0x%x\n",
index 5ca9b74..fb006fc 100644 (file)
@@ -642,7 +642,7 @@ static int adau1761_setup_digmic_jackdetect(struct snd_soc_component *component)
                        ARRAY_SIZE(adau1761_jack_detect_controls));
                if (ret)
                        return ret;
-               /* fall through */
+               fallthrough;
        case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE:
                ret = snd_soc_dapm_add_routes(dapm, adau1761_no_dmic_routes,
                        ARRAY_SIZE(adau1761_no_dmic_routes));
@@ -693,7 +693,7 @@ static int adau1761_setup_headphone_mode(struct snd_soc_component *component)
                        ADAU1761_PLAY_MONO_OUTPUT_VOL_UNMUTE,
                        ADAU1761_PLAY_MONO_OUTPUT_VOL_MODE_HP |
                        ADAU1761_PLAY_MONO_OUTPUT_VOL_UNMUTE);
-               /* fallthrough */
+               fallthrough;
        case ADAU1761_OUTPUT_MODE_HEADPHONE:
                regmap_update_bits(adau->regmap, ADAU1761_PLAY_HP_RIGHT_VOL,
                        ADAU1761_PLAY_HP_RIGHT_VOL_MODE_HP,
index b6352de..30e072c 100644 (file)
@@ -385,7 +385,7 @@ static int adau17x1_set_dai_sysclk(struct snd_soc_dai *dai,
        case ADAU17X1_CLK_SRC_PLL_AUTO:
                if (!adau->mclk)
                        return -EINVAL;
-               /* Fall-through */
+               fallthrough;
        case ADAU17X1_CLK_SRC_PLL:
                is_pll = true;
                break;
@@ -469,7 +469,7 @@ static int adau17x1_hw_params(struct snd_pcm_substream *substream,
                ret = adau17x1_auto_pll(dai, params);
                if (ret)
                        return ret;
-               /* Fall-through */
+               fallthrough;
        case ADAU17X1_CLK_SRC_PLL:
                freq = adau->pll_freq;
                break;
index c4b9722..4fd9928 100644 (file)
@@ -647,7 +647,7 @@ static int adav80x_set_pll(struct snd_soc_component *component, int pll_id,
                        pll_ctrl1 |= ADAV80X_PLL_CTRL1_PLLDIV;
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                return -EINVAL;
        }
index d4d2f0d..8d663e8 100644 (file)
@@ -451,13 +451,13 @@ static int ak4613_set_bias_level(struct snd_soc_component *component,
        switch (level) {
        case SND_SOC_BIAS_ON:
                mgmt1 |= RSTN;
-               /* fall through */
+               fallthrough;
        case SND_SOC_BIAS_PREPARE:
                mgmt1 |= PMADC | PMDAC;
-               /* fall through */
+               fallthrough;
        case SND_SOC_BIAS_STANDBY:
                mgmt1 |= PMVR;
-               /* fall through */
+               fallthrough;
        case SND_SOC_BIAS_OFF:
        default:
                break;
index fdf64c2..757e740 100644 (file)
@@ -562,14 +562,14 @@ static int es8328_set_sysclk(struct snd_soc_dai *codec_dai,
                break;
        case 22579200:
                mclkdiv2 = 1;
-               /* fall through */
+               fallthrough;
        case 11289600:
                es8328->sysclk_constraints = &constraints_11289;
                es8328->mclk_ratios = ratios_11289;
                break;
        case 24576000:
                mclkdiv2 = 1;
-               /* fall through */
+               fallthrough;
        case 12288000:
                es8328->sysclk_constraints = &constraints_12288;
                es8328->mclk_ratios = ratios_12288;
index 8be636f..d5925c4 100644 (file)
@@ -334,7 +334,7 @@ static int max9860_hw_params(struct snd_pcm_substream *substream,
                        return -EINVAL;
                }
                ifc1a ^= MAX9860_WCI;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_IB_NF:
                ifc1a ^= MAX9860_DBCI;
                ifc1b ^= MAX9860_ABCI;
index 30da00a..4428c62 100644 (file)
@@ -608,7 +608,7 @@ static int pm8916_wcd_analog_enable_adc(struct snd_soc_dapm_widget *w,
                case CDC_A_TX_2_EN:
                        snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
                                            MICB_1_CTL_CFILT_REF_SEL_MASK, 0);
-                       /* fall through */
+                       fallthrough;
                case CDC_A_TX_3_EN:
                        snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX2_CTL,
                                            CONN_TX2_SERIAL_TX2_MUX,
index cbb5e17..923b8f9 100644 (file)
@@ -760,7 +760,7 @@ static int rt274_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
                break;
        default:
                dev_warn(component->dev, "invalid pll source, use BCLK\n");
-               /* fall through */
+               fallthrough;
        case RT274_PLL2_S_BCLK:
                snd_soc_component_update_bits(component, RT274_PLL2_CTRL,
                                RT274_PLL2_SRC_MASK, RT274_PLL2_SRC_BCLK);
@@ -788,7 +788,7 @@ static int rt274_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
                        break;
                default:
                        dev_warn(component->dev, "invalid freq_in, assume 4.8M\n");
-                       /* fall through */
+                       fallthrough;
                case 100:
                        snd_soc_component_write(component, 0x7a, 0xaab6);
                        snd_soc_component_write(component, 0x7b, 0x0301);
index 3b2bb62..1414ad1 100644 (file)
@@ -1662,7 +1662,7 @@ static int get_sdp_info(struct snd_soc_component *component, int dai_id)
                        break;
                case RT5640_IF_113:
                        ret |= RT5640_U_IF1;
-                       /* fall through */
+                       fallthrough;
                case RT5640_IF_312:
                case RT5640_IF_213:
                        ret |= RT5640_U_IF2;
@@ -1678,7 +1678,7 @@ static int get_sdp_info(struct snd_soc_component *component, int dai_id)
                        break;
                case RT5640_IF_223:
                        ret |= RT5640_U_IF1;
-                       /* fall through */
+                       fallthrough;
                case RT5640_IF_123:
                case RT5640_IF_321:
                        ret |= RT5640_U_IF2;
index e9a051a..9e449d3 100644 (file)
@@ -4609,7 +4609,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
                break;
        case 25:
                slot_width_25 = 0x8080;
-               /* fall through */
+               fallthrough;
        case 24:
                val |= (2 << 8);
                break;
index e8d2ca4..86528b9 100644 (file)
@@ -697,7 +697,7 @@ static int sta32x_hw_params(struct snd_pcm_substream *substream,
        switch (params_width(params)) {
        case 24:
                dev_dbg(component->dev, "24bit\n");
-               /* fall through */
+               fallthrough;
        case 32:
                dev_dbg(component->dev, "24bit or 32bit\n");
                switch (sta32x->format) {
index ccb7100..75d3b06 100644 (file)
@@ -726,7 +726,7 @@ static int sta350_hw_params(struct snd_pcm_substream *substream,
        switch (params_width(params)) {
        case 24:
                dev_dbg(component->dev, "24bit\n");
-               /* fall through */
+               fallthrough;
        case 32:
                dev_dbg(component->dev, "24bit or 32bit\n");
                switch (sta350->format) {
index 529c0fb..d9d239d 100644 (file)
@@ -407,7 +407,7 @@ static int tas2552_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
                        clk_id = TAS2552_PLL_CLKIN_BCLK;
                        freq = 0;
                }
-               /* fall through */
+               fallthrough;
        case TAS2552_PLL_CLKIN_BCLK:
        case TAS2552_PLL_CLKIN_1_8_FIXED:
                mask = TAS2552_PLL_SRC_MASK;
index d22f75e..7d5b6db 100644 (file)
@@ -449,7 +449,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
                break;
        case SND_SOC_DAIFMT_DSP_A:
                iface_reg |= TLV320AIC23_LRP_ON;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_B:
                iface_reg |= TLV320AIC23_FOR_DSP;
                break;
index 31daa60..6694e56 100644 (file)
@@ -1080,7 +1080,8 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai,
        case SND_SOC_DAIFMT_I2S:
                break;
        case SND_SOC_DAIFMT_DSP_A:
-               dsp_a_val = 0x1; /* fall through */
+               dsp_a_val = 0x1;
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_B:
                /*
                 * NOTE: This CODEC samples on the falling edge of BCLK in
index 0b1f1a5..e2d7ae6 100644 (file)
@@ -261,7 +261,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
        default:
                dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n",
                         data->id);
-               /* fall through */
+               fallthrough;
        case TPA6130A2:
                regulator = "Vdd";
                break;
index a1b6765..f3c3112 100644 (file)
@@ -966,7 +966,8 @@ static int wm8753_pcm_set_dai_fmt(struct snd_soc_component *component,
        case SND_SOC_DAIFMT_CBS_CFS:
                break;
        case SND_SOC_DAIFMT_CBM_CFM:
-               ioctl |= 0x2; /* fall through */
+               ioctl |= 0x2;
+               fallthrough;
        case SND_SOC_DAIFMT_CBM_CFS:
                voice |= 0x0040;
                break;
@@ -1091,7 +1092,8 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_component *component,
        case SND_SOC_DAIFMT_CBS_CFS:
                break;
        case SND_SOC_DAIFMT_CBM_CFM:
-               ioctl |= 0x1; /* fall through */
+               ioctl |= 0x1;
+               fallthrough;
        case SND_SOC_DAIFMT_CBM_CFS:
                hifi |= 0x0040;
                break;
index 5de663d..a52cb8f 100644 (file)
@@ -1927,7 +1927,7 @@ static int wm8903_set_pdata_irq_trigger(struct i2c_client *i2c,
                * We assume the controller imposes no restrictions,
                * so we are able to select active-high
                */
-               /* Fall-through */
+               fallthrough;
        case IRQ_TYPE_LEVEL_HIGH:
                pdata->irq_active_low = false;
                break;
index 3f0e49c..d542570 100644 (file)
@@ -1436,7 +1436,7 @@ static int wm8904_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
        case SND_SOC_DAIFMT_DSP_B:
                aif1 |= 0x3 | WM8904_AIF_LRCLK_INV;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif1 |= 0x3;
                break;
@@ -1824,7 +1824,7 @@ static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
                        break;
                }
                clk_id = WM8904_CLK_MCLK;
-               /* fallthrough */
+               fallthrough;
 
        case WM8904_CLK_MCLK:
                priv->sysclk_src = clk_id;
index 73c192f..0630dcb 100644 (file)
@@ -683,7 +683,7 @@ static int wm8955_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
        case SND_SOC_DAIFMT_DSP_B:
                aif |= WM8955_LRP;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif |= 0x3;
                break;
index 9dca6e2..e1ab2be 100644 (file)
@@ -836,7 +836,7 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
                        iface |= 0x000c;
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                dev_err(component->dev, "unsupported width %d\n",
                        params_width(params));
index d11a38a..e62a0a8 100644 (file)
@@ -650,7 +650,7 @@ static int wm8961_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 
        case SND_SOC_DAIFMT_DSP_B:
                aif |= WM8961_LRP;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif |= 3;
                switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
index 6ef0222..df8cdc7 100644 (file)
@@ -2645,7 +2645,7 @@ static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
        case SND_SOC_DAIFMT_DSP_B:
                aif0 |= WM8962_LRCLK_INV | 3;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif0 |= 3;
 
index 207c021..8c9f82e 100644 (file)
@@ -1073,7 +1073,7 @@ static int wm8993_set_sysclk(struct snd_soc_dai *codec_dai,
        switch (clk_id) {
        case WM8993_SYSCLK_MCLK:
                wm8993->mclk_rate = freq;
-               /* fall through */
+               fallthrough;
        case WM8993_SYSCLK_FLL:
                wm8993->sysclk_source = clk_id;
                break;
@@ -1121,7 +1121,7 @@ static int wm8993_set_dai_fmt(struct snd_soc_dai *dai,
        switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
        case SND_SOC_DAIFMT_DSP_B:
                aif1 |= WM8993_AIF_LRCLK_INV;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif1 |= 0x18;
                break;
index 75242ec..903f8e8 100644 (file)
@@ -853,7 +853,7 @@ static void vmid_reference(struct snd_soc_component *component)
                switch (wm8994->vmid_mode) {
                default:
                        WARN_ON(NULL == "Invalid VMID mode");
-                       /* fall through */
+                       fallthrough;
                case WM8994_VMID_NORMAL:
                        /* Startup bias, VMID ramp & buffer */
                        snd_soc_component_update_bits(component, WM8994_ANTIPOP_2,
@@ -2776,7 +2776,7 @@ static int wm8994_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        case SND_SOC_DAIFMT_DSP_B:
                aif1 |= WM8994_AIF1_LRCLK_INV;
                lrclk |= WM8958_AIF1_LRCLK_INV;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif1 |= 0x18;
                break;
index 276ffa8..ec75281 100644 (file)
@@ -1462,7 +1462,7 @@ static int wm8995_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
        case SND_SOC_DAIFMT_DSP_B:
                aif |= WM8995_AIF1_LRCLK_INV;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif |= (0x3 << WM8995_AIF1_FMT_SHIFT);
                break;
index 1d3b3f4..d303ef7 100644 (file)
@@ -1854,7 +1854,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
        case 24576000:
                ratediv = WM8996_SYSCLK_DIV;
                wm8996->sysclk /= 2;
-               /* fall through */
+               fallthrough;
        case 11289600:
        case 12288000:
                snd_soc_component_update_bits(component, WM8996_AIF_RATE,
index be5c9c2..b5465e4 100644 (file)
@@ -929,7 +929,7 @@ static int wm9081_set_dai_fmt(struct snd_soc_dai *dai,
        switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
        case SND_SOC_DAIFMT_DSP_B:
                aif2 |= WM9081_AIF_LRCLK_INV;
-               /* fall through */
+               fallthrough;
        case SND_SOC_DAIFMT_DSP_A:
                aif2 |= 0x3;
                break;