From: kernel test robot <lkp@intel.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
devel@acpica.org, linux-pm@vger.kernel.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: [rafael-pm:fixes 3/5] drivers/powercap/intel_rapl_common.c:357:50-54: opportunity for str_enabled_disabled(mode)
Date: Sun, 29 Jun 2025 07:39:53 +0800 [thread overview]
Message-ID: <202506290745.i7nfrR7D-lkp@intel.com> (raw)
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
reply other threads:[~2025-06-28 23:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202506290745.i7nfrR7D-lkp@intel.com \
--to=lkp@intel.com \
--cc=devel@acpica.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox