All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: sound/soc/intel/avs/boards/rt5682.c:219 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
Date: Thu, 24 Oct 2024 02:50:30 +0800	[thread overview]
Message-ID: <202410240230.Zlkr83mc-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c2ee9f594da826bea183ed14f2cc029c719bf4da
commit: 2172c5b90d80aedc7cbe571e353ae45040e03a3b ASoC: Intel: avs: rt5682: Validate machine board configuration
date:   1 year ago
:::::: branch date: 2 days ago
:::::: commit date: 1 year ago
config: sparc64-randconfig-r073-20241023 (https://download.01.org/0day-ci/archive/20241024/202410240230.Zlkr83mc-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.1.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410240230.Zlkr83mc-lkp@intel.com/

New smatch warnings:
sound/soc/intel/avs/boards/rt5682.c:219 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'

Old smatch warnings:
sound/soc/intel/avs/boards/rt5682.c:226 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'

vim +/devm_kasprintf +219 sound/soc/intel/avs/boards/rt5682.c

d24dbc865c2bd5 Amadeusz Sławiński 2023-03-03  205  
748102786b3ce0 Cezary Rojewski    2022-05-11  206  static int avs_create_dai_link(struct device *dev, const char *platform_name, int ssp_port,
2172c5b90d80ae Amadeusz Sławiński 2023-10-12  207  			       int tdm_slot, struct snd_soc_dai_link **dai_link)
748102786b3ce0 Cezary Rojewski    2022-05-11  208  {
748102786b3ce0 Cezary Rojewski    2022-05-11  209  	struct snd_soc_dai_link_component *platform;
748102786b3ce0 Cezary Rojewski    2022-05-11  210  	struct snd_soc_dai_link *dl;
748102786b3ce0 Cezary Rojewski    2022-05-11  211  
748102786b3ce0 Cezary Rojewski    2022-05-11  212  	dl = devm_kzalloc(dev, sizeof(*dl), GFP_KERNEL);
748102786b3ce0 Cezary Rojewski    2022-05-11  213  	platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL);
748102786b3ce0 Cezary Rojewski    2022-05-11  214  	if (!dl || !platform)
748102786b3ce0 Cezary Rojewski    2022-05-11  215  		return -ENOMEM;
748102786b3ce0 Cezary Rojewski    2022-05-11  216  
748102786b3ce0 Cezary Rojewski    2022-05-11  217  	platform->name = platform_name;
748102786b3ce0 Cezary Rojewski    2022-05-11  218  
2172c5b90d80ae Amadeusz Sławiński 2023-10-12 @219  	dl->name = devm_kasprintf(dev, GFP_KERNEL,
2172c5b90d80ae Amadeusz Sławiński 2023-10-12  220  				  AVS_STRING_FMT("SSP", "-Codec", ssp_port, tdm_slot));
748102786b3ce0 Cezary Rojewski    2022-05-11  221  	dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL);
748102786b3ce0 Cezary Rojewski    2022-05-11  222  	dl->codecs = devm_kzalloc(dev, sizeof(*dl->codecs), GFP_KERNEL);
748102786b3ce0 Cezary Rojewski    2022-05-11  223  	if (!dl->name || !dl->cpus || !dl->codecs)
748102786b3ce0 Cezary Rojewski    2022-05-11  224  		return -ENOMEM;
748102786b3ce0 Cezary Rojewski    2022-05-11  225  
2172c5b90d80ae Amadeusz Sławiński 2023-10-12  226  	dl->cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
2172c5b90d80ae Amadeusz Sławiński 2023-10-12  227  					    AVS_STRING_FMT("SSP", " Pin", ssp_port, tdm_slot));
748102786b3ce0 Cezary Rojewski    2022-05-11  228  	dl->codecs->name = devm_kasprintf(dev, GFP_KERNEL, "i2c-10EC5682:00");
19bb7c3053ee54 Amadeusz Sławiński 2022-11-29  229  	dl->codecs->dai_name = devm_kasprintf(dev, GFP_KERNEL, AVS_RT5682_CODEC_DAI_NAME);
748102786b3ce0 Cezary Rojewski    2022-05-11  230  	if (!dl->cpus->dai_name || !dl->codecs->name || !dl->codecs->dai_name)
748102786b3ce0 Cezary Rojewski    2022-05-11  231  		return -ENOMEM;
748102786b3ce0 Cezary Rojewski    2022-05-11  232  
748102786b3ce0 Cezary Rojewski    2022-05-11  233  	dl->num_cpus = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  234  	dl->num_codecs = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  235  	dl->platforms = platform;
748102786b3ce0 Cezary Rojewski    2022-05-11  236  	dl->num_platforms = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  237  	dl->id = 0;
27cd41698de49c Cezary Rojewski    2023-06-29  238  	dl->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC;
748102786b3ce0 Cezary Rojewski    2022-05-11  239  	dl->init = avs_rt5682_codec_init;
a9d8723c72eada Amadeusz Sławiński 2022-11-29  240  	dl->exit = avs_rt5682_codec_exit;
d24dbc865c2bd5 Amadeusz Sławiński 2023-03-03  241  	dl->be_hw_params_fixup = avs_rt5682_be_fixup;
748102786b3ce0 Cezary Rojewski    2022-05-11  242  	dl->ops = &avs_rt5682_ops;
748102786b3ce0 Cezary Rojewski    2022-05-11  243  	dl->nonatomic = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  244  	dl->no_pcm = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  245  	dl->dpcm_capture = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  246  	dl->dpcm_playback = 1;
748102786b3ce0 Cezary Rojewski    2022-05-11  247  
748102786b3ce0 Cezary Rojewski    2022-05-11  248  	*dai_link = dl;
748102786b3ce0 Cezary Rojewski    2022-05-11  249  
748102786b3ce0 Cezary Rojewski    2022-05-11  250  	return 0;
748102786b3ce0 Cezary Rojewski    2022-05-11  251  }
748102786b3ce0 Cezary Rojewski    2022-05-11  252  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2024-10-23 18:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 18:50 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-25  3:51 sound/soc/intel/avs/boards/rt5682.c:219 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf' kernel test robot
2023-12-10  8:35 kernel test robot
2023-11-29 10:16 kernel test robot

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=202410240230.Zlkr83mc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.