tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 96624f7bb8d16a983433f4da7f42d18a6acfae12
commit: 1225993d024a369380bf0ff8e8a4786442190cf8 [15/31] ALSA: usb-audio: Fix inconsistent
card PM state after resume
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 1225993d024a369380bf0ff8e8a4786442190cf8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from sound/usb/card.c:39:
In file included from include/linux/slab.h:14:
In file included from include/linux/gfp.h:5:
In file included from include/linux/mmzone.h:7:
In file included from include/linux/spinlock.h:87:
In file included from arch/x86/include/asm/spinlock.h:219:
In file included from arch/x86/include/asm/qrwlock.h:5:
include/asm-generic/qrwlock.h:93:36: warning: comparison of integers of different signs:
'int' and 'u32' (aka 'unsigned int') [-Wsign-compare]
cnts, cnts | _QW_LOCKED) == cnts);
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from sound/usb/card.c:39:
In file included from include/linux/slab.h:107:
In file included from include/linux/kasan.h:16:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:177:3: warning: comparison of integers of different signs:
'unsigned long' and 'int' [-Wsign-compare]
this_cpu_add(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:52:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ?
~~~ ^ ~~
In file included from sound/usb/card.c:39:
In file included from include/linux/slab.h:107:
In file included from include/linux/kasan.h:16:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:276:3: warning: comparison of integers of different signs:
'unsigned long' and 'int' [-Wsign-compare]
this_cpu_sub(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:536:33: note: expanded from macro 'this_cpu_sub'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:356:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ?
~~~ ^ ~~
In file included from sound/usb/card.c:42:
In file included from include/linux/usb.h:15:
In file included from include/linux/interrupt.h:12:
In file included from include/linux/hardirq.h:8:
In file included from arch/x86/include/asm/hardirq.h:5:
In file included from include/linux/irq.h:418:
In file included from arch/x86/include/asm/hw_irq.h:26:
In file included from arch/x86/include/asm/sections.h:5:
arch/x86/include/asm/uaccess.h:754:26: warning: comparison of integers of different signs:
'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from sound/usb/card.c:42:
In file included from include/linux/usb.h:15:
In file included from include/linux/interrupt.h:12:
In file included from include/linux/hardirq.h:8:
In file included from arch/x86/include/asm/hardirq.h:5:
In file included from include/linux/irq.h:418:
In file included from arch/x86/include/asm/hw_irq.h:26:
In file included from arch/x86/include/asm/sections.h:5:
arch/x86/include/asm/uaccess.h:772:26: warning: comparison of integers of different signs:
'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from sound/usb/card.c:52:
include/sound/pcm.h:1372:17: warning: comparison of integers of different signs:
'int' and 'unsigned int' [-Wsign-compare]
if (s->number == idx)
~~~~~~~~~ ^ ~~~
sound/usb/card.c:254:18: warning: comparison of integers of different signs: 'int'
and 'unsigned long' [-Wsign-compare]
if (rest_bytes < sizeof(*h1)) {
~~~~~~~~~~ ^ ~~~~~~~~~~~
sound/usb/card.c:451:10: warning: comparison of integers of different signs: 'int'
and 'unsigned long' [-Wsign-compare]
if (len < sizeof(card->longname))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
> sound/usb/card.c:765:31: warning: comparison of integers of
different signs: 'int' and 'unsigned int' [-Wsign-compare]
if
(chip->num_suspended_intf == chip->system_suspend) {
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
10 warnings generated.
vim +765 sound/usb/card.c
735
736 static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume)
737 {
738 struct snd_usb_audio *chip = usb_get_intfdata(intf);
739 struct usb_mixer_interface *mixer;
740 struct list_head *p;
741 int err = 0;
742
743 if (chip == (void *)-1L)
744 return 0;
745
746 atomic_inc(&chip->active); /* avoid autopm */
747 if (chip->num_suspended_intf > 1)
748 goto out;
749
750 /*
751 * ALSA leaves material resumption to user space
752 * we just notify and restart the mixers
753 */
754 list_for_each_entry(mixer, &chip->mixer_list, list) {
755 err = snd_usb_mixer_resume(mixer, reset_resume);
756 if (err < 0)
757 goto err_out;
758 }
759
760 list_for_each(p, &chip->midi_list) {
761 snd_usbmidi_resume(p);
762 }
763
764 out:
765 if (chip->num_suspended_intf == chip->system_suspend) {
766 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D0);
767 chip->system_suspend = 0;
768 }
769 chip->num_suspended_intf--;
770
771 err_out:
772 atomic_dec(&chip->active); /* allow autopm after this point */
773 return err;
774 }
775
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org