All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the sound tree
@ 2019-01-21  0:21 Stephen Rothwell
  2019-01-21  8:13 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2019-01-21  0:21 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Jaroslav Kysela

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

Hi Takashi,

After merging the sound tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

sound/pci/hda/hda_codec.c: In function 'hda_codec_runtime_suspend':
sound/pci/hda/hda_codec.c:2926:18: warning: unused variable 'pcm' [-Wunused-variable]
  struct hda_pcm *pcm;
                  ^~~

Introduced by commit

  17bc4815de58 ("ALSA: pci: Remove superfluous snd_pcm_suspend*() calls")

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warning after merge of the sound tree
  2019-01-21  0:21 linux-next: build warning after merge of the sound tree Stephen Rothwell
@ 2019-01-21  8:13 ` Takashi Iwai
  2019-01-22  7:16   ` [PATCH] ALSA: hda - Fix unused variable warning kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2019-01-21  8:13 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Jaroslav Kysela

On Mon, 21 Jan 2019 01:21:48 +0100,
Stephen Rothwell wrote:
On Mon, 21 Jan 2019 01:21:48 +0100,
Stephen Rothwell wrote:
> 
> Hi Takashi,
> 
> After merging the sound tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> sound/pci/hda/hda_codec.c: In function 'hda_codec_runtime_suspend':
> sound/pci/hda/hda_codec.c:2926:18: warning: unused variable 'pcm' [-Wunused-variable]
>   struct hda_pcm *pcm;
>                   ^~~
> 
> Introduced by commit
> 
>   17bc4815de58 ("ALSA: pci: Remove superfluous snd_pcm_suspend*() calls")

Thanks, fixed now with the patch below.


Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda - Fix unused variable warning

The unused variable was forgotten to be removed and now we get a
compiler warning:
  sound/pci/hda/hda_codec.c: In function 'hda_codec_runtime_suspend':
  sound/pci/hda/hda_codec.c:2926:18: warning: unused variable 'pcm'

Fixes: 17bc4815de58 ("ALSA: pci: Remove superfluous snd_pcm_suspend*() calls")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_codec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index ff6dbed4d3cd..e4704f5729d3 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2923,7 +2923,6 @@ static void hda_call_codec_resume(struct hda_codec *codec)
 static int hda_codec_runtime_suspend(struct device *dev)
 {
 	struct hda_codec *codec = dev_to_hda_codec(dev);
-	struct hda_pcm *pcm;
 	unsigned int state;
 
 	cancel_delayed_work_sync(&codec->jackpoll_work);
-- 
2.16.4


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

* Re: [PATCH] ALSA: hda - Fix unused variable warning
  2019-01-21  8:13 ` Takashi Iwai
@ 2019-01-22  7:16   ` kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2019-01-22  7:16 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: kbuild-all, Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Jaroslav Kysela

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

Hi Takashi,

I love your patch! Yet something to improve:

[auto build test ERROR on sound/for-next]
[also build test ERROR on v5.0-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Takashi-Iwai/ALSA-hda-Fix-unused-variable-warning/20190122-135307
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   In file included from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from sound/pci//hda/hda_codec.c:24:
   sound/pci//hda/hda_codec.c: In function 'hda_codec_runtime_suspend':
>> sound/pci//hda/hda_codec.c:2929:22: error: 'pcm' undeclared (first use in this function)
     list_for_each_entry(pcm, &codec->pcm_list_head, list)
                         ^~~
   include/linux/list.h:517:7: note: in definition of macro 'list_for_each_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
          ^~~
   sound/pci//hda/hda_codec.c:2929:22: note: each undeclared identifier is reported only once for each function it appears in
     list_for_each_entry(pcm, &codec->pcm_list_head, list)
                         ^~~
   include/linux/list.h:517:7: note: in definition of macro 'list_for_each_entry'
     for (pos = list_first_entry(head, typeof(*pos), member); \
          ^~~

vim +/pcm +2929 sound/pci//hda/hda_codec.c

59ed1ead Takashi Iwai 2015-02-18  2922  
cc72da7d Takashi Iwai 2015-02-19  2923  static int hda_codec_runtime_suspend(struct device *dev)
59ed1ead Takashi Iwai 2015-02-18  2924  {
59ed1ead Takashi Iwai 2015-02-18  2925  	struct hda_codec *codec = dev_to_hda_codec(dev);
cc72da7d Takashi Iwai 2015-02-19  2926  	unsigned int state;
59ed1ead Takashi Iwai 2015-02-18  2927  
59ed1ead Takashi Iwai 2015-02-18  2928  	cancel_delayed_work_sync(&codec->jackpoll_work);
bbbc7e85 Takashi Iwai 2015-02-27 @2929  	list_for_each_entry(pcm, &codec->pcm_list_head, list)
bbbc7e85 Takashi Iwai 2015-02-27  2930  		snd_pcm_suspend_all(pcm->pcm);
cc72da7d Takashi Iwai 2015-02-19  2931  	state = hda_call_codec_suspend(codec);
57cb54e5 Takashi Iwai 2018-06-21  2932  	if (codec->link_down_at_suspend ||
57cb54e5 Takashi Iwai 2018-06-21  2933  	    (codec_has_clkstop(codec) && codec_has_epss(codec) &&
57cb54e5 Takashi Iwai 2018-06-21  2934  	     (state & AC_PWRST_CLK_STOP_OK)))
7639a06c Takashi Iwai 2015-03-03  2935  		snd_hdac_codec_link_down(&codec->core);
029d92c2 Takashi Iwai 2018-12-08  2936  	codec_display_power(codec, false);
59ed1ead Takashi Iwai 2015-02-18  2937  	return 0;
59ed1ead Takashi Iwai 2015-02-18  2938  }
59ed1ead Takashi Iwai 2015-02-18  2939  

:::::: The code at line 2929 was first introduced by commit
:::::: bbbc7e8502c95237dbd86cc4d0a12ca9a6b18c8f ALSA: hda - Allocate hda_pcm objects dynamically

:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Takashi Iwai <tiwai@suse.de>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51024 bytes --]

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

end of thread, other threads:[~2019-01-22  7:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21  0:21 linux-next: build warning after merge of the sound tree Stephen Rothwell
2019-01-21  8:13 ` Takashi Iwai
2019-01-22  7:16   ` [PATCH] ALSA: hda - Fix unused variable warning kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.