Re: [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable
From: Vinod Koul
Date: Thu Dec 08 2016 - 04:53:24 EST
On Wed, Dec 07, 2016 at 10:01:42PM -0800, Kirtika Ruchandani wrote:
> Commit 4cd9899f0d16 introduced struct skl_module_fmt* out_fmt without
> using it. Compiling with W=1 gives the below warning, fix it.
>
> sound/soc/intel/skylake/skl-topology.c: In function âskl_tplg_update_buffer_sizeâ:
> sound/soc/intel/skylake/skl-topology.c:301:34: warning: variable âout_fmtâ set but not used [-Wunused-but-set-variable]
>
> This is a harmless warning and is only being fixed to reduce the noise
> with W=1 in the kernel.
Heya,
Can you please tell me which tree this warning was found on? At least this
doesn't exist upstream. The out_fmt is very well used.
If you saw this in Chromium tree then it might be due to some missing
backports..
> diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
> index bd313c9..4352236a 100644
> --- a/sound/soc/intel/skylake/skl-topology.c
> +++ b/sound/soc/intel/skylake/skl-topology.c
> @@ -298,7 +298,7 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx,
> struct skl_module_cfg *mcfg)
> {
> int multiplier = 1;
> - struct skl_module_fmt *in_fmt, *out_fmt;
> + struct skl_module_fmt *in_fmt;
> int in_rate, out_rate;
>
>
> @@ -306,7 +306,6 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx,
> * change for pin 0 only
> */
> in_fmt = &mcfg->in_fmt[0];
> - out_fmt = &mcfg->out_fmt[0];
>
> if (mcfg->m_type == SKL_MODULE_TYPE_SRCINT)
> multiplier = 5;
> --
> 2.8.0.rc3.226.g39d4020
--
~Vinod