Hi Takashi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on sound/for-next]
[also build test WARNING on v5.14-rc1 next-20210713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Takashi-Iwai/ALSA-More-devres-us...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: arm64-buildonly-randconfig-r003-20210713 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
8d69635ed9ecf36fd0ca85906bfde17949671cbe)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
#
https://github.com/0day-ci/linux/commit/5a2db1e1f5fcf4283a42d5a93a10436ef...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Takashi-Iwai/ALSA-More-devres-usages/20210713-225131
git checkout 5a2db1e1f5fcf4283a42d5a93a10436ef67e2829
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>):
> sound/pci/bt87x.c:841:10: warning: variable 'chip' is
uninitialized when used here [-Wuninitialized]
memcpy(&chip->board, &snd_bt87x_boards[boardid], sizeof(chip->board));
^~~~
sound/pci/bt87x.c:813:24: note: initialize the variable 'chip' to silence this
warning
struct snd_bt87x *chip;
^
= NULL
1 warning generated.
vim +/chip +841 sound/pci/bt87x.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 807
3dd0676335f846 Bill Pemberton 2012-12-06 808 static int snd_bt87x_probe(struct
pci_dev *pci,
^1da177e4c3f41 Linus Torvalds 2005-04-16 809 const struct pci_device_id
*pci_id)
^1da177e4c3f41 Linus Torvalds 2005-04-16 810 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 811 static int dev;
9f362dce9d6315 Takashi Iwai 2005-11-17 812 struct snd_card *card;
9f362dce9d6315 Takashi Iwai 2005-11-17 813 struct snd_bt87x *chip;
dcfb4140328eed Trent Piepho 2007-09-06 814 int err;
dcfb4140328eed Trent Piepho 2007-09-06 815 enum snd_bt87x_boardid boardid;
^1da177e4c3f41 Linus Torvalds 2005-04-16 816
dcfb4140328eed Trent Piepho 2007-09-06 817 if (!pci_id->driver_data) {
dcfb4140328eed Trent Piepho 2007-09-06 818 err = snd_bt87x_detect_card(pci);
dcfb4140328eed Trent Piepho 2007-09-06 819 if (err < 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 820 return -ENODEV;
dcfb4140328eed Trent Piepho 2007-09-06 821 boardid = err;
dcfb4140328eed Trent Piepho 2007-09-06 822 } else
dcfb4140328eed Trent Piepho 2007-09-06 823 boardid = pci_id->driver_data;
^1da177e4c3f41 Linus Torvalds 2005-04-16 824
^1da177e4c3f41 Linus Torvalds 2005-04-16 825 if (dev >= SNDRV_CARDS)
^1da177e4c3f41 Linus Torvalds 2005-04-16 826 return -ENODEV;
^1da177e4c3f41 Linus Torvalds 2005-04-16 827 if (!enable[dev]) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 828 ++dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 829 return -ENOENT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 830 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 831
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 832 err =
snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 833 sizeof(*chip), &card);
e58de7baf7de11 Takashi Iwai 2008-12-28 834 if (err < 0)
e58de7baf7de11 Takashi Iwai 2008-12-28 835 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 836
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 837 err = snd_bt87x_create(card, pci);
^1da177e4c3f41 Linus Torvalds 2005-04-16 838 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 839 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 840
dcfb4140328eed Trent Piepho 2007-09-06 @841 memcpy(&chip->board,
&snd_bt87x_boards[boardid], sizeof(chip->board));
dcfb4140328eed Trent Piepho 2007-09-06 842
dcfb4140328eed Trent Piepho 2007-09-06 843 if (!chip->board.no_digital) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 844 if (digital_rate[dev] > 0)
dcfb4140328eed Trent Piepho 2007-09-06 845 chip->board.dig_rate =
digital_rate[dev];
dcfb4140328eed Trent Piepho 2007-09-06 846
dcfb4140328eed Trent Piepho 2007-09-06 847 chip->reg_control |=
chip->board.digital_fmt;
^1da177e4c3f41 Linus Torvalds 2005-04-16 848
^1da177e4c3f41 Linus Torvalds 2005-04-16 849 err = snd_bt87x_pcm(chip,
DEVICE_DIGITAL, "Bt87x Digital");
^1da177e4c3f41 Linus Torvalds 2005-04-16 850 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 851 return err;
dcfb4140328eed Trent Piepho 2007-09-06 852 }
dcfb4140328eed Trent Piepho 2007-09-06 853 if (!chip->board.no_analog) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 854 err = snd_bt87x_pcm(chip,
DEVICE_ANALOG, "Bt87x Analog");
^1da177e4c3f41 Linus Torvalds 2005-04-16 855 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 856 return err;
dcfb4140328eed Trent Piepho 2007-09-06 857 err = snd_ctl_add(card,
snd_ctl_new1(
dcfb4140328eed Trent Piepho 2007-09-06 858 &snd_bt87x_capture_volume,
chip));
^1da177e4c3f41 Linus Torvalds 2005-04-16 859 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 860 return err;
dcfb4140328eed Trent Piepho 2007-09-06 861 err = snd_ctl_add(card,
snd_ctl_new1(
dcfb4140328eed Trent Piepho 2007-09-06 862 &snd_bt87x_capture_boost,
chip));
^1da177e4c3f41 Linus Torvalds 2005-04-16 863 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 864 return err;
dcfb4140328eed Trent Piepho 2007-09-06 865 err = snd_ctl_add(card,
snd_ctl_new1(
dcfb4140328eed Trent Piepho 2007-09-06 866 &snd_bt87x_capture_source,
chip));
^1da177e4c3f41 Linus Torvalds 2005-04-16 867 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 868 return err;
dcfb4140328eed Trent Piepho 2007-09-06 869 }
02c33520b35fe7 Takashi Iwai 2014-02-25 870 dev_info(card->dev, "bt87x%d:
Using board %d, %sanalog, %sdigital "
dcfb4140328eed Trent Piepho 2007-09-06 871 "(rate %d Hz)\n", dev,
boardid,
dcfb4140328eed Trent Piepho 2007-09-06 872 chip->board.no_analog ?
"no " : "",
dcfb4140328eed Trent Piepho 2007-09-06 873 chip->board.no_digital ?
"no " : "", chip->board.dig_rate);
^1da177e4c3f41 Linus Torvalds 2005-04-16 874
^1da177e4c3f41 Linus Torvalds 2005-04-16 875 strcpy(card->driver,
"Bt87x");
^1da177e4c3f41 Linus Torvalds 2005-04-16 876 sprintf(card->shortname,
"Brooktree Bt%x", pci->device);
aa0a2ddc54fa8a Greg Kroah-Hartman 2006-06-12 877 sprintf(card->longname, "%s at
%#llx, irq %i",
aa0a2ddc54fa8a Greg Kroah-Hartman 2006-06-12 878 card->shortname, (unsigned long
long)pci_resource_start(pci, 0),
aa0a2ddc54fa8a Greg Kroah-Hartman 2006-06-12 879 chip->irq);
^1da177e4c3f41 Linus Torvalds 2005-04-16 880 strcpy(card->mixername,
"Bt87x");
^1da177e4c3f41 Linus Torvalds 2005-04-16 881
^1da177e4c3f41 Linus Torvalds 2005-04-16 882 err = snd_card_register(card);
^1da177e4c3f41 Linus Torvalds 2005-04-16 883 if (err < 0)
5a2db1e1f5fcf4 Takashi Iwai 2021-07-13 884 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 885
^1da177e4c3f41 Linus Torvalds 2005-04-16 886 pci_set_drvdata(pci, card);
^1da177e4c3f41 Linus Torvalds 2005-04-16 887 ++dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 888 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 889 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 890
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org