From: kernel test robot <lkp@intel.com>
To: Aaron Tomlin <atomlin@atomlin.com>, rafael@kernel.org, dakr@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, pavel@kernel.org, lenb@kernel.org,
neelx@suse.com, atomlin@atomlin.com, sean@ashe.io,
mproche@gmail.com, chjohnst@gmail.com, nick.lange@gmail.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] PM: QoS: Introduce boot parameter pm_qos_resume_latency_us
Date: Fri, 23 Jan 2026 16:31:39 +0800 [thread overview]
Message-ID: <202601231616.nbo2ijJf-lkp@intel.com> (raw)
In-Reply-To: <20260123010024.3301276-1-atomlin@atomlin.com>
Hi Aaron,
kernel test robot noticed the following build warnings:
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on driver-core/driver-core-next driver-core/driver-core-linus rafael-pm/linux-next rafael-pm/bleeding-edge linus/master amd-pstate/linux-next amd-pstate/bleeding-edge v6.19-rc6 next-20260122]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Aaron-Tomlin/PM-QoS-Introduce-boot-parameter-pm_qos_resume_latency_us/20260123-090409
base: driver-core/driver-core-testing
patch link: https://lore.kernel.org/r/20260123010024.3301276-1-atomlin%40atomlin.com
patch subject: [PATCH] PM: QoS: Introduce boot parameter pm_qos_resume_latency_us
config: x86_64-randconfig-161-20260123 (https://download.01.org/0day-ci/archive/20260123/202601231616.nbo2ijJf-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
smatch version: v0.5.0-8994-gd50c5a4c
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260123/202601231616.nbo2ijJf-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601231616.nbo2ijJf-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/power/qos.c:339:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
339 | return ret;
| ^~~
kernel/power/qos.c:266:9: note: initialize the variable 'ret' to silence this warning
266 | int ret;
| ^
| = 0
kernel/power/qos.c:354:5: error: redefinition of 'pm_qos_get_boot_cpu_latency_limit'
354 | s32 pm_qos_get_boot_cpu_latency_limit(unsigned int cpu)
| ^
include/linux/pm_qos.h:222:19: note: previous definition is here
222 | static inline s32 pm_qos_get_boot_cpu_latency_limit(unsigned int cpu)
| ^
1 warning and 1 error generated.
vim +/ret +339 kernel/power/qos.c
245
246 /* init_pm_qos_latency_us_setup - Parse the pm_qos_latency_us boot parameter.
247 *
248 * Parses the kernel command line option "pm_qos_resume_latency_us=" to establish
249 * per-CPU resume latency constraints. These constraints are applied
250 * immediately when a CPU is registered.
251 *
252 * Syntax: pm_qos_resume_latency_us=<cpu-list>:<value>[,<cpu-list>:<value>...]
253 * Example: pm_qos_resume_latency_us=0-3:0,4-7:20
254 *
255 * The parsing logic enforces a "First Match Wins" policy. If a CPU is
256 * covered by multiple entries in the list, only the first valid entry
257 * applies. Any subsequent overlapping ranges for that CPU are ignored.
258 *
259 * Return: 0 on success, or a negative error code on failure.
260 */
261 static int __init init_pm_qos_latency_us_setup(void)
262 {
263 char *token, *cmd = pm_qos_resume_latency_cmdline;
264 struct pm_qos_boot_entry *entry, *tentry;
265 cpumask_var_t covered;
266 int ret;
267
268 if (boot_option_idle_override == IDLE_POLL) {
269 pr_warn("pm_qos: Cannot be used with idle=poll\n");
270 return -EINVAL;
271 }
272
273 if (!zalloc_cpumask_var(&covered, GFP_KERNEL)) {
274 pr_warn("pm_qos: Failed to allocate memory for parsing boot parameter\n");
275 return -ENOMEM;
276 }
277
278 while ((token = strsep(&cmd, ",")) != NULL) {
279 char *str_range, *str_val;
280
281 str_range = strsep(&token, ":");
282 str_val = token;
283
284 if (!str_val) {
285 pr_warn("pm_qos: Missing value range %s\n",
286 str_range);
287 continue;
288 }
289
290 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
291 if (!entry) {
292 pr_warn("pm_qos: Failed to allocate memory for boot entry\n");
293 goto cleanup;
294 }
295
296 if (cpulist_parse(str_range, &entry->mask)) {
297 pr_warn("pm_qos: Failed to parse cpulist range %s\n",
298 str_range);
299 kfree(entry);
300 continue;
301 }
302
303 cpumask_andnot(&entry->mask, &entry->mask, covered);
304 if (cpumask_empty(&entry->mask)) {
305 pr_warn("pm_qos: Entry %s already covered, ignoring\n",
306 str_range);
307 kfree(entry);
308 continue;
309 }
310 cpumask_or(covered, covered, &entry->mask);
311
312 if (kstrtos32(str_val, 0, &entry->latency)) {
313 pr_warn("pm_qos: Invalid latency requirement value %s\n",
314 str_val);
315 kfree(entry);
316 continue;
317 }
318
319 if (entry->latency < 0) {
320 pr_warn("pm_qos: Latency requirement cannot be negative: %d\n",
321 entry->latency);
322 kfree(entry);
323 continue;
324 }
325
326 list_add_tail(&entry->node, &pm_qos_boot_list);
327 }
328
329 free_cpumask_var(covered);
330 return 0;
331
332 cleanup:
333 list_for_each_entry_safe(entry, tentry, &pm_qos_boot_list, node) {
334 list_del(&entry->node);
335 kfree(entry);
336 }
337
338 free_cpumask_var(covered);
> 339 return ret;
340 }
341 early_initcall(init_pm_qos_latency_us_setup);
342
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-01-23 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 1:00 [PATCH] PM: QoS: Introduce boot parameter pm_qos_resume_latency_us Aaron Tomlin
2026-01-23 6:20 ` kernel test robot
2026-01-23 7:47 ` kernel test robot
2026-01-23 8:31 ` kernel test robot [this message]
2026-01-23 9:25 ` kernel test robot
2026-01-23 9:40 ` kernel test robot
2026-01-23 10:07 ` 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=202601231616.nbo2ijJf-lkp@intel.com \
--to=lkp@intel.com \
--cc=atomlin@atomlin.com \
--cc=chjohnst@gmail.com \
--cc=dakr@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mproche@gmail.com \
--cc=neelx@suse.com \
--cc=nick.lange@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=sean@ashe.io \
/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.