Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vitaly Rodionov <vitalyr@opensource.cirrus.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Mark Brown <broonie@kernel.org>
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Vitaly Rodionov <vitaly.rodionov@cirrus.com>
Subject: Re: [PATCH v5 04/14] ALSA: hda: cs35l41: Add initial DSP support and firmware loading
Date: Tue, 21 Jun 2022 08:52:10 +0800	[thread overview]
Message-ID: <202206210829.FlHFxgAO-lkp@intel.com> (raw)
In-Reply-To: <20220620205432.3809-5-vitalyr@opensource.cirrus.com>

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-rc2 next-20220617]
[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/20220621-045835
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/20220621/202206210829.FlHFxgAO-lkp@intel.com/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/90a2fe69cdb8e417d88f54f2dc4f57e06041c112
        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/20220621-045835
        git checkout 90a2fe69cdb8e417d88f54f2dc4f57e06041c112
        # 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@intel.com>

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 '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     101 |                 dev_err(cs_ctl->dsp->dev, "Control %s: length %ld 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 %ld 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 %ld exceeds maximum %d\n", ctl->name,
         |                                                               ~~^
         |                                                                 |
         |                                                                 long int
         |                                                               %d


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

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

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

  reply	other threads:[~2022-06-21  0:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 20:54 [PATCH v5 00/14] ALSA: hda: cirrus: Add initial DSP support and firmware loading Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 01/14] ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 02/14] ALSA: hda: hda_cs_dsp_ctl: Add apis to write the controls directly Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 03/14] ALSA: hda: cs35l41: Save codec object inside component struct Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 04/14] ALSA: hda: cs35l41: Add initial DSP support and firmware loading Vitaly Rodionov
2022-06-21  0:52   ` kernel test robot [this message]
2022-06-20 20:54 ` [PATCH v5 05/14] ALSA: hda: cs35l41: Save Subsystem ID inside CS35L41 Driver Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 06/14] ALSA: hda: cs35l41: Support reading subsystem id from ACPI Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 07/14] ALSA: hda: cs35l41: Support multiple load paths for firmware Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 08/14] ALSA: hda: cs35l41: Support Speaker ID for laptops Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 09/14] ALSA: hda: cs35l41: Support Hibernation during Suspend Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 10/14] ALSA: hda: cs35l41: Read Speaker Calibration data from UEFI variables Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 11/14] ALSA: hda: hda_cs_dsp_ctl: Add fw id strings Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 12/14] ALSA: hda: cs35l41: Add defaulted values into dsp bypass config sequence Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 13/14] ALSA: hda: cs35l41: Support Firmware switching and reloading Vitaly Rodionov
2022-06-20 20:54 ` [PATCH v5 14/14] ALSA: hda: cs35l41: Add module parameter to control firmware load Vitaly Rodionov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206210829.FlHFxgAO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=vitaly.rodionov@cirrus.com \
    --cc=vitalyr@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox