tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: d2c5af89e80c5b71f1da59879464a930947306a2
commit: 4f4e1bdc6788e7f33be3abfa0a09811f6b14257e [125/132] ALSA: hda/conexant: Convert to
cdev-variant of mic-mute LED controls
config: arm-randconfig-r013-20210318 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
436c6c9c20cc522c92a923440a5fc509c342a7db)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 4f4e1bdc6788e7f33be3abfa0a09811f6b14257e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
> sound/pci/hda/patch_conexant.c:643:43: warning: declaration of
'struct led_classdev' will not be visible outside of this function [-Wvisibility]
static int cxt_gpio_micmute_update(struct led_classdev *led_cdev,
^
> sound/pci/hda/patch_conexant.c:644:13: warning: declaration of
'enum led_brightness' will not be visible outside of this function [-Wvisibility]
enum led_brightness brightness)
^
> sound/pci/hda/patch_conexant.c:644:28: error: variable has
incomplete type 'enum led_brightness'
enum led_brightness brightness)
^
sound/pci/hda/patch_conexant.c:644:13: note: forward declaration of 'enum
led_brightness'
enum led_brightness brightness)
^
> sound/pci/hda/patch_conexant.c:646:53: error: incomplete
definition of type 'struct led_classdev'
struct hda_codec *codec
= dev_to_hda_codec(led_cdev->dev->parent);
~~~~~~~~^
include/sound/hda_codec.h:289:45: note: expanded from macro 'dev_to_hda_codec'
#define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev)
^~~~
include/linux/kernel.h:993:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
sound/pci/hda/patch_conexant.c:643:43: note: forward declaration of 'struct
led_classdev'
static int cxt_gpio_micmute_update(struct led_classdev *led_cdev,
^
> sound/pci/hda/patch_conexant.c:646:53: error: incomplete
definition of type 'struct led_classdev'
struct hda_codec *codec
= dev_to_hda_codec(led_cdev->dev->parent);
~~~~~~~~^
include/sound/hda_codec.h:289:45: note: expanded from macro 'dev_to_hda_codec'
#define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev)
^~~~
include/linux/kernel.h:994:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:220:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler.h:417:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler.h:405:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler.h:397:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
sound/pci/hda/patch_conexant.c:643:43: note: forward declaration of 'struct
led_classdev'
static int cxt_gpio_micmute_update(struct led_classdev *led_cdev,
^
> sound/pci/hda/patch_conexant.c:646:53: error: incomplete
definition of type 'struct led_classdev'
struct hda_codec *codec
= dev_to_hda_codec(led_cdev->dev->parent);
~~~~~~~~^
include/sound/hda_codec.h:289:45: note: expanded from macro 'dev_to_hda_codec'
#define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev)
^~~~
include/linux/kernel.h:995:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
^~~
include/linux/compiler_types.h:220:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler.h:417:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler.h:405:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler.h:397:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
sound/pci/hda/patch_conexant.c:643:43: note: forward declaration of 'struct
led_classdev'
static int cxt_gpio_micmute_update(struct led_classdev *led_cdev,
^
> sound/pci/hda/patch_conexant.c:670:3: error: implicit declaration
of function 'snd_hda_gen_add_micmute_led_cdev'
[-Werror,-Wimplicit-function-declaration]
snd_hda_gen_add_micmute_led_cdev(codec, cxt_gpio_micmute_update);
^
sound/pci/hda/patch_conexant.c:670:3: note: did you mean
'snd_hda_gen_add_micmute_led'?
sound/pci/hda/hda_generic.h:357:5: note: 'snd_hda_gen_add_micmute_led' declared
here
int snd_hda_gen_add_micmute_led(struct hda_codec *codec,
^
2 warnings and 5 errors generated.
vim +644 sound/pci/hda/patch_conexant.c
641
642 /* turn on/off mic-mute LED via GPIO per capture hook */
643 static int cxt_gpio_micmute_update(struct led_classdev
*led_cdev,
644 enum led_brightness brightness)
645 {
646 struct hda_codec *codec =
dev_to_hda_codec(led_cdev->dev->parent);
647 struct conexant_spec *spec =
codec->spec;
648
649 cxt_update_gpio_led(codec, spec->gpio_mic_led_mask, brightness);
650 return 0;
651 }
652
653
654 static void cxt_fixup_mute_led_gpio(struct hda_codec *codec,
655 const struct hda_fixup *fix, int action)
656 {
657 struct conexant_spec *spec = codec->spec;
658 static const struct hda_verb gpio_init[] = {
659 { 0x01, AC_VERB_SET_GPIO_MASK, 0x03 },
660 { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03 },
661 {}
662 };
663
664 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
665 spec->gen.vmaster_mute.hook = cxt_fixup_gpio_mute_hook;
666 spec->gpio_led = 0;
667 spec->mute_led_polarity = 0;
668 spec->gpio_mute_led_mask = 0x01;
669 spec->gpio_mic_led_mask = 0x02;
670 snd_hda_gen_add_micmute_led_cdev(codec,
cxt_gpio_micmute_update);
671 }
672 snd_hda_add_verbs(codec, gpio_init);
673 if (spec->gpio_led)
674 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
675 spec->gpio_led);
676 }
677
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org