Re: [PATCH v6 04/14] ALSA: hda: cs35l41: Add initial DSP support and firmware loading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vitaly,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tiwai-sound/for-next]
[also build test WARNING on linus/master v5.19-rc3 next-20220621]
[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/intel-lab-lkp/linux/commits/Vitaly-Rodionov/ALSA-hda-cirrus-Add-initial-DSP-support-and-firmware-loading/20220622-054218
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220622/202206221009.dFR3qUz0-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/9a9e48e89004a7f0c7f21aae4dc45d34469cc789
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Vitaly-Rodionov/ALSA-hda-cirrus-Add-initial-DSP-support-and-firmware-loading/20220622-054218
        git checkout 9a9e48e89004a7f0c7f21aae4dc45d34469cc789
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/pci/hda/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/platform_device.h:13,
                    from include/sound/soc.h:14,
                    from sound/pci/hda/hda_cs_dsp_ctl.c:10:
   sound/pci/hda/hda_cs_dsp_ctl.c: In function 'hda_cs_dsp_add_kcontrol':
>> sound/pci/hda/hda_cs_dsp_ctl.c:101:43: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     101 |                 dev_err(cs_ctl->dsp->dev, "Control %s: length %lu exceeds maximum %d\n", ctl->name,
         |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   sound/pci/hda/hda_cs_dsp_ctl.c:101:17: note: in expansion of macro 'dev_err'
     101 |                 dev_err(cs_ctl->dsp->dev, "Control %s: length %lu exceeds maximum %d\n", ctl->name,
         |                 ^~~~~~~
   sound/pci/hda/hda_cs_dsp_ctl.c:101:65: note: format string is defined here
     101 |                 dev_err(cs_ctl->dsp->dev, "Control %s: length %lu exceeds maximum %d\n", ctl->name,
         |                                                               ~~^
         |                                                                 |
         |                                                                 long unsigned int
         |                                                               %u


vim +101 sound/pci/hda/hda_cs_dsp_ctl.c

5c0e0c1e30c723 Stefan Binding 2022-06-21   92  
5c0e0c1e30c723 Stefan Binding 2022-06-21   93  static int hda_cs_dsp_add_kcontrol(struct hda_cs_dsp_coeff_ctl *ctl)
5c0e0c1e30c723 Stefan Binding 2022-06-21   94  {
5c0e0c1e30c723 Stefan Binding 2022-06-21   95  	struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl;
5c0e0c1e30c723 Stefan Binding 2022-06-21   96  	struct snd_kcontrol_new *kcontrol;
5c0e0c1e30c723 Stefan Binding 2022-06-21   97  	struct snd_kcontrol *kctl;
5c0e0c1e30c723 Stefan Binding 2022-06-21   98  	int ret = 0;
5c0e0c1e30c723 Stefan Binding 2022-06-21   99  
5c0e0c1e30c723 Stefan Binding 2022-06-21  100  	if (cs_ctl->len > ADSP_MAX_STD_CTRL_SIZE) {
5c0e0c1e30c723 Stefan Binding 2022-06-21 @101  		dev_err(cs_ctl->dsp->dev, "Control %s: length %lu exceeds maximum %d\n", ctl->name,
5c0e0c1e30c723 Stefan Binding 2022-06-21  102  			cs_ctl->len, ADSP_MAX_STD_CTRL_SIZE);
5c0e0c1e30c723 Stefan Binding 2022-06-21  103  		return -EINVAL;
5c0e0c1e30c723 Stefan Binding 2022-06-21  104  	}
5c0e0c1e30c723 Stefan Binding 2022-06-21  105  
5c0e0c1e30c723 Stefan Binding 2022-06-21  106  	kcontrol = kzalloc(sizeof(*kcontrol), GFP_KERNEL);
5c0e0c1e30c723 Stefan Binding 2022-06-21  107  	if (!kcontrol)
5c0e0c1e30c723 Stefan Binding 2022-06-21  108  		return -ENOMEM;
5c0e0c1e30c723 Stefan Binding 2022-06-21  109  
5c0e0c1e30c723 Stefan Binding 2022-06-21  110  	kcontrol->name = ctl->name;
5c0e0c1e30c723 Stefan Binding 2022-06-21  111  	kcontrol->info = hda_cs_dsp_coeff_info;
5c0e0c1e30c723 Stefan Binding 2022-06-21  112  	kcontrol->iface = SNDRV_CTL_ELEM_IFACE_MIXER;
5c0e0c1e30c723 Stefan Binding 2022-06-21  113  	kcontrol->private_value = (unsigned long)ctl;
5c0e0c1e30c723 Stefan Binding 2022-06-21  114  	kcontrol->access = wmfw_convert_flags(cs_ctl->flags);
5c0e0c1e30c723 Stefan Binding 2022-06-21  115  
5c0e0c1e30c723 Stefan Binding 2022-06-21  116  	kcontrol->get = hda_cs_dsp_coeff_get;
5c0e0c1e30c723 Stefan Binding 2022-06-21  117  	kcontrol->put = hda_cs_dsp_coeff_put;
5c0e0c1e30c723 Stefan Binding 2022-06-21  118  
5c0e0c1e30c723 Stefan Binding 2022-06-21  119  	kctl = snd_ctl_new1(kcontrol, NULL);
5c0e0c1e30c723 Stefan Binding 2022-06-21  120  	if (!kctl) {
5c0e0c1e30c723 Stefan Binding 2022-06-21  121  		ret = -ENOMEM;
5c0e0c1e30c723 Stefan Binding 2022-06-21  122  		goto err;
5c0e0c1e30c723 Stefan Binding 2022-06-21  123  	}
5c0e0c1e30c723 Stefan Binding 2022-06-21  124  	ctl->kctl = kctl;
5c0e0c1e30c723 Stefan Binding 2022-06-21  125  
5c0e0c1e30c723 Stefan Binding 2022-06-21  126  	ret = snd_ctl_add(ctl->card, kctl);
5c0e0c1e30c723 Stefan Binding 2022-06-21  127  	if (ret)
5c0e0c1e30c723 Stefan Binding 2022-06-21  128  		dev_err(cs_ctl->dsp->dev, "Failed to add KControl: %s - Ret: %d\n", kcontrol->name,
5c0e0c1e30c723 Stefan Binding 2022-06-21  129  			ret);
5c0e0c1e30c723 Stefan Binding 2022-06-21  130  	else
5c0e0c1e30c723 Stefan Binding 2022-06-21  131  		dev_dbg(cs_ctl->dsp->dev, "Added KControl: %s\n", kcontrol->name);
5c0e0c1e30c723 Stefan Binding 2022-06-21  132  
5c0e0c1e30c723 Stefan Binding 2022-06-21  133  err:
5c0e0c1e30c723 Stefan Binding 2022-06-21  134  	kfree(kcontrol);
5c0e0c1e30c723 Stefan Binding 2022-06-21  135  
5c0e0c1e30c723 Stefan Binding 2022-06-21  136  	return ret;
5c0e0c1e30c723 Stefan Binding 2022-06-21  137  }
5c0e0c1e30c723 Stefan Binding 2022-06-21  138  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux