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/max98373.c:111 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
Date: Sun, 17 Nov 2024 12:21:58 +0800 [thread overview]
Message-ID: <202411171235.z1crtO2m-lkp@intel.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 5845 bytes --]
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: 4a5df37964673effcd9f84041f7423206a5ae5f2
commit: a1ec836b17f7dea35f6b4b3a7c2ad4306da804c9 ASoC: Intel: avs: max98373: Validate machine board configuration
date: 1 year, 1 month ago
:::::: branch date: 4 hours ago
:::::: commit date: 1 year, 1 month ago
config: i386-randconfig-141-20241115 (https://download.01.org/0day-ci/archive/20241117/202411171235.z1crtO2m-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
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/202411171235.z1crtO2m-lkp@intel.com/
New smatch warnings:
sound/soc/intel/avs/boards/max98373.c:111 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
Old smatch warnings:
sound/soc/intel/avs/boards/max98373.c:118 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf'
vim +/devm_kasprintf +111 sound/soc/intel/avs/boards/max98373.c
223a0a945821b9 Amadeusz Sławiński 2022-05-11 97
223a0a945821b9 Amadeusz Sławiński 2022-05-11 98 static int avs_create_dai_link(struct device *dev, const char *platform_name, int ssp_port,
a1ec836b17f7de Amadeusz Sławiński 2023-10-12 99 int tdm_slot, struct snd_soc_dai_link **dai_link)
223a0a945821b9 Amadeusz Sławiński 2022-05-11 100 {
223a0a945821b9 Amadeusz Sławiński 2022-05-11 101 struct snd_soc_dai_link_component *platform;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 102 struct snd_soc_dai_link *dl;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 103
223a0a945821b9 Amadeusz Sławiński 2022-05-11 104 dl = devm_kzalloc(dev, sizeof(*dl), GFP_KERNEL);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 105 platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 106 if (!dl || !platform)
223a0a945821b9 Amadeusz Sławiński 2022-05-11 107 return -ENOMEM;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 108
223a0a945821b9 Amadeusz Sławiński 2022-05-11 109 platform->name = platform_name;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 110
a1ec836b17f7de Amadeusz Sławiński 2023-10-12 @111 dl->name = devm_kasprintf(dev, GFP_KERNEL,
a1ec836b17f7de Amadeusz Sławiński 2023-10-12 112 AVS_STRING_FMT("SSP", "-Codec", ssp_port, tdm_slot));
223a0a945821b9 Amadeusz Sławiński 2022-05-11 113 dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 114 dl->codecs = devm_kzalloc(dev, sizeof(*dl->codecs) * 2, GFP_KERNEL);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 115 if (!dl->name || !dl->cpus || !dl->codecs)
223a0a945821b9 Amadeusz Sławiński 2022-05-11 116 return -ENOMEM;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 117
a1ec836b17f7de Amadeusz Sławiński 2023-10-12 118 dl->cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
a1ec836b17f7de Amadeusz Sławiński 2023-10-12 119 AVS_STRING_FMT("SSP", " Pin", ssp_port, tdm_slot));
223a0a945821b9 Amadeusz Sławiński 2022-05-11 120 dl->codecs[0].name = devm_kasprintf(dev, GFP_KERNEL, MAX98373_DEV0_NAME);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 121 dl->codecs[0].dai_name = devm_kasprintf(dev, GFP_KERNEL, MAX98373_CODEC_NAME);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 122 dl->codecs[1].name = devm_kasprintf(dev, GFP_KERNEL, MAX98373_DEV1_NAME);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 123 dl->codecs[1].dai_name = devm_kasprintf(dev, GFP_KERNEL, MAX98373_CODEC_NAME);
223a0a945821b9 Amadeusz Sławiński 2022-05-11 124 if (!dl->cpus->dai_name || !dl->codecs[0].name || !dl->codecs[0].dai_name ||
223a0a945821b9 Amadeusz Sławiński 2022-05-11 125 !dl->codecs[1].name || !dl->codecs[1].dai_name)
223a0a945821b9 Amadeusz Sławiński 2022-05-11 126 return -ENOMEM;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 127
223a0a945821b9 Amadeusz Sławiński 2022-05-11 128 dl->num_cpus = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 129 dl->num_codecs = 2;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 130 dl->platforms = platform;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 131 dl->num_platforms = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 132 dl->id = 0;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 133 dl->dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 134 dl->be_hw_params_fixup = avs_max98373_be_fixup;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 135 dl->nonatomic = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 136 dl->no_pcm = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 137 dl->dpcm_capture = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 138 dl->dpcm_playback = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 139 dl->ignore_pmdown_time = 1;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 140 dl->ops = &avs_max98373_ops;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 141
223a0a945821b9 Amadeusz Sławiński 2022-05-11 142 *dai_link = dl;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 143
223a0a945821b9 Amadeusz Sławiński 2022-05-11 144 return 0;
223a0a945821b9 Amadeusz Sławiński 2022-05-11 145 }
223a0a945821b9 Amadeusz Sławiński 2022-05-11 146
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-11-17 4:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 4:21 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-10 12:29 sound/soc/intel/avs/boards/max98373.c:111 avs_create_dai_link() warn: excess argument passed to 'devm_kasprintf' kernel test robot
2023-11-29 12:01 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=202411171235.z1crtO2m-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.