linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
@ 2022-08-22  3:51 Gaosheng Cui
  2022-09-13 14:03 ` Cezary Rojewski
  2022-09-14  9:40 ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Gaosheng Cui @ 2022-08-22  3:51 UTC (permalink / raw)
  To: cezary.rojewski, pierre-louis.bossart, liam.r.girdwood,
	peter.ujfalusi, yung-chuan.liao, ranjani.sridharan, kai.vehmanen,
	broonie, perex, tiwai, cuigaosheng1
  Cc: alsa-devel, linux-kernel

In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n,
gcc warns about an unused variable:

sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable]
  struct skl_dev *skl = bus_to_skl(bus);
                  ^~~
cc1: all warnings being treated as errors

Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 sound/soc/intel/skylake/skl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index c7c1cad2a753..52a041d6144c 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -726,8 +726,8 @@ static int probe_codec(struct hdac_bus *bus, int addr)
 	unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) |
 		(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
 	unsigned int res = -1;
-	struct skl_dev *skl = bus_to_skl(bus);
 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC)
+	struct skl_dev *skl = bus_to_skl(bus);
 	struct hdac_hda_priv *hda_codec;
 #endif
 	struct hda_codec *codec;
-- 
2.25.1


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

* Re: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
  2022-08-22  3:51 [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec Gaosheng Cui
@ 2022-09-13 14:03 ` Cezary Rojewski
  2022-09-13 15:21   ` Takashi Iwai
  2022-09-14  9:40 ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Cezary Rojewski @ 2022-09-13 14:03 UTC (permalink / raw)
  To: Gaosheng Cui, pierre-louis.bossart, liam.r.girdwood,
	peter.ujfalusi, yung-chuan.liao, ranjani.sridharan, kai.vehmanen,
	broonie, perex, tiwai
  Cc: alsa-devel, linux-kernel

On 2022-08-22 5:51 AM, Gaosheng Cui wrote:
> In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n,
> gcc warns about an unused variable:
> 
> sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
> sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable]
>    struct skl_dev *skl = bus_to_skl(bus);
>                    ^~~
> cc1: all warnings being treated as errors
> 
> Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>

Thanks for the fix.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>

> ---
>   sound/soc/intel/skylake/skl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
> index c7c1cad2a753..52a041d6144c 100644
> --- a/sound/soc/intel/skylake/skl.c
> +++ b/sound/soc/intel/skylake/skl.c
> @@ -726,8 +726,8 @@ static int probe_codec(struct hdac_bus *bus, int addr)
>   	unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) |
>   		(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
>   	unsigned int res = -1;
> -	struct skl_dev *skl = bus_to_skl(bus);
>   #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC)
> +	struct skl_dev *skl = bus_to_skl(bus);
>   	struct hdac_hda_priv *hda_codec;
>   #endif
>   	struct hda_codec *codec;

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

* Re: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
  2022-09-13 14:03 ` Cezary Rojewski
@ 2022-09-13 15:21   ` Takashi Iwai
  0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2022-09-13 15:21 UTC (permalink / raw)
  To: Cezary Rojewski
  Cc: Gaosheng Cui, pierre-louis.bossart, liam.r.girdwood,
	peter.ujfalusi, yung-chuan.liao, ranjani.sridharan, kai.vehmanen,
	broonie, perex, tiwai, alsa-devel, linux-kernel

On Tue, 13 Sep 2022 16:03:35 +0200,
Cezary Rojewski wrote:
> 
> On 2022-08-22 5:51 AM, Gaosheng Cui wrote:
> > In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n,
> > gcc warns about an unused variable:
> > 
> > sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
> > sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable]
> >    struct skl_dev *skl = bus_to_skl(bus);
> >                    ^~~
> > cc1: all warnings being treated as errors
> > 
> > Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation")
> > Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> 
> Thanks for the fix.
> 
> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>

Applied now.


Takashi

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

* Re: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
  2022-08-22  3:51 [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec Gaosheng Cui
  2022-09-13 14:03 ` Cezary Rojewski
@ 2022-09-14  9:40 ` Mark Brown
  2022-09-14 10:27   ` Takashi Iwai
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2022-09-14  9:40 UTC (permalink / raw)
  To: Gaosheng Cui, cezary.rojewski, tiwai, ranjani.sridharan,
	pierre-louis.bossart, perex, liam.r.girdwood, kai.vehmanen,
	peter.ujfalusi, yung-chuan.liao
  Cc: linux-kernel, alsa-devel

On Mon, 22 Aug 2022 11:51:33 +0800, Gaosheng Cui wrote:
> In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n,
> gcc warns about an unused variable:
> 
> sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
> sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable]
>   struct skl_dev *skl = bus_to_skl(bus);
>                   ^~~
> cc1: all warnings being treated as errors
> 
> [...]

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: fix unused-variable warning in probe_codec
      commit: 515626a33a194c4caaf2879dbf9e00e882582af0

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
  2022-09-14  9:40 ` Mark Brown
@ 2022-09-14 10:27   ` Takashi Iwai
  2022-09-14 10:31     ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2022-09-14 10:27 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gaosheng Cui, cezary.rojewski, tiwai, ranjani.sridharan,
	pierre-louis.bossart, perex, liam.r.girdwood, kai.vehmanen,
	peter.ujfalusi, yung-chuan.liao, alsa-devel, linux-kernel

On Wed, 14 Sep 2022 11:40:17 +0200,
Mark Brown wrote:
> 
> On Mon, 22 Aug 2022 11:51:33 +0800, Gaosheng Cui wrote:
> > In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n,
> > gcc warns about an unused variable:
> > 
> > sound/soc/intel/skylake/skl.c: In function ‘probe_codec’:
> > sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable]
> >   struct skl_dev *skl = bus_to_skl(bus);
> >                   ^~~
> > cc1: all warnings being treated as errors
> > 
> > [...]
> 
> Applied to
> 
>    broonie/sound.git for-next
> 
> Thanks!
> 
> [1/1] ASoC: Intel: fix unused-variable warning in probe_codec
>       commit: 515626a33a194c4caaf2879dbf9e00e882582af0
> 
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
> 
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
> 
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
> 
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.

I thought the buggy commit 3fd63658caed9 was present only in my tree
for now, but if it's in your tree, that's fine to apply through
yours.  Then I'll drop from mine.


thanks,

Takashi

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

* Re: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
  2022-09-14 10:27   ` Takashi Iwai
@ 2022-09-14 10:31     ` Mark Brown
  2022-09-14 10:43       ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2022-09-14 10:31 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Gaosheng Cui, cezary.rojewski, tiwai, ranjani.sridharan,
	pierre-louis.bossart, perex, liam.r.girdwood, kai.vehmanen,
	peter.ujfalusi, yung-chuan.liao, alsa-devel, linux-kernel

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

On Wed, Sep 14, 2022 at 12:27:28PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:

> > [1/1] ASoC: Intel: fix unused-variable warning in probe_codec
> >       commit: 515626a33a194c4caaf2879dbf9e00e882582af0

> I thought the buggy commit 3fd63658caed9 was present only in my tree
> for now, but if it's in your tree, that's fine to apply through
> yours.  Then I'll drop from mine.

Huh, right - I think you're right here and it is only in your
tree, it just didn't trigger any issues in my coverage tests
prior to merge.  Probably best to leave it in your tree and
either have a double apply or I'll revert it from mine.  Either
way it'll get fixed by the time it gets sent to Linus.

I'd not remembered that you had any extra stuff for ASoC in your
tree, sorry.

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

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

* Re: [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec
  2022-09-14 10:31     ` Mark Brown
@ 2022-09-14 10:43       ` Takashi Iwai
  0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2022-09-14 10:43 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gaosheng Cui, cezary.rojewski, tiwai, ranjani.sridharan,
	pierre-louis.bossart, perex, liam.r.girdwood, kai.vehmanen,
	peter.ujfalusi, yung-chuan.liao, alsa-devel, linux-kernel

On Wed, 14 Sep 2022 12:31:23 +0200,
Mark Brown wrote:
> 
> On Wed, Sep 14, 2022 at 12:27:28PM +0200, Takashi Iwai wrote:
> > Mark Brown wrote:
> 
> > > [1/1] ASoC: Intel: fix unused-variable warning in probe_codec
> > >       commit: 515626a33a194c4caaf2879dbf9e00e882582af0
> 
> > I thought the buggy commit 3fd63658caed9 was present only in my tree
> > for now, but if it's in your tree, that's fine to apply through
> > yours.  Then I'll drop from mine.
> 
> Huh, right - I think you're right here and it is only in your
> tree, it just didn't trigger any issues in my coverage tests
> prior to merge.  Probably best to leave it in your tree and
> either have a double apply or I'll revert it from mine.  Either
> way it'll get fixed by the time it gets sent to Linus.
>
> I'd not remembered that you had any extra stuff for ASoC in your
> tree, sorry.

No problem, it was rather an exception.

I don't mind to keep in both trees; it should be resolved at the merge
of ASoC tree before the PR to Linus, if any.


thanks,

Takashi

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

end of thread, other threads:[~2022-09-14 10:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22  3:51 [PATCH -next] ASoC: Intel: fix unused-variable warning in probe_codec Gaosheng Cui
2022-09-13 14:03 ` Cezary Rojewski
2022-09-13 15:21   ` Takashi Iwai
2022-09-14  9:40 ` Mark Brown
2022-09-14 10:27   ` Takashi Iwai
2022-09-14 10:31     ` Mark Brown
2022-09-14 10:43       ` Takashi Iwai

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