kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: alsa-devel@alsa-project.org,
	Olivier Moysan <olivier.moysan@st.com>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Arnaud Pouliquen <arnaud.pouliquen@st.com>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next] ASoC: stm32: sai: remove set but not used variables 'mask, cr1'
Date: Mon, 18 Feb 2019 14:41:33 +0000	[thread overview]
Message-ID: <20190218144133.GF17104@kadam> (raw)
In-Reply-To: <20190218134836.107220-1-yuehaibing@huawei.com>

On Mon, Feb 18, 2019 at 01:48:36PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_configure_clock':
> sound/soc/stm/stm32_sai_sub.c:902:11: warning:
>  variable 'mask' set but not used [-Wunused-but-set-variable]
> sound/soc/stm/stm32_sai_sub.c:902:6: warning:
>  variable 'cr1' set but not used [-Wunused-but-set-variable]
> 
> It's not used any more after 8307b2afd386 ("ASoC: stm32: sai: set sai as
> mclk clock provider")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  sound/soc/stm/stm32_sai_sub.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
> index d4825700b63f..a00640f1df06 100644
> --- a/sound/soc/stm/stm32_sai_sub.c
> +++ b/sound/soc/stm/stm32_sai_sub.c
> @@ -898,7 +898,7 @@ static int stm32_sai_configure_clock(struct snd_soc_dai *cpu_dai,
>  				     struct snd_pcm_hw_params *params)
>  {
>  	struct stm32_sai_sub_data *sai = snd_soc_dai_get_drvdata(cpu_dai);
> -	int cr1, mask, div = 0;
> +	int div = 0;
>  	int sai_clk_rate, mclk_ratio, den;
>  	unsigned int rate = params_rate(params);
>  
> @@ -944,8 +944,7 @@ static int stm32_sai_configure_clock(struct snd_soc_dai *cpu_dai,
>  			if (sai->mclk_rate) {
>  				mclk_ratio = sai->mclk_rate / rate;
>  				if (mclk_ratio = 512) {
> -					mask = SAI_XCR1_OSR;
> -					cr1 = SAI_XCR1_OSR;
> +					;
>  				} else if (mclk_ratio != 256) {


Please, no...

				if (mclk_ratio != 512 && mclk_ratio != 256) {
					dev_err(...

regards,
dan carpenter

  reply	other threads:[~2019-02-18 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 13:48 [PATCH -next] ASoC: stm32: sai: remove set but not used variables 'mask, cr1' YueHaibing
2019-02-18 14:41 ` Dan Carpenter [this message]
2019-02-18 14:50 ` [PATCH v2 " YueHaibing
2019-02-18 18:49   ` Applied "ASoC: stm32: sai: remove set but not used variables 'mask, cr1'" to the asoc tree Mark Brown
2019-02-18 18:52   ` 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=20190218144133.GF17104@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=broonie@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=olivier.moysan@st.com \
    --cc=tiwai@suse.com \
    --cc=yuehaibing@huawei.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).