* [linux-next:master 757/12680] sound/soc/intel/avs/boards/rt5640.c:151 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
@ 2025-07-28 10:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-28 10:03 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
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/next/linux-next.git master
head: 0b90c3b6d76ea512dc3dac8fb30215e175b0019a
commit: c95e925daa434ee1a40a86aec6476ce588e4bd77 [757/12680] ASoC: Intel: avs: Add rt5640 machine board
:::::: branch date: 4 hours ago
:::::: commit date: 7 weeks ago
config: powerpc-randconfig-r073-20250728 (https://download.01.org/0day-ci/archive/20250728/202507281707.XMC5a55P-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.5.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/202507281707.XMC5a55P-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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-28 10:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-28 10:03 [linux-next:master 757/12680] sound/soc/intel/avs/boards/rt5640.c:151 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf' kernel test robot
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.