diff mbox

[14/14] ASoC: zx296702-i2s: remove unused ‘format’

Message ID 1481218297-17568-15-git-send-email-vinod.koul@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vinod Koul Dec. 8, 2016, 5:31 p.m. UTC
In zx_i2s_hw_params(), 'format' is initialized and assigned bits based on
params_format, but never used. So remove it.

sound/soc/zte/zx296702-i2s.c: In function ‘zx_i2s_hw_params’:
sound/soc/zte/zx296702-i2s.c:228:21: warning: variable ‘format’ set but not used [-Wunused-but-set-variable]
  unsigned long val, format;

Cc: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/zte/zx296702-i2s.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Jun Nie Dec. 9, 2016, 2:47 a.m. UTC | #1
2016-12-09 1:31 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:
> In zx_i2s_hw_params(), 'format' is initialized and assigned bits based on
> params_format, but never used. So remove it.
>
> sound/soc/zte/zx296702-i2s.c: In function ‘zx_i2s_hw_params’:
> sound/soc/zte/zx296702-i2s.c:228:21: warning: variable ‘format’ set but not used [-Wunused-but-set-variable]
>   unsigned long val, format;
>
> Cc: Jun Nie <jun.nie@linaro.org>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  sound/soc/zte/zx296702-i2s.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/sound/soc/zte/zx296702-i2s.c b/sound/soc/zte/zx296702-i2s.c
> index 1cad93dc1fcf..ed7a56d1ef54 100644
> --- a/sound/soc/zte/zx296702-i2s.c
> +++ b/sound/soc/zte/zx296702-i2s.c
> @@ -225,7 +225,7 @@ static int zx_i2s_hw_params(struct snd_pcm_substream *substream,
>         struct zx_i2s_info *i2s = snd_soc_dai_get_drvdata(socdai);
>         struct snd_dmaengine_dai_dma_data *dma_data;
>         unsigned int lane, ch_num, len, ret = 0;
> -       unsigned long val, format;
> +       unsigned long val;
>         unsigned long chn_cfg;
>
>         dma_data = snd_soc_dai_get_dma_data(socdai, substream);
> @@ -238,15 +238,12 @@ static int zx_i2s_hw_params(struct snd_pcm_substream *substream,
>
>         switch (params_format(params)) {
>         case SNDRV_PCM_FORMAT_S16_LE:
> -               format = 0;
>                 len = 16;
>                 break;
>         case SNDRV_PCM_FORMAT_S24_LE:
> -               format = 1;
>                 len = 24;
>                 break;
>         case SNDRV_PCM_FORMAT_S32_LE:
> -               format = 2;
>                 len = 32;
>                 break;
>         default:
> --
> 1.9.1
>

Reviewed-by: Jun Nie <jun.nie@linaro.org>
Mark Brown Dec. 15, 2016, 11:36 a.m. UTC | #2
On Fri, Dec 09, 2016 at 10:47:07AM +0800, Jun Nie wrote:
> 2016-12-09 1:31 GMT+08:00 Vinod Koul <vinod.koul@intel.com>:

> > --
> > 1.9.1
> >
> 
> Reviewed-by: Jun Nie <jun.nie@linaro.org>

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.
diff mbox

Patch

diff --git a/sound/soc/zte/zx296702-i2s.c b/sound/soc/zte/zx296702-i2s.c
index 1cad93dc1fcf..ed7a56d1ef54 100644
--- a/sound/soc/zte/zx296702-i2s.c
+++ b/sound/soc/zte/zx296702-i2s.c
@@ -225,7 +225,7 @@  static int zx_i2s_hw_params(struct snd_pcm_substream *substream,
 	struct zx_i2s_info *i2s = snd_soc_dai_get_drvdata(socdai);
 	struct snd_dmaengine_dai_dma_data *dma_data;
 	unsigned int lane, ch_num, len, ret = 0;
-	unsigned long val, format;
+	unsigned long val;
 	unsigned long chn_cfg;
 
 	dma_data = snd_soc_dai_get_dma_data(socdai, substream);
@@ -238,15 +238,12 @@  static int zx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	switch (params_format(params)) {
 	case SNDRV_PCM_FORMAT_S16_LE:
-		format = 0;
 		len = 16;
 		break;
 	case SNDRV_PCM_FORMAT_S24_LE:
-		format = 1;
 		len = 24;
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
-		format = 2;
 		len = 32;
 		break;
 	default: