* [rafael-pm:fixes 3/5] drivers/powercap/intel_rapl_common.c:357:50-54: opportunity for str_enabled_disabled(mode)
@ 2025-06-28 23:39 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-28 23:39 UTC (permalink / raw)
To: Zhang Rui; +Cc: oe-kbuild-all, linux-acpi, devel, linux-pm, Rafael J. Wysocki
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git fixes
head: e962f723d1420ff8ac720a80fa2b65abc7ece1ff
commit: 3b2cebf28cac6dc375be5be675dd767b400cd294 [3/5] powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed
config: x86_64-randconfig-104-20250629 (https://download.01.org/0day-ci/archive/20250629/202506290745.i7nfrR7D-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
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/202506290745.i7nfrR7D-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/powercap/intel_rapl_common.c:357:50-54: opportunity for str_enabled_disabled(mode)
vim +357 drivers/powercap/intel_rapl_common.c
339
340 static int set_domain_enable(struct powercap_zone *power_zone, bool mode)
341 {
342 struct rapl_domain *rd = power_zone_to_rapl_domain(power_zone);
343 struct rapl_defaults *defaults = get_defaults(rd->rp);
344 u64 val;
345 int ret;
346
347 cpus_read_lock();
348 ret = rapl_write_pl_data(rd, POWER_LIMIT1, PL_ENABLE, mode);
349 if (ret)
350 goto end;
351
352 ret = rapl_read_pl_data(rd, POWER_LIMIT1, PL_ENABLE, false, &val);
353 if (ret)
354 goto end;
355
356 if (mode != val) {
> 357 pr_debug("%s cannot be %s\n", power_zone->name, mode ? "enabled" : "disabled");
358 goto end;
359 }
360
361 if (defaults->set_floor_freq)
362 defaults->set_floor_freq(rd, mode);
363
364 end:
365 cpus_read_unlock();
366
367 return ret;
368 }
369
--
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-06-28 23:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28 23:39 [rafael-pm:fixes 3/5] drivers/powercap/intel_rapl_common.c:357:50-54: opportunity for str_enabled_disabled(mode) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox