linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: remove unneeded variable: "ret"
@ 2021-07-07 11:51 Gu Shengxian
  0 siblings, 0 replies; 3+ messages in thread
From: Gu Shengxian @ 2021-07-07 11:51 UTC (permalink / raw)
  To: perex, tiwai, james.schulman, david.rhodes, matthias.bgg
  Cc: linux-kernel, patches, Gu Shengxian

From: Gu Shengxian <gushengxian@yulong.com>

The variable: "ret" is only defined and returned.
So it could be removed.
Fix some spelling mistakes.

Signed-off-by: Gu Shengxian <gushengxian@yulong.com>
---
 sound/soc/codecs/ad1836.c        |  2 +-
 sound/soc/codecs/adau1372.c      |  2 +-
 sound/soc/codecs/adau1701.c      |  2 +-
 sound/soc/codecs/adau17x1.c      |  2 +-
 sound/soc/codecs/adau1977.c      |  2 +-
 sound/soc/codecs/ak4554.c        |  2 +-
 sound/soc/codecs/ak4613.c        |  2 +-
 sound/soc/codecs/alc5632.c       |  2 +-
 sound/soc/codecs/arizona.c       |  2 +-
 sound/soc/codecs/cpcap.c         |  2 +-
 sound/soc/codecs/cs35l33.c       |  2 +-
 sound/soc/codecs/cs35l34.c       |  2 +-
 sound/soc/codecs/cs35l36.c       |  2 +-
 sound/soc/codecs/cs4270.c        |  2 +-
 sound/soc/codecs/cs42l42.c       |  2 +-
 sound/soc/codecs/cs42l73.c       |  2 +-
 sound/soc/codecs/cs42xx8.c       |  2 +-
 sound/soc/codecs/cx20442.c       |  4 ++--
 sound/soc/codecs/cx2072x.c       |  6 +++---
 sound/soc/codecs/cx2072x.h       |  2 +-
 sound/soc/codecs/da7210.c        |  2 +-
 sound/soc/codecs/da7213.c        |  2 +-
 sound/soc/codecs/hdac_hda.c      |  2 +-
 sound/soc/codecs/hdac_hdmi.c     |  6 +++---
 sound/soc/codecs/max98088.c      |  2 +-
 sound/soc/codecs/max98373.c      |  2 +-
 sound/soc/codecs/max98390.c      |  2 +-
 sound/soc/codecs/max98927.c      |  4 ++--
 sound/soc/codecs/mt6359-accdet.c |  2 +-
 sound/soc/codecs/mt6359.c        | 10 +++++-----
 sound/soc/codecs/wcd938x.c       |  6 ++----
 31 files changed, 42 insertions(+), 44 deletions(-)

diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 08a5651bed9f..2db3e42fc6c1 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -265,7 +265,7 @@ static int ad1836_probe(struct snd_soc_component *component)
 	regmap_write(ad1836->regmap, AD1836_DAC_CTRL2, 0x0);
 	/* high-pass filter enable, power-on adc */
 	regmap_write(ad1836->regmap, AD1836_ADC_CTRL1, 0x100);
-	/* unmute adc channles, adc aux mode */
+	/* unmute adc channels, adc aux mode */
 	regmap_write(ad1836->regmap, AD1836_ADC_CTRL2, 0x180);
 	/* volume */
 	for (i = 1; i <= num_dacs; ++i) {
diff --git a/sound/soc/codecs/adau1372.c b/sound/soc/codecs/adau1372.c
index 6811a8b3866d..6e9061c60f9f 100644
--- a/sound/soc/codecs/adau1372.c
+++ b/sound/soc/codecs/adau1372.c
@@ -684,7 +684,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 
 	/* I2S mode */
 	if (slots == 0) {
-		/* The other settings dont matter in I2S mode */
+		/* The other settings don't matter in I2S mode */
 		regmap_update_bits(adau1372->regmap, ADAU1372_REG_SAI0,
 				   ADAU1372_SAI0_SAI_MASK, ADAU1372_SAI0_SAI_I2S);
 		adau1372->rate_constraints.mask = ADAU1372_RATE_MASK_TDM2;
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 5ce74697564a..ab6fcfca7506 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -689,7 +689,7 @@ static int adau1701_probe(struct snd_soc_component *component)
 	 */
 	adau1701->pll_clkdiv = ADAU1707_CLKDIV_UNSET;
 
-	/* initalize with pre-configured pll mode settings */
+	/* initialize with pre-configured pll mode settings */
 	ret = adau1701_reset(component, adau1701->pll_clkdiv, 0);
 	if (ret < 0)
 		goto exit_regulators_disable;
diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c
index 8aae7ab74091..c6df4272363c 100644
--- a/sound/soc/codecs/adau17x1.c
+++ b/sound/soc/codecs/adau17x1.c
@@ -876,7 +876,7 @@ static int adau17x1_setup_firmware(struct snd_soc_component *component,
 	 * point in performing the below steps as the call to
 	 * sigmadsp_setup(...) will return directly when it finds the sample
 	 * rate to be the same as before. By checking this we can prevent an
-	 * audiable popping noise which occours when toggling DSP_RUN.
+	 * audible popping noise which occurs when toggling DSP_RUN.
 	 */
 	if (adau->sigmadsp->current_samplerate == rate)
 		return 0;
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index e347a48131d1..9e40a223a7fa 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -241,7 +241,7 @@ static int adau1977_reset(struct adau1977 *adau1977)
 }
 
 /*
- * Returns the appropriate setting for ths FS field in the CTRL0 register
+ * Returns the appropriate setting for the FS field in the CTRL0 register
  * depending on the rate.
  */
 static int adau1977_lookup_fs(unsigned int rate)
diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c
index 8e60e2b56ad6..1e79ac831f69 100644
--- a/sound/soc/codecs/ak4554.c
+++ b/sound/soc/codecs/ak4554.c
@@ -19,7 +19,7 @@
  *
  * CPU/Codec DAI image
  *
- * CPU-DAI1 (plaback only fmt = RIGHT_J) --+-- ak4554
+ * CPU-DAI1 (playback only fmt = RIGHT_J) --+-- ak4554
  *					   |
  * CPU-DAI2 (capture only fmt = LEFT_J) ---+
  */
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index 4d2e78101f28..ed8a069129a5 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -521,7 +521,7 @@ static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd,
 	 *
 	 * Calling ak4613_dummy_write() function might be delayed.
 	 * In such case, ak4613 volume might be temporarily 0dB when
-	 * beggining of playback.
+	 * beginning of playback.
 	 * see also
 	 *	ak4613_dummy_write()
 	 */
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index 79813882a955..df6a6da681cf 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -149,7 +149,7 @@ static const DECLARE_TLV_DB_RANGE(boost_tlv,
 );
 /* 0db min scale, 6 db steps, no mute */
 static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);
-/* 0db min scalem 0.75db steps, no mute */
+/* 0db min scale 0.75db steps, no mute */
 static const DECLARE_TLV_DB_SCALE(vdac_tlv, -3525, 75, 0);
 
 static const struct snd_kcontrol_new alc5632_vol_snd_controls[] = {
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index e32871b3f68a..f7f6c5925a41 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2261,7 +2261,7 @@ static int arizona_calc_fll(struct arizona_fll *fll,
 
 	arizona_fll_dbg(fll, "Fref=%u Fout=%u\n", Fref, fll->fout);
 
-	/* Fvco should be over the targt; don't check the upper bound */
+	/* Fvco should be over the target; don't check the upper bound */
 	div = ARIZONA_FLL_MIN_OUTDIV;
 	while (fll->fout * div < ARIZONA_FLL_MIN_FVCO * fll->vco_mult) {
 		div++;
diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c
index 05bbacd0d174..fa4e024804a5 100644
--- a/sound/soc/codecs/cpcap.c
+++ b/sound/soc/codecs/cpcap.c
@@ -800,7 +800,7 @@ static const struct snd_soc_dapm_widget cpcap_dapm_widgets[] = {
 	SND_SOC_DAPM_PGA("EMU Left PGA",
 		CPCAP_REG_RXOA, CPCAP_BIT_EMU_SPKR_L_EN, 0, NULL, 0),
 
-	/* Headet Charge Pump */
+	/* Headset Charge Pump */
 	SND_SOC_DAPM_SUPPLY("Headset Charge Pump",
 		CPCAP_REG_RXOA, CPCAP_BIT_ST_HS_CP_EN, 0, NULL, 0),
 
diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 2a6f5e46d031..7dd80cb8cae6 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -581,7 +581,7 @@ static int cs35l33_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 			| CS35L33_X_LOC);
 	}
 
-	/* disconnect {vp,vbst}_mon routes: eanble later if set in tx_mask*/
+	/* disconnect {vp,vbst}_mon routes: enable later if set in tx_mask*/
 	snd_soc_dapm_del_routes(dapm, cs35l33_vp_vbst_mon_route,
 		ARRAY_SIZE(cs35l33_vp_vbst_mon_route));
 
diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index ed678241c22b..b8f19a5d1c10 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -298,7 +298,7 @@ static int cs35l34_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 				CS35L34_X_STATE | CS35L34_X_LOC,
 				CS35L34_X_STATE | CS35L34_X_LOC);
 
-	/* disconnect {vp,vbst}_mon routes: eanble later if set in tx_mask*/
+	/* disconnect {vp,vbst}_mon routes: enable later if set in tx_mask*/
 	while (slot >= 0) {
 		/* configure VMON_TX_LOC */
 		if (slot_num == 0)
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index d83c1b318c1c..8bfc680a1177 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -1246,7 +1246,7 @@ static int cs35l36_component_probe(struct snd_soc_component *component)
 	 * L37 is 12V
 	 * If L36 we need to clamp some values for safety
 	 * after probe has setup dt values. We want to make
-	 * sure we dont miss any values set in probe
+	 * sure we don't miss any values set in probe
 	 */
 	if (cs35l36->chip_version == CS35L36_10V_L36) {
 		regmap_update_bits(cs35l36->regmap,
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 2d239e983a83..20c33e7edb22 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -176,7 +176,7 @@ static const struct snd_soc_dapm_route cs4270_dapm_routes[] = {
  * @speed_mode is the corresponding bit pattern to be written to the
  * MODE bits of the Mode Control Register
  *
- * @mclk is the corresponding bit pattern to be wirten to the MCLK bits of
+ * @mclk is the corresponding bit pattern to be written to the MCLK bits of
  * the Mode Control Register.
  *
  * In situations where a single ratio is represented by multiple speed
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index eff013f295be..111fc0c04015 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -1410,7 +1410,7 @@ static irqreturn_t cs42l42_irq_thread(int irq, void *data)
 	int report = 0;
 
 
-	/* Read sticky registers to clear interurpt */
+	/* Read sticky registers to clear interrupt */
 	for (i = 0; i < ARRAY_SIZE(stickies); i++) {
 		regmap_read(cs42l42->regmap, irq_params_table[i].status_addr,
 				&(stickies[i]));
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 018463f34e12..95d50fa22274 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1118,7 +1118,7 @@ static int cs42l73_set_bias_level(struct snd_soc_component *component,
 			mdelay(cs42l73->shutdwn_delay);
 			cs42l73->shutdwn_delay = 0;
 		} else {
-			mdelay(15); /* Min amount of time requred to power
+			mdelay(15); /* Min amount of time required to power
 				     * down.
 				     */
 		}
diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index 5d6ef660f851..bbfe7651b469 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -184,7 +184,7 @@ struct cs42xx8_ratios {
 };
 
 /*
- * According to reference mannual, define the cs42xx8_ratio struct
+ * According to reference manual, define the cs42xx8_ratio struct
  * MFreq2 | MFreq1 | MFreq0 |     Description     | SSM | DSM | QSM |
  * 0      | 0      | 0      |1.029MHz to 12.8MHz  | 256 | 128 |  64 |
  * 0      | 0      | 1      |1.536MHz to 19.2MHz  | 384 | 192 |  96 |
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index ec8d6e74b467..824c09f3fd1a 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -197,10 +197,10 @@ static int cx20442_write(struct snd_soc_component *component, unsigned int reg,
 }
 
 /*
- * Line discpline related code
+ * Line discipline related code
  *
  * Any of the callback functions below can be used in two ways:
- * 1) registerd by a machine driver as one of line discipline operations,
+ * 1) registered by a machine driver as one of line discipline operations,
  * 2) called from a machine's provided line discipline callback function
  *    in case when extra machine specific code must be run as well.
  */
diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c
index 1f5c57fab1d8..2691d747692f 100644
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -565,7 +565,7 @@ static int cx2072x_reg_read(void *context, unsigned int reg,
 	return 0;
 }
 
-/* get suggested pre_div valuce from mclk frequency */
+/* get suggested pre_div value from mclk frequency */
 static unsigned int get_div_from_mclk(unsigned int mclk)
 {
 	unsigned int div = 8;
@@ -1571,7 +1571,7 @@ static struct snd_soc_dai_driver soc_codec_cx2072x_dai[] = {
 		.ops = &cx2072x_dai_ops,
 		.symmetric_rate = 1,
 	},
-	{ /* plabayck only, return echo reference to Conexant DSP chip */
+	{ /* playback only, return echo reference to Conexant DSP chip */
 		.name = "cx2072x-dsp",
 		.id	= CX2072X_DAI_DSP,
 		.probe = cx2072x_dsp_dai_probe,
@@ -1584,7 +1584,7 @@ static struct snd_soc_dai_driver soc_codec_cx2072x_dai[] = {
 		},
 		.ops = &cx2072x_dai_ops,
 	},
-	{ /* plabayck only, return echo reference through I2S TX */
+	{ /* playback only, return echo reference through I2S TX */
 		.name = "cx2072x-aec",
 		.id	= 3,
 		.capture = {
diff --git a/sound/soc/codecs/cx2072x.h b/sound/soc/codecs/cx2072x.h
index ebdd567fa225..09e3a92b184f 100644
--- a/sound/soc/codecs/cx2072x.h
+++ b/sound/soc/codecs/cx2072x.h
@@ -177,7 +177,7 @@
 #define CX2072X_PLBK_DRC_PARM_LEN	9
 #define CX2072X_CLASSD_AMP_LEN		6
 
-/* DAI interfae type */
+/* DAI interface type */
 #define CX2072X_DAI_HIFI	1
 #define CX2072X_DAI_DSP		2
 #define CX2072X_DAI_DSP_PWM	3 /* 4 ch, including mic and AEC */
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 8af344b2fdbf..2b6ed0a5a697 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1151,7 +1151,7 @@ static int da7210_probe(struct snd_soc_component *component)
 	snd_soc_component_write(component, DA7210_PLL_DIV3, DA7210_MCLK_RANGE_10_20_MHZ |
 					      DA7210_PLL_BYP);
 
-	/* Diable PLL and bypass it */
+	/* Disable PLL and bypass it */
 	snd_soc_component_write(component, DA7210_PLL, DA7210_PLL_FS_48000);
 
 	/* Activate all enabled subsystem */
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 3ab89387b4e6..5c3af89ff21e 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -778,7 +778,7 @@ static int da7213_dai_event(struct snd_soc_dapm_widget *w,
 
 		return 0;
 	case SND_SOC_DAPM_POST_PMD:
-		/* Revert 32KHz PLL lock udpates if applied previously */
+		/* Revert 32KHz PLL lock updates if applied previously */
 		pll_ctrl = snd_soc_component_read(component, DA7213_PLL_CTRL);
 		if (pll_ctrl & DA7213_PLL_32K_MODE) {
 			snd_soc_component_write(component, 0xF0, 0x8B);
diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c
index 390dd6c7f6a5..7298244ba92d 100644
--- a/sound/soc/codecs/hdac_hda.c
+++ b/sound/soc/codecs/hdac_hda.c
@@ -487,7 +487,7 @@ static int hdac_hda_codec_probe(struct snd_soc_component *component)
 	/*
 	 * hdac_device core already sets the state to active and calls
 	 * get_noresume. So enable runtime and set the device to suspend.
-	 * pm_runtime_enable is also called during codec registeration
+	 * pm_runtime_enable is also called during codec registration
 	 */
 	pm_runtime_put(&hdev->dev);
 	pm_runtime_suspend(&hdev->dev);
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 66408a98298b..36b194a51fed 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1051,7 +1051,7 @@ static void hdac_hdmi_add_pinmux_cvt_route(struct hdac_device *hdev,
  * Widgets are added in the below sequence
  *	Converter widgets for num converters enumerated
  *	Pin-port widgets for num ports for Pins enumerated
- *	Pin-port mux widgets to represent connenction list of pin widget
+ *	Pin-port mux widgets to represent connection list of pin widget
  *
  * For each port, one Mux and One output widget is added
  * Total widgets elements = num_cvt + (num_ports * 2);
@@ -1256,7 +1256,7 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin,
 		return;
 
 	/*
-	 * In case of non MST pin, get_eld info API expectes port
+	 * In case of non MST pin, get_eld info API expects port
 	 * to be -1.
 	 */
 	mutex_lock(&hdmi->pin_mutex);
@@ -2039,7 +2039,7 @@ static int hdmi_codec_resume(struct device *dev)
 	/*
 	 * As the ELD notify callback request is not entertained while the
 	 * device is in suspend state. Need to manually check detection of
-	 * all pins here. pin capablity change is not support, so use the
+	 * all pins here. pin capability change is not support, so use the
 	 * already set pin caps.
 	 *
 	 * NOTE: this is safe to call even if the codec doesn't actually resume.
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index f8e49e45ce33..a4923601dd72 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -95,7 +95,7 @@ static const struct reg_default max98088_reg[] = {
 
 	{ 0x30, 0x00 }, /* 30 DAI1 playback level */
 	{ 0x31, 0x00 }, /* 31 DAI2 playback level */
-	{ 0x32, 0x00 }, /* 32 DAI2 playbakc level */
+	{ 0x32, 0x00 }, /* 32 DAI2 playback level */
 	{ 0x33, 0x00 }, /* 33 left ADC level */
 	{ 0x34, 0x00 }, /* 34 right ADC level */
 	{ 0x35, 0x00 }, /* 35 MIC1 level */
diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
index e14fe98349a5..8eaba126f534 100644
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -307,7 +307,7 @@ SOC_ENUM("Limiter Release Rate", max98373_limiter_release_rate_enum),
 };
 
 static const struct snd_soc_dapm_route max98373_audio_map[] = {
-	/* Plabyack */
+	/* Playback */
 	{"DAI Sel Mux", "Left", "Amp Enable"},
 	{"DAI Sel Mux", "Right", "Amp Enable"},
 	{"DAI Sel Mux", "LeftRight", "Amp Enable"},
diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c
index 94773ccee9d5..1c8e81499378 100644
--- a/sound/soc/codecs/max98390.c
+++ b/sound/soc/codecs/max98390.c
@@ -686,7 +686,7 @@ static const struct snd_soc_dapm_widget max98390_dapm_widgets[] = {
 };
 
 static const struct snd_soc_dapm_route max98390_audio_map[] = {
-	/* Plabyack */
+	/* Playback */
 	{"DAI Sel Mux", "Left", "Amp Enable"},
 	{"DAI Sel Mux", "Right", "Amp Enable"},
 	{"DAI Sel Mux", "LeftRight", "Amp Enable"},
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index 8b206ee77709..8846b99218f6 100644
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -696,7 +696,7 @@ static int max98927_probe(struct snd_soc_component *component)
 	regmap_write(max98927->regmap,
 		MAX98927_R0026_PCM_TO_SPK_MONOMIX_B,
 		0x1);
-	/* Set inital volume (+13dB) */
+	/* Set initial volume (+13dB) */
 	regmap_write(max98927->regmap,
 		MAX98927_R0036_AMP_VOL_CTRL,
 		0x38);
@@ -911,7 +911,7 @@ static int max98927_i2c_probe(struct i2c_client *i2c,
 	/* voltage/current slot configuration */
 	max98927_slot_config(i2c, max98927);
 
-	/* codec registeration */
+	/* codec registration */
 	ret = devm_snd_soc_register_component(&i2c->dev,
 		&soc_component_dev_max98927,
 		max98927_dai, ARRAY_SIZE(max98927_dai));
diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c
index 78314187d37e..ad3cf4b35488 100644
--- a/sound/soc/codecs/mt6359-accdet.c
+++ b/sound/soc/codecs/mt6359-accdet.c
@@ -752,7 +752,7 @@ static void config_eint_init_by_mode(struct mt6359_accdet *priv)
 	/* ESD switches on */
 	regmap_update_bits(priv->regmap, RG_ACCDETSPARE_ADDR,
 			   1 << 8, 1 << 8);
-	/* before playback, set NCP pull low before nagative voltage */
+	/* before playback, set NCP pull low before negative voltage */
 	regmap_update_bits(priv->regmap, RG_NCP_PDDIS_EN_ADDR,
 			   RG_NCP_PDDIS_EN_MASK_SFT, BIT(RG_NCP_PDDIS_EN_SFT));
 
diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c
index 2d6a4a29b850..89ff46374f1f 100644
--- a/sound/soc/codecs/mt6359.c
+++ b/sound/soc/codecs/mt6359.c
@@ -68,7 +68,7 @@ static void mt6359_reset_capture_gpio(struct mt6359_priv *priv)
 			   0x3 << 0, 0x0);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_dcxo(struct mt6359_priv *priv, bool enable)
 {
 	regmap_update_bits(priv->regmap, MT6359_DCXO_CW12,
@@ -76,7 +76,7 @@ static void mt6359_set_dcxo(struct mt6359_priv *priv, bool enable)
 			   (enable ? 1 : 0) << RG_XO_AUDIO_EN_M_SFT);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_clksq(struct mt6359_priv *priv, bool enable)
 {
 	/* Enable/disable CLKSQ 26MHz */
@@ -85,7 +85,7 @@ static void mt6359_set_clksq(struct mt6359_priv *priv, bool enable)
 			   (enable ? 1 : 0) << RG_CLKSQ_EN_SFT);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_aud_global_bias(struct mt6359_priv *priv, bool enable)
 {
 	regmap_update_bits(priv->regmap, MT6359_AUDDEC_ANA_CON13,
@@ -93,7 +93,7 @@ static void mt6359_set_aud_global_bias(struct mt6359_priv *priv, bool enable)
 			   (enable ? 0 : 1) << RG_AUDGLB_PWRDN_VA32_SFT);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_topck(struct mt6359_priv *priv, bool enable)
 {
 	regmap_update_bits(priv->regmap, MT6359_AUD_TOP_CKPDN_CON0,
@@ -1731,7 +1731,7 @@ static int mt_pga_3_event(struct snd_soc_dapm_widget *w,
 	return 0;
 }
 
-/* It is based on hw's control sequenece to add some delay when PMU/PMD */
+/* It is based on hw's control sequence to add some delay when PMU/PMD */
 static int mt_delay_250_event(struct snd_soc_dapm_widget *w,
 			      struct snd_kcontrol *kcontrol,
 			      int event)
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 78b76eceff8f..5fd708e013f9 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -1623,7 +1623,6 @@ static int wcd938x_codec_aux_dac_event(struct snd_soc_dapm_widget *w,
 {
 	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
 	struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
-	int ret = 0;
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -1651,7 +1650,7 @@ static int wcd938x_codec_aux_dac_event(struct snd_soc_dapm_widget *w,
 				WCD938X_ANA_RX_DIV4_CLK_EN_MASK, 0);
 		break;
 	}
-	return ret;
+	return 0;
 
 }
 
@@ -1866,7 +1865,6 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
 	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
 	struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
 	int hph_mode = wcd938x->hph_mode;
-	int ret = 0;
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -1902,7 +1900,7 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
 						      WCD938X_EN_CUR_DET_MASK, 1);
 		break;
 	}
-	return ret;
+	return 0;
 }
 
 static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: codecs: remove unneeded variable: "ret"
  2021-07-07  6:59 Gu Shengxian
@ 2021-07-07 10:22 ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-07-07 10:22 UTC (permalink / raw)
  To: Gu Shengxian, perex, tiwai, james.schulman, david.rhodes, matthias.bgg
  Cc: kbuild-all, linux-kernel, patches, Gu Shengxian

[-- Attachment #1: Type: text/plain, Size: 4723 bytes --]

Hi Gu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on sound/for-next linus/master next-20210707]
[cannot apply to linux/master v5.13]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Gu-Shengxian/ASoC-codecs-remove-unneeded-variable-ret/20210707-150028
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: ia64-randconfig-r014-20210707 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/30a523dc3af43bae8d4764e6ba542058d038b1ec
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gu-Shengxian/ASoC-codecs-remove-unneeded-variable-ret/20210707-150028
        git checkout 30a523dc3af43bae8d4764e6ba542058d038b1ec
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from arch/ia64/include/asm/sections.h:11,
                    from include/linux/interrupt.h:20,
                    from arch/ia64/include/asm/hw_irq.h:10,
                    from include/linux/irq.h:589,
                    from include/linux/gpio/driver.h:7,
                    from include/linux/of_gpio.h:14,
                    from sound/soc/codecs/wcd938x.c:13:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   sound/soc/codecs/wcd938x.c: In function 'wcd938x_codec_enable_aux_pa':
>> sound/soc/codecs/wcd938x.c:1903:10: error: expected ';' before '}' token
    1903 |  return 0
         |          ^
         |          ;
    1904 | }
         | ~         


vim +1903 sound/soc/codecs/wcd938x.c

  1861	
  1862	static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
  1863					       struct snd_kcontrol *kcontrol, int event)
  1864	{
  1865		struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
  1866		struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
  1867		int hph_mode = wcd938x->hph_mode;
  1868	
  1869		switch (event) {
  1870		case SND_SOC_DAPM_PRE_PMU:
  1871			snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
  1872						      WCD938X_AUX_PDM_WD_EN_MASK, 1);
  1873			break;
  1874		case SND_SOC_DAPM_POST_PMU:
  1875			/* 1 msec delay as per HW requirement */
  1876			usleep_range(1000, 1010);
  1877			if (hph_mode == CLS_AB || hph_mode == CLS_AB_HIFI ||
  1878				hph_mode == CLS_AB_LP || hph_mode == CLS_AB_LOHIFI)
  1879				snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
  1880						WCD938X_REGULATOR_MODE_MASK,
  1881						WCD938X_REGULATOR_MODE_CLASS_AB);
  1882			enable_irq(wcd938x->aux_pdm_wd_int);
  1883			break;
  1884		case SND_SOC_DAPM_PRE_PMD:
  1885			disable_irq_nosync(wcd938x->aux_pdm_wd_int);
  1886			break;
  1887		case SND_SOC_DAPM_POST_PMD:
  1888			/* 1 msec delay as per HW requirement */
  1889			usleep_range(1000, 1010);
  1890			snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
  1891						      WCD938X_AUX_PDM_WD_EN_MASK, 0);
  1892			wcd_clsh_ctrl_set_state(wcd938x->clsh_info,
  1893				     WCD_CLSH_EVENT_POST_PA,
  1894				     WCD_CLSH_STATE_AUX,
  1895				     hph_mode);
  1896	
  1897			wcd938x->flyback_cur_det_disable--;
  1898			if (wcd938x->flyback_cur_det_disable == 0)
  1899				snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
  1900							      WCD938X_EN_CUR_DET_MASK, 1);
  1901			break;
  1902		}
> 1903		return 0
  1904	}
  1905	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36717 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ASoC: codecs: remove unneeded variable: "ret"
@ 2021-07-07  6:59 Gu Shengxian
  2021-07-07 10:22 ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: Gu Shengxian @ 2021-07-07  6:59 UTC (permalink / raw)
  To: perex, tiwai, james.schulman, david.rhodes, matthias.bgg
  Cc: linux-kernel, patches, Gu Shengxian

From: Gu Shengxian <gushengxian@yulong.com>

The variable: "ret" is only defined and returned.
So it could be removed.
Fix some spelling mistakes.

Signed-off-by: Gu Shengxian <gushengxian@yulong.com>
---
 sound/soc/codecs/ad1836.c        |  2 +-
 sound/soc/codecs/adau1372.c      |  2 +-
 sound/soc/codecs/adau1701.c      |  2 +-
 sound/soc/codecs/adau17x1.c      |  2 +-
 sound/soc/codecs/adau1977.c      |  2 +-
 sound/soc/codecs/ak4554.c        |  2 +-
 sound/soc/codecs/ak4613.c        |  2 +-
 sound/soc/codecs/alc5632.c       |  2 +-
 sound/soc/codecs/arizona.c       |  2 +-
 sound/soc/codecs/cpcap.c         |  2 +-
 sound/soc/codecs/cs35l33.c       |  2 +-
 sound/soc/codecs/cs35l34.c       |  2 +-
 sound/soc/codecs/cs35l36.c       |  2 +-
 sound/soc/codecs/cs4270.c        |  2 +-
 sound/soc/codecs/cs42l42.c       |  2 +-
 sound/soc/codecs/cs42l73.c       |  2 +-
 sound/soc/codecs/cs42xx8.c       |  2 +-
 sound/soc/codecs/cx20442.c       |  4 ++--
 sound/soc/codecs/cx2072x.c       |  6 +++---
 sound/soc/codecs/cx2072x.h       |  2 +-
 sound/soc/codecs/da7210.c        |  2 +-
 sound/soc/codecs/da7213.c        |  2 +-
 sound/soc/codecs/hdac_hda.c      |  2 +-
 sound/soc/codecs/hdac_hdmi.c     |  6 +++---
 sound/soc/codecs/max98088.c      |  2 +-
 sound/soc/codecs/max98373.c      |  2 +-
 sound/soc/codecs/max98390.c      |  2 +-
 sound/soc/codecs/max98927.c      |  4 ++--
 sound/soc/codecs/mt6359-accdet.c |  2 +-
 sound/soc/codecs/mt6359.c        | 10 +++++-----
 sound/soc/codecs/wcd938x.c       |  6 ++----
 31 files changed, 42 insertions(+), 44 deletions(-)

diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 08a5651bed9f..2db3e42fc6c1 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -265,7 +265,7 @@ static int ad1836_probe(struct snd_soc_component *component)
 	regmap_write(ad1836->regmap, AD1836_DAC_CTRL2, 0x0);
 	/* high-pass filter enable, power-on adc */
 	regmap_write(ad1836->regmap, AD1836_ADC_CTRL1, 0x100);
-	/* unmute adc channles, adc aux mode */
+	/* unmute adc channels, adc aux mode */
 	regmap_write(ad1836->regmap, AD1836_ADC_CTRL2, 0x180);
 	/* volume */
 	for (i = 1; i <= num_dacs; ++i) {
diff --git a/sound/soc/codecs/adau1372.c b/sound/soc/codecs/adau1372.c
index 6811a8b3866d..6e9061c60f9f 100644
--- a/sound/soc/codecs/adau1372.c
+++ b/sound/soc/codecs/adau1372.c
@@ -684,7 +684,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 
 	/* I2S mode */
 	if (slots == 0) {
-		/* The other settings dont matter in I2S mode */
+		/* The other settings don't matter in I2S mode */
 		regmap_update_bits(adau1372->regmap, ADAU1372_REG_SAI0,
 				   ADAU1372_SAI0_SAI_MASK, ADAU1372_SAI0_SAI_I2S);
 		adau1372->rate_constraints.mask = ADAU1372_RATE_MASK_TDM2;
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 5ce74697564a..ab6fcfca7506 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -689,7 +689,7 @@ static int adau1701_probe(struct snd_soc_component *component)
 	 */
 	adau1701->pll_clkdiv = ADAU1707_CLKDIV_UNSET;
 
-	/* initalize with pre-configured pll mode settings */
+	/* initialize with pre-configured pll mode settings */
 	ret = adau1701_reset(component, adau1701->pll_clkdiv, 0);
 	if (ret < 0)
 		goto exit_regulators_disable;
diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c
index 8aae7ab74091..c6df4272363c 100644
--- a/sound/soc/codecs/adau17x1.c
+++ b/sound/soc/codecs/adau17x1.c
@@ -876,7 +876,7 @@ static int adau17x1_setup_firmware(struct snd_soc_component *component,
 	 * point in performing the below steps as the call to
 	 * sigmadsp_setup(...) will return directly when it finds the sample
 	 * rate to be the same as before. By checking this we can prevent an
-	 * audiable popping noise which occours when toggling DSP_RUN.
+	 * audible popping noise which occurs when toggling DSP_RUN.
 	 */
 	if (adau->sigmadsp->current_samplerate == rate)
 		return 0;
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index e347a48131d1..9e40a223a7fa 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -241,7 +241,7 @@ static int adau1977_reset(struct adau1977 *adau1977)
 }
 
 /*
- * Returns the appropriate setting for ths FS field in the CTRL0 register
+ * Returns the appropriate setting for the FS field in the CTRL0 register
  * depending on the rate.
  */
 static int adau1977_lookup_fs(unsigned int rate)
diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c
index 8e60e2b56ad6..1e79ac831f69 100644
--- a/sound/soc/codecs/ak4554.c
+++ b/sound/soc/codecs/ak4554.c
@@ -19,7 +19,7 @@
  *
  * CPU/Codec DAI image
  *
- * CPU-DAI1 (plaback only fmt = RIGHT_J) --+-- ak4554
+ * CPU-DAI1 (playback only fmt = RIGHT_J) --+-- ak4554
  *					   |
  * CPU-DAI2 (capture only fmt = LEFT_J) ---+
  */
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index 4d2e78101f28..ed8a069129a5 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -521,7 +521,7 @@ static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd,
 	 *
 	 * Calling ak4613_dummy_write() function might be delayed.
 	 * In such case, ak4613 volume might be temporarily 0dB when
-	 * beggining of playback.
+	 * beginning of playback.
 	 * see also
 	 *	ak4613_dummy_write()
 	 */
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index 79813882a955..df6a6da681cf 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -149,7 +149,7 @@ static const DECLARE_TLV_DB_RANGE(boost_tlv,
 );
 /* 0db min scale, 6 db steps, no mute */
 static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);
-/* 0db min scalem 0.75db steps, no mute */
+/* 0db min scale 0.75db steps, no mute */
 static const DECLARE_TLV_DB_SCALE(vdac_tlv, -3525, 75, 0);
 
 static const struct snd_kcontrol_new alc5632_vol_snd_controls[] = {
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index e32871b3f68a..f7f6c5925a41 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2261,7 +2261,7 @@ static int arizona_calc_fll(struct arizona_fll *fll,
 
 	arizona_fll_dbg(fll, "Fref=%u Fout=%u\n", Fref, fll->fout);
 
-	/* Fvco should be over the targt; don't check the upper bound */
+	/* Fvco should be over the target; don't check the upper bound */
 	div = ARIZONA_FLL_MIN_OUTDIV;
 	while (fll->fout * div < ARIZONA_FLL_MIN_FVCO * fll->vco_mult) {
 		div++;
diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c
index 05bbacd0d174..fa4e024804a5 100644
--- a/sound/soc/codecs/cpcap.c
+++ b/sound/soc/codecs/cpcap.c
@@ -800,7 +800,7 @@ static const struct snd_soc_dapm_widget cpcap_dapm_widgets[] = {
 	SND_SOC_DAPM_PGA("EMU Left PGA",
 		CPCAP_REG_RXOA, CPCAP_BIT_EMU_SPKR_L_EN, 0, NULL, 0),
 
-	/* Headet Charge Pump */
+	/* Headset Charge Pump */
 	SND_SOC_DAPM_SUPPLY("Headset Charge Pump",
 		CPCAP_REG_RXOA, CPCAP_BIT_ST_HS_CP_EN, 0, NULL, 0),
 
diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 2a6f5e46d031..7dd80cb8cae6 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -581,7 +581,7 @@ static int cs35l33_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 			| CS35L33_X_LOC);
 	}
 
-	/* disconnect {vp,vbst}_mon routes: eanble later if set in tx_mask*/
+	/* disconnect {vp,vbst}_mon routes: enable later if set in tx_mask*/
 	snd_soc_dapm_del_routes(dapm, cs35l33_vp_vbst_mon_route,
 		ARRAY_SIZE(cs35l33_vp_vbst_mon_route));
 
diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index ed678241c22b..b8f19a5d1c10 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -298,7 +298,7 @@ static int cs35l34_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 				CS35L34_X_STATE | CS35L34_X_LOC,
 				CS35L34_X_STATE | CS35L34_X_LOC);
 
-	/* disconnect {vp,vbst}_mon routes: eanble later if set in tx_mask*/
+	/* disconnect {vp,vbst}_mon routes: enable later if set in tx_mask*/
 	while (slot >= 0) {
 		/* configure VMON_TX_LOC */
 		if (slot_num == 0)
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index d83c1b318c1c..8bfc680a1177 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -1246,7 +1246,7 @@ static int cs35l36_component_probe(struct snd_soc_component *component)
 	 * L37 is 12V
 	 * If L36 we need to clamp some values for safety
 	 * after probe has setup dt values. We want to make
-	 * sure we dont miss any values set in probe
+	 * sure we don't miss any values set in probe
 	 */
 	if (cs35l36->chip_version == CS35L36_10V_L36) {
 		regmap_update_bits(cs35l36->regmap,
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 2d239e983a83..20c33e7edb22 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -176,7 +176,7 @@ static const struct snd_soc_dapm_route cs4270_dapm_routes[] = {
  * @speed_mode is the corresponding bit pattern to be written to the
  * MODE bits of the Mode Control Register
  *
- * @mclk is the corresponding bit pattern to be wirten to the MCLK bits of
+ * @mclk is the corresponding bit pattern to be written to the MCLK bits of
  * the Mode Control Register.
  *
  * In situations where a single ratio is represented by multiple speed
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index eff013f295be..111fc0c04015 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -1410,7 +1410,7 @@ static irqreturn_t cs42l42_irq_thread(int irq, void *data)
 	int report = 0;
 
 
-	/* Read sticky registers to clear interurpt */
+	/* Read sticky registers to clear interrupt */
 	for (i = 0; i < ARRAY_SIZE(stickies); i++) {
 		regmap_read(cs42l42->regmap, irq_params_table[i].status_addr,
 				&(stickies[i]));
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 018463f34e12..95d50fa22274 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1118,7 +1118,7 @@ static int cs42l73_set_bias_level(struct snd_soc_component *component,
 			mdelay(cs42l73->shutdwn_delay);
 			cs42l73->shutdwn_delay = 0;
 		} else {
-			mdelay(15); /* Min amount of time requred to power
+			mdelay(15); /* Min amount of time required to power
 				     * down.
 				     */
 		}
diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index 5d6ef660f851..bbfe7651b469 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -184,7 +184,7 @@ struct cs42xx8_ratios {
 };
 
 /*
- * According to reference mannual, define the cs42xx8_ratio struct
+ * According to reference manual, define the cs42xx8_ratio struct
  * MFreq2 | MFreq1 | MFreq0 |     Description     | SSM | DSM | QSM |
  * 0      | 0      | 0      |1.029MHz to 12.8MHz  | 256 | 128 |  64 |
  * 0      | 0      | 1      |1.536MHz to 19.2MHz  | 384 | 192 |  96 |
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index ec8d6e74b467..824c09f3fd1a 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -197,10 +197,10 @@ static int cx20442_write(struct snd_soc_component *component, unsigned int reg,
 }
 
 /*
- * Line discpline related code
+ * Line discipline related code
  *
  * Any of the callback functions below can be used in two ways:
- * 1) registerd by a machine driver as one of line discipline operations,
+ * 1) registered by a machine driver as one of line discipline operations,
  * 2) called from a machine's provided line discipline callback function
  *    in case when extra machine specific code must be run as well.
  */
diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c
index 1f5c57fab1d8..2691d747692f 100644
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -565,7 +565,7 @@ static int cx2072x_reg_read(void *context, unsigned int reg,
 	return 0;
 }
 
-/* get suggested pre_div valuce from mclk frequency */
+/* get suggested pre_div value from mclk frequency */
 static unsigned int get_div_from_mclk(unsigned int mclk)
 {
 	unsigned int div = 8;
@@ -1571,7 +1571,7 @@ static struct snd_soc_dai_driver soc_codec_cx2072x_dai[] = {
 		.ops = &cx2072x_dai_ops,
 		.symmetric_rate = 1,
 	},
-	{ /* plabayck only, return echo reference to Conexant DSP chip */
+	{ /* playback only, return echo reference to Conexant DSP chip */
 		.name = "cx2072x-dsp",
 		.id	= CX2072X_DAI_DSP,
 		.probe = cx2072x_dsp_dai_probe,
@@ -1584,7 +1584,7 @@ static struct snd_soc_dai_driver soc_codec_cx2072x_dai[] = {
 		},
 		.ops = &cx2072x_dai_ops,
 	},
-	{ /* plabayck only, return echo reference through I2S TX */
+	{ /* playback only, return echo reference through I2S TX */
 		.name = "cx2072x-aec",
 		.id	= 3,
 		.capture = {
diff --git a/sound/soc/codecs/cx2072x.h b/sound/soc/codecs/cx2072x.h
index ebdd567fa225..09e3a92b184f 100644
--- a/sound/soc/codecs/cx2072x.h
+++ b/sound/soc/codecs/cx2072x.h
@@ -177,7 +177,7 @@
 #define CX2072X_PLBK_DRC_PARM_LEN	9
 #define CX2072X_CLASSD_AMP_LEN		6
 
-/* DAI interfae type */
+/* DAI interface type */
 #define CX2072X_DAI_HIFI	1
 #define CX2072X_DAI_DSP		2
 #define CX2072X_DAI_DSP_PWM	3 /* 4 ch, including mic and AEC */
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 8af344b2fdbf..2b6ed0a5a697 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1151,7 +1151,7 @@ static int da7210_probe(struct snd_soc_component *component)
 	snd_soc_component_write(component, DA7210_PLL_DIV3, DA7210_MCLK_RANGE_10_20_MHZ |
 					      DA7210_PLL_BYP);
 
-	/* Diable PLL and bypass it */
+	/* Disable PLL and bypass it */
 	snd_soc_component_write(component, DA7210_PLL, DA7210_PLL_FS_48000);
 
 	/* Activate all enabled subsystem */
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 3ab89387b4e6..5c3af89ff21e 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -778,7 +778,7 @@ static int da7213_dai_event(struct snd_soc_dapm_widget *w,
 
 		return 0;
 	case SND_SOC_DAPM_POST_PMD:
-		/* Revert 32KHz PLL lock udpates if applied previously */
+		/* Revert 32KHz PLL lock updates if applied previously */
 		pll_ctrl = snd_soc_component_read(component, DA7213_PLL_CTRL);
 		if (pll_ctrl & DA7213_PLL_32K_MODE) {
 			snd_soc_component_write(component, 0xF0, 0x8B);
diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c
index 390dd6c7f6a5..7298244ba92d 100644
--- a/sound/soc/codecs/hdac_hda.c
+++ b/sound/soc/codecs/hdac_hda.c
@@ -487,7 +487,7 @@ static int hdac_hda_codec_probe(struct snd_soc_component *component)
 	/*
 	 * hdac_device core already sets the state to active and calls
 	 * get_noresume. So enable runtime and set the device to suspend.
-	 * pm_runtime_enable is also called during codec registeration
+	 * pm_runtime_enable is also called during codec registration
 	 */
 	pm_runtime_put(&hdev->dev);
 	pm_runtime_suspend(&hdev->dev);
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 66408a98298b..36b194a51fed 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1051,7 +1051,7 @@ static void hdac_hdmi_add_pinmux_cvt_route(struct hdac_device *hdev,
  * Widgets are added in the below sequence
  *	Converter widgets for num converters enumerated
  *	Pin-port widgets for num ports for Pins enumerated
- *	Pin-port mux widgets to represent connenction list of pin widget
+ *	Pin-port mux widgets to represent connection list of pin widget
  *
  * For each port, one Mux and One output widget is added
  * Total widgets elements = num_cvt + (num_ports * 2);
@@ -1256,7 +1256,7 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin,
 		return;
 
 	/*
-	 * In case of non MST pin, get_eld info API expectes port
+	 * In case of non MST pin, get_eld info API expects port
 	 * to be -1.
 	 */
 	mutex_lock(&hdmi->pin_mutex);
@@ -2039,7 +2039,7 @@ static int hdmi_codec_resume(struct device *dev)
 	/*
 	 * As the ELD notify callback request is not entertained while the
 	 * device is in suspend state. Need to manually check detection of
-	 * all pins here. pin capablity change is not support, so use the
+	 * all pins here. pin capability change is not support, so use the
 	 * already set pin caps.
 	 *
 	 * NOTE: this is safe to call even if the codec doesn't actually resume.
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index f8e49e45ce33..a4923601dd72 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -95,7 +95,7 @@ static const struct reg_default max98088_reg[] = {
 
 	{ 0x30, 0x00 }, /* 30 DAI1 playback level */
 	{ 0x31, 0x00 }, /* 31 DAI2 playback level */
-	{ 0x32, 0x00 }, /* 32 DAI2 playbakc level */
+	{ 0x32, 0x00 }, /* 32 DAI2 playback level */
 	{ 0x33, 0x00 }, /* 33 left ADC level */
 	{ 0x34, 0x00 }, /* 34 right ADC level */
 	{ 0x35, 0x00 }, /* 35 MIC1 level */
diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
index e14fe98349a5..8eaba126f534 100644
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -307,7 +307,7 @@ SOC_ENUM("Limiter Release Rate", max98373_limiter_release_rate_enum),
 };
 
 static const struct snd_soc_dapm_route max98373_audio_map[] = {
-	/* Plabyack */
+	/* Playback */
 	{"DAI Sel Mux", "Left", "Amp Enable"},
 	{"DAI Sel Mux", "Right", "Amp Enable"},
 	{"DAI Sel Mux", "LeftRight", "Amp Enable"},
diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c
index 94773ccee9d5..1c8e81499378 100644
--- a/sound/soc/codecs/max98390.c
+++ b/sound/soc/codecs/max98390.c
@@ -686,7 +686,7 @@ static const struct snd_soc_dapm_widget max98390_dapm_widgets[] = {
 };
 
 static const struct snd_soc_dapm_route max98390_audio_map[] = {
-	/* Plabyack */
+	/* Playback */
 	{"DAI Sel Mux", "Left", "Amp Enable"},
 	{"DAI Sel Mux", "Right", "Amp Enable"},
 	{"DAI Sel Mux", "LeftRight", "Amp Enable"},
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index 8b206ee77709..8846b99218f6 100644
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -696,7 +696,7 @@ static int max98927_probe(struct snd_soc_component *component)
 	regmap_write(max98927->regmap,
 		MAX98927_R0026_PCM_TO_SPK_MONOMIX_B,
 		0x1);
-	/* Set inital volume (+13dB) */
+	/* Set initial volume (+13dB) */
 	regmap_write(max98927->regmap,
 		MAX98927_R0036_AMP_VOL_CTRL,
 		0x38);
@@ -911,7 +911,7 @@ static int max98927_i2c_probe(struct i2c_client *i2c,
 	/* voltage/current slot configuration */
 	max98927_slot_config(i2c, max98927);
 
-	/* codec registeration */
+	/* codec registration */
 	ret = devm_snd_soc_register_component(&i2c->dev,
 		&soc_component_dev_max98927,
 		max98927_dai, ARRAY_SIZE(max98927_dai));
diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c
index 78314187d37e..ad3cf4b35488 100644
--- a/sound/soc/codecs/mt6359-accdet.c
+++ b/sound/soc/codecs/mt6359-accdet.c
@@ -752,7 +752,7 @@ static void config_eint_init_by_mode(struct mt6359_accdet *priv)
 	/* ESD switches on */
 	regmap_update_bits(priv->regmap, RG_ACCDETSPARE_ADDR,
 			   1 << 8, 1 << 8);
-	/* before playback, set NCP pull low before nagative voltage */
+	/* before playback, set NCP pull low before negative voltage */
 	regmap_update_bits(priv->regmap, RG_NCP_PDDIS_EN_ADDR,
 			   RG_NCP_PDDIS_EN_MASK_SFT, BIT(RG_NCP_PDDIS_EN_SFT));
 
diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c
index 2d6a4a29b850..89ff46374f1f 100644
--- a/sound/soc/codecs/mt6359.c
+++ b/sound/soc/codecs/mt6359.c
@@ -68,7 +68,7 @@ static void mt6359_reset_capture_gpio(struct mt6359_priv *priv)
 			   0x3 << 0, 0x0);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_dcxo(struct mt6359_priv *priv, bool enable)
 {
 	regmap_update_bits(priv->regmap, MT6359_DCXO_CW12,
@@ -76,7 +76,7 @@ static void mt6359_set_dcxo(struct mt6359_priv *priv, bool enable)
 			   (enable ? 1 : 0) << RG_XO_AUDIO_EN_M_SFT);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_clksq(struct mt6359_priv *priv, bool enable)
 {
 	/* Enable/disable CLKSQ 26MHz */
@@ -85,7 +85,7 @@ static void mt6359_set_clksq(struct mt6359_priv *priv, bool enable)
 			   (enable ? 1 : 0) << RG_CLKSQ_EN_SFT);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_aud_global_bias(struct mt6359_priv *priv, bool enable)
 {
 	regmap_update_bits(priv->regmap, MT6359_AUDDEC_ANA_CON13,
@@ -93,7 +93,7 @@ static void mt6359_set_aud_global_bias(struct mt6359_priv *priv, bool enable)
 			   (enable ? 0 : 1) << RG_AUDGLB_PWRDN_VA32_SFT);
 }
 
-/* use only when doing mtkaif calibraiton at the boot time */
+/* use only when doing mtkaif calibration at the boot time */
 static void mt6359_set_topck(struct mt6359_priv *priv, bool enable)
 {
 	regmap_update_bits(priv->regmap, MT6359_AUD_TOP_CKPDN_CON0,
@@ -1731,7 +1731,7 @@ static int mt_pga_3_event(struct snd_soc_dapm_widget *w,
 	return 0;
 }
 
-/* It is based on hw's control sequenece to add some delay when PMU/PMD */
+/* It is based on hw's control sequence to add some delay when PMU/PMD */
 static int mt_delay_250_event(struct snd_soc_dapm_widget *w,
 			      struct snd_kcontrol *kcontrol,
 			      int event)
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 78b76eceff8f..11bdf854e249 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -1623,7 +1623,6 @@ static int wcd938x_codec_aux_dac_event(struct snd_soc_dapm_widget *w,
 {
 	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
 	struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
-	int ret = 0;
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -1651,7 +1650,7 @@ static int wcd938x_codec_aux_dac_event(struct snd_soc_dapm_widget *w,
 				WCD938X_ANA_RX_DIV4_CLK_EN_MASK, 0);
 		break;
 	}
-	return ret;
+	return 0;
 
 }
 
@@ -1866,7 +1865,6 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
 	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
 	struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
 	int hph_mode = wcd938x->hph_mode;
-	int ret = 0;
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -1902,7 +1900,7 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
 						      WCD938X_EN_CUR_DET_MASK, 1);
 		break;
 	}
-	return ret;
+	return 0
 }
 
 static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-07 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 11:51 [PATCH] ASoC: codecs: remove unneeded variable: "ret" Gu Shengxian
  -- strict thread matches above, loose matches on Subject: below --
2021-07-07  6:59 Gu Shengxian
2021-07-07 10:22 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).