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/rt5640.c:151 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
Date: Sat, 20 Dec 2025 01:45:45 +0800 [thread overview]
Message-ID: <202512200119.zHHDZY9m-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Cezary Rojewski <cezary.rojewski@intel.com>
CC: Mark Brown <broonie@kernel.org>
CC: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd9b004b7ff3289fb7bae35130c0a5c0537266af
commit: c95e925daa434ee1a40a86aec6476ce588e4bd77 ASoC: Intel: avs: Add rt5640 machine board
date: 6 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 6 months ago
config: x86_64-randconfig-r073-20251215 (https://download.01.org/0day-ci/archive/20251220/202512200119.zHHDZY9m-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.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/202512200119.zHHDZY9m-lkp@intel.com/
New smatch warnings:
sound/soc/intel/avs/boards/rt5640.c:151 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
Old smatch warnings:
sound/soc/intel/avs/boards/rt5640.c:158 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
vim +/devm_kasprintf +151 sound/soc/intel/avs/boards/rt5640.c
c95e925daa434e Cezary Rojewski 2025-05-30 129
c95e925daa434e Cezary Rojewski 2025-05-30 130 static int avs_create_dai_link(struct device *dev, int ssp_port, int tdm_slot,
c95e925daa434e Cezary Rojewski 2025-05-30 131 struct snd_soc_acpi_mach *mach,
c95e925daa434e Cezary Rojewski 2025-05-30 132 struct snd_soc_dai_link **dai_link)
c95e925daa434e Cezary Rojewski 2025-05-30 133 {
c95e925daa434e Cezary Rojewski 2025-05-30 134 struct snd_soc_dai_link_component *platform;
c95e925daa434e Cezary Rojewski 2025-05-30 135 struct snd_soc_dai_link *dl;
c95e925daa434e Cezary Rojewski 2025-05-30 136 u32 uid = 0;
c95e925daa434e Cezary Rojewski 2025-05-30 137 int ret;
c95e925daa434e Cezary Rojewski 2025-05-30 138
c95e925daa434e Cezary Rojewski 2025-05-30 139 if (mach->uid) {
c95e925daa434e Cezary Rojewski 2025-05-30 140 ret = kstrtou32(mach->uid, 0, &uid);
c95e925daa434e Cezary Rojewski 2025-05-30 141 if (ret)
c95e925daa434e Cezary Rojewski 2025-05-30 142 return ret;
c95e925daa434e Cezary Rojewski 2025-05-30 143 uid--; /* 0-based indexing. */
c95e925daa434e Cezary Rojewski 2025-05-30 144 }
c95e925daa434e Cezary Rojewski 2025-05-30 145
c95e925daa434e Cezary Rojewski 2025-05-30 146 dl = devm_kzalloc(dev, sizeof(*dl), GFP_KERNEL);
c95e925daa434e Cezary Rojewski 2025-05-30 147 platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL);
c95e925daa434e Cezary Rojewski 2025-05-30 148 if (!dl || !platform)
c95e925daa434e Cezary Rojewski 2025-05-30 149 return -ENOMEM;
c95e925daa434e Cezary Rojewski 2025-05-30 150
c95e925daa434e Cezary Rojewski 2025-05-30 @151 dl->name = devm_kasprintf(dev, GFP_KERNEL,
c95e925daa434e Cezary Rojewski 2025-05-30 152 AVS_STRING_FMT("SSP", "-Codec", ssp_port, tdm_slot));
c95e925daa434e Cezary Rojewski 2025-05-30 153 dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL);
c95e925daa434e Cezary Rojewski 2025-05-30 154 dl->codecs = devm_kzalloc(dev, sizeof(*dl->codecs), GFP_KERNEL);
c95e925daa434e Cezary Rojewski 2025-05-30 155 if (!dl->name || !dl->cpus || !dl->codecs)
c95e925daa434e Cezary Rojewski 2025-05-30 156 return -ENOMEM;
c95e925daa434e Cezary Rojewski 2025-05-30 157
c95e925daa434e Cezary Rojewski 2025-05-30 158 dl->cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
c95e925daa434e Cezary Rojewski 2025-05-30 159 AVS_STRING_FMT("SSP", " Pin", ssp_port, tdm_slot));
c95e925daa434e Cezary Rojewski 2025-05-30 160 dl->codecs->name = devm_kasprintf(dev, GFP_KERNEL, "i2c-10EC5640:0%d", uid);
c95e925daa434e Cezary Rojewski 2025-05-30 161 dl->codecs->dai_name = devm_kasprintf(dev, GFP_KERNEL, RT5640_CODEC_DAI);
c95e925daa434e Cezary Rojewski 2025-05-30 162 if (!dl->cpus->dai_name || !dl->codecs->name || !dl->codecs->dai_name)
c95e925daa434e Cezary Rojewski 2025-05-30 163 return -ENOMEM;
c95e925daa434e Cezary Rojewski 2025-05-30 164
c95e925daa434e Cezary Rojewski 2025-05-30 165 platform->name = dev_name(dev);
c95e925daa434e Cezary Rojewski 2025-05-30 166 dl->num_cpus = 1;
c95e925daa434e Cezary Rojewski 2025-05-30 167 dl->num_codecs = 1;
c95e925daa434e Cezary Rojewski 2025-05-30 168 dl->platforms = platform;
c95e925daa434e Cezary Rojewski 2025-05-30 169 dl->num_platforms = 1;
c95e925daa434e Cezary Rojewski 2025-05-30 170 dl->id = 0;
c95e925daa434e Cezary Rojewski 2025-05-30 171 dl->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC;
c95e925daa434e Cezary Rojewski 2025-05-30 172 dl->init = avs_rt5640_codec_init;
c95e925daa434e Cezary Rojewski 2025-05-30 173 dl->exit = avs_rt5640_codec_exit;
c95e925daa434e Cezary Rojewski 2025-05-30 174 dl->be_hw_params_fixup = avs_rt5640_be_fixup;
c95e925daa434e Cezary Rojewski 2025-05-30 175 dl->ops = &avs_rt5640_ops;
c95e925daa434e Cezary Rojewski 2025-05-30 176 dl->nonatomic = 1;
c95e925daa434e Cezary Rojewski 2025-05-30 177 dl->no_pcm = 1;
c95e925daa434e Cezary Rojewski 2025-05-30 178
c95e925daa434e Cezary Rojewski 2025-05-30 179 *dai_link = dl;
c95e925daa434e Cezary Rojewski 2025-05-30 180
c95e925daa434e Cezary Rojewski 2025-05-30 181 return 0;
c95e925daa434e Cezary Rojewski 2025-05-30 182 }
c95e925daa434e Cezary Rojewski 2025-05-30 183
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-12-19 17:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 17:45 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-15 4:44 sound/soc/intel/avs/boards/rt5640.c:151 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf' 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=202512200119.zHHDZY9m-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.