linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable
@ 2016-12-08  6:01 Kirtika Ruchandani
  2016-12-08 10:00 ` Vinod Koul
  2016-12-08 16:15 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Kirtika Ruchandani @ 2016-12-08  6:01 UTC (permalink / raw)
  To: tiwai
  Cc: Kirtika Ruchandani, arnd, alsa-devel, linux-kernel,
	Hardik T Shah, Omair M Abdullah, Jeeja KP, Subhransu S . Prusty,
	Vinod Koul, Mark Brown

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.

Fixes: 4cd9899f0d16 ("ASoC: Intel: Skylake: Add multiple pin formats")
Cc: Hardik T Shah <hardik.t.shah@intel.com>
Cc: Omair M Abdullah <omair.m.abdullah@intel.com>
Cc: Jeeja KP <jeeja.kp@intel.com>
Cc: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>
---
 sound/soc/intel/skylake/skl-topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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

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

* Re: [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable
  2016-12-08  6:01 [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable Kirtika Ruchandani
@ 2016-12-08 10:00 ` Vinod Koul
  2016-12-08 10:18   ` Vinod Koul
  2016-12-08 16:15 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Vinod Koul @ 2016-12-08 10:00 UTC (permalink / raw)
  To: Kirtika Ruchandani
  Cc: tiwai, arnd, alsa-devel, linux-kernel, Hardik T Shah,
	Omair M Abdullah, Jeeja KP, Subhransu S . Prusty, Mark Brown

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

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

* Re: [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable
  2016-12-08 10:00 ` Vinod Koul
@ 2016-12-08 10:18   ` Vinod Koul
  0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2016-12-08 10:18 UTC (permalink / raw)
  To: Kirtika Ruchandani
  Cc: tiwai, arnd, alsa-devel, linux-kernel, Hardik T Shah,
	Omair M Abdullah, Jeeja KP, Subhransu S . Prusty, Mark Brown

On Thu, Dec 08, 2016 at 03:30:01PM +0530, Vinod Koul wrote:
> 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.

Sorry I messed up, got confused mcfg->out_fmt variable :(

This looks fine:

Acked-by: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

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

* Re: [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable
  2016-12-08  6:01 [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable Kirtika Ruchandani
  2016-12-08 10:00 ` Vinod Koul
@ 2016-12-08 16:15 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-12-08 16:15 UTC (permalink / raw)
  To: Kirtika Ruchandani
  Cc: tiwai, arnd, alsa-devel, linux-kernel, Hardik T Shah,
	Omair M Abdullah, Jeeja KP, Subhransu S . Prusty, Vinod Koul

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

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.

git can't parse this or your second patch, I can't immediately see
what's wrong but please check how you're sending things and retry.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2016-12-08 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08  6:01 [PATCH] ASoC: Intel: Skylake: remove unused 'out_fmt' variable Kirtika Ruchandani
2016-12-08 10:00 ` Vinod Koul
2016-12-08 10:18   ` Vinod Koul
2016-12-08 16:15 ` Mark Brown

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).