From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Lee Jones <lee.jones@linaro.org>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp>, Mihai Serban <mihai.serban@nxp.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Liam Girdwood <lgirdwood@gmail.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 10/10] ASoC: codecs: ak4458: Remove set but never checked variable 'ret' Date: Tue, 7 Jul 2020 14:16:15 -0500 [thread overview] Message-ID: <20200707191615.98296-11-pierre-louis.bossart@linux.intel.com> (raw) In-Reply-To: <20200707191615.98296-1-pierre-louis.bossart@linux.intel.com> From: Lee Jones <lee.jones@linaro.org> Looks as though the result of snd_soc_update_bits() has never been checked. Fixes the following W=1 kernel build warning(s): sound/soc/codecs/ak4458.c: In function ‘ak4458_set_dai_mute’: sound/soc/codecs/ak4458.c:408:16: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp> Cc: Mihai Serban <mihai.serban@nxp.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> --- sound/soc/codecs/ak4458.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index f180cb5dfe4f..39ae089dcd1d 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -405,7 +405,7 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute) { struct snd_soc_component *component = dai->component; struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component); - int nfs, ndt, ret, reg; + int nfs, ndt, reg; int ats; nfs = ak4458->fs; @@ -416,14 +416,14 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute) ndt = att_speed[ats] / (nfs / 1000); if (mute) { - ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1); + snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1); mdelay(ndt); if (ak4458->mute_gpiod) gpiod_set_value_cansleep(ak4458->mute_gpiod, 1); } else { if (ak4458->mute_gpiod) gpiod_set_value_cansleep(ak4458->mute_gpiod, 0); - ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0); + snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0); mdelay(ndt); } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> To: alsa-devel@alsa-project.org Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, tiwai@suse.de, open list <linux-kernel@vger.kernel.org>, Takashi Iwai <tiwai@suse.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp>, Liam Girdwood <lgirdwood@gmail.com>, broonie@kernel.org, Mihai Serban <mihai.serban@nxp.com>, Lee Jones <lee.jones@linaro.org> Subject: [PATCH v3 10/10] ASoC: codecs: ak4458: Remove set but never checked variable 'ret' Date: Tue, 7 Jul 2020 14:16:15 -0500 [thread overview] Message-ID: <20200707191615.98296-11-pierre-louis.bossart@linux.intel.com> (raw) In-Reply-To: <20200707191615.98296-1-pierre-louis.bossart@linux.intel.com> From: Lee Jones <lee.jones@linaro.org> Looks as though the result of snd_soc_update_bits() has never been checked. Fixes the following W=1 kernel build warning(s): sound/soc/codecs/ak4458.c: In function ‘ak4458_set_dai_mute’: sound/soc/codecs/ak4458.c:408:16: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp> Cc: Mihai Serban <mihai.serban@nxp.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> --- sound/soc/codecs/ak4458.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index f180cb5dfe4f..39ae089dcd1d 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -405,7 +405,7 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute) { struct snd_soc_component *component = dai->component; struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component); - int nfs, ndt, ret, reg; + int nfs, ndt, reg; int ats; nfs = ak4458->fs; @@ -416,14 +416,14 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute) ndt = att_speed[ats] / (nfs / 1000); if (mute) { - ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1); + snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1); mdelay(ndt); if (ak4458->mute_gpiod) gpiod_set_value_cansleep(ak4458->mute_gpiod, 1); } else { if (ak4458->mute_gpiod) gpiod_set_value_cansleep(ak4458->mute_gpiod, 0); - ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0); + snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0); mdelay(ndt); } -- 2.25.1
next prev parent reply other threads:[~2020-07-07 19:16 UTC|newest] Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-07 19:16 [PATCH v3 00/10] ASoC: Clean-up W=1 build warnings - part2 Pierre-Louis Bossart 2020-07-07 19:16 ` [PATCH v3 01/10] ASoC: qcom: q6asm: fix kernel-doc Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` [PATCH v3 02/10] ASoC: sunxi: sun4i-i2s: " Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-08 8:11 ` Maxime Ripard 2020-07-08 8:11 ` Maxime Ripard 2020-07-08 8:11 ` Maxime Ripard 2020-07-07 19:16 ` [PATCH v3 03/10] ASoC: sunxi: sun4i-spdif: " Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-08 8:12 ` Maxime Ripard 2020-07-08 8:12 ` Maxime Ripard 2020-07-08 8:12 ` Maxime Ripard 2020-07-07 19:16 ` [PATCH v3 04/10] ASoC: pxa: pxa-ssp: Demote seemingly unintentional kerneldoc header Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` [PATCH v3 05/10] ASoC: ux500: ux500_msp_i2s: Remove unused variables 'reg_val_DR' and 'reg_val_TSTDR' Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` [PATCH v3 06/10] ASoC: sti: uniperif: fix 'defined by not used' warning Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-08 9:11 ` Arnaud POULIQUEN 2020-07-08 9:11 ` Arnaud POULIQUEN 2020-07-08 12:55 ` Pierre-Louis Bossart 2020-07-08 12:55 ` Pierre-Louis Bossart 2020-07-08 13:33 ` Arnaud POULIQUEN 2020-07-08 13:33 ` Arnaud POULIQUEN 2020-07-07 19:16 ` [PATCH v3 07/10] ASoC: codecs: rt5631: fix kernel-doc Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` [PATCH v3 08/10] ASoC: codecs: rt5659: Remove many unused const variables Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` [PATCH v3 09/10] ASoC: codecs: tlv320aic26: fix kernel-doc warning Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart 2020-07-07 19:16 ` Pierre-Louis Bossart [this message] 2020-07-07 19:16 ` [PATCH v3 10/10] ASoC: codecs: ak4458: Remove set but never checked variable 'ret' Pierre-Louis Bossart 2020-07-08 6:39 ` [PATCH v3 00/10] ASoC: Clean-up W=1 build warnings - part2 Lee Jones 2020-07-08 12:59 ` Pierre-Louis Bossart 2020-07-08 13:06 ` Lee Jones 2020-07-08 13:38 ` Mark Brown 2020-07-08 13:50 ` Lee Jones 2020-07-08 14:42 ` Mark Brown 2020-07-10 15:39 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200707191615.98296-11-pierre-louis.bossart@linux.intel.com \ --to=pierre-louis.bossart@linux.intel.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=kuninori.morimoto.gx@renesas.com \ --cc=lee.jones@linaro.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mihai.serban@nxp.com \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ --cc=tiwai@suse.de \ --cc=wakasugi.jb@om.asahi-kasei.co.jp \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.