From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Huisong Li <lihuisong@huawei.com>,
rafael@kernel.org, lenb@kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Sudeep.Holla@arm.com, linuxarm@huawei.com,
jonathan.cameron@huawei.com, zhanjie9@hisilicon.com,
zhenglifeng1@huawei.com, yubowen8@huawei.com,
lihuisong@huawei.com
Subject: Re: [PATCH 3/3] ACPI: processor: idle: Update idle states from avaiable power information
Date: Thu, 27 Nov 2025 21:09:54 +0300 [thread overview]
Message-ID: <202511272353.nOqEau6n-lkp@intel.com> (raw)
In-Reply-To: <20251125072933.3706006-4-lihuisong@huawei.com>
Hi Huisong,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Huisong-Li/cpuidle-Add-enable_cpuidle-interface/20251125-153615
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20251125072933.3706006-4-lihuisong%40huawei.com
patch subject: [PATCH 3/3] ACPI: processor: idle: Update idle states from avaiable power information
config: i386-randconfig-141-20251126 (https://download.01.org/0day-ci/archive/20251127/202511272353.nOqEau6n-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.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 <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202511272353.nOqEau6n-lkp@intel.com/
smatch warnings:
drivers/acpi/processor_idle.c:1339 acpi_processor_power_state_has_changed() error: we previously assumed '_pr' could be null (see line 1339)
vim +/_pr +1339 drivers/acpi/processor_idle.c
a36a7fecfe6071 Sudeep Holla 2016-07-21 1294 int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1295 {
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1296 int cpu;
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1297 struct acpi_processor *_pr;
3d339dcbb56d8d Daniel Lezcano 2012-09-17 1298 struct cpuidle_device *dev;
ffff9603ddf90a Huisong Li 2025-11-25 1299 int ret = 0;
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1300
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1301 if (disabled_by_idle_boot_param())
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1302 return 0;
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1303
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1304 if (!pr->flags.power_setup_done)
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1305 return -ENODEV;
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1306
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1307 /*
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1308 * FIXME: Design the ACPI notification to make it once per
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1309 * system instead of once per-cpu. This condition is a hack
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1310 * to make the code that updates C-States be called once.
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1311 */
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1312
9505626d7bfeb5 Paul E. McKenney 2012-02-28 1313 if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1314
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1315 /* Protect against cpu-hotplug */
95ac706744de78 Sebastian Andrzej Siewior 2021-08-03 1316 cpus_read_lock();
6726655dfdd2dc Jiri Kosina 2014-09-03 1317 cpuidle_pause_and_lock();
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1318
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1319 /* Disable all cpuidle devices */
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1320 for_each_online_cpu(cpu) {
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1321 _pr = per_cpu(processors, cpu);
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1322 if (!_pr || !_pr->flags.power_setup_done)
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1323 continue;
3d339dcbb56d8d Daniel Lezcano 2012-09-17 1324 dev = per_cpu(acpi_cpuidle_device, cpu);
3d339dcbb56d8d Daniel Lezcano 2012-09-17 1325 cpuidle_disable_device(dev);
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1326 }
46bcfad7a819bd Deepthi Dharwar 2011-10-28 1327
ffff9603ddf90a Huisong Li 2025-11-25 1328 /*
ffff9603ddf90a Huisong Li 2025-11-25 1329 * Update C-state information based on new power information.
ffff9603ddf90a Huisong Li 2025-11-25 1330 *
ffff9603ddf90a Huisong Li 2025-11-25 1331 * The same idle state is used for all CPUs.
ffff9603ddf90a Huisong Li 2025-11-25 1332 * The old idle state may not be usable anymore if fail to get
092a52b5417fd4 Huisong Li 2025-11-25 1333 * available ACPI power information from any online CPU.
ffff9603ddf90a Huisong Li 2025-11-25 1334 * The cpuidle of all CPUs should be disabled.
ffff9603ddf90a Huisong Li 2025-11-25 1335 */
092a52b5417fd4 Huisong Li 2025-11-25 1336 ret = -ENODEV;
092a52b5417fd4 Huisong Li 2025-11-25 1337 for_each_online_cpu(cpu) {
092a52b5417fd4 Huisong Li 2025-11-25 1338 _pr = per_cpu(processors, cpu);
092a52b5417fd4 Huisong Li 2025-11-25 @1339 if (!_pr && !_pr->flags.power_setup_done)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if _pr is NULL this will crash. s/&&/||/
092a52b5417fd4 Huisong Li 2025-11-25 1340 continue;
092a52b5417fd4 Huisong Li 2025-11-25 1341 ret = acpi_processor_get_power_info(_pr);
092a52b5417fd4 Huisong Li 2025-11-25 1342 if (!ret) {
092a52b5417fd4 Huisong Li 2025-11-25 1343 acpi_processor_setup_cpuidle_states(_pr);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-11-27 18:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 7:29 [PATCH 0/3] ACPI: processor: idle: Fix ACPI idle handling in power notify on failure Huisong Li
2025-11-25 7:29 ` [PATCH 1/3] cpuidle: Add enable_cpuidle() interface Huisong Li
2026-01-14 19:18 ` Rafael J. Wysocki
2026-01-15 12:18 ` lihuisong (C)
2026-01-30 1:59 ` lihuisong (C)
2026-03-26 12:17 ` lihuisong (C)
2026-03-26 13:39 ` Rafael J. Wysocki
2026-03-27 6:23 ` lihuisong (C)
2026-03-27 11:33 ` Rafael J. Wysocki
2026-03-28 4:06 ` lihuisong (C)
2026-03-31 12:01 ` lihuisong (C)
2026-03-31 12:05 ` Rafael J. Wysocki
2026-03-31 12:10 ` Rafael J. Wysocki
2026-03-31 12:48 ` lihuisong (C)
2026-03-31 13:00 ` Rafael J. Wysocki
2025-11-25 7:29 ` [PATCH 2/3] ACPI: processor: idle: Disable ACPI idle if get power information failed in power notify Huisong Li
2025-11-27 15:10 ` kernel test robot
2025-11-25 7:29 ` [PATCH 3/3] ACPI: processor: idle: Update idle states from avaiable power information Huisong Li
2025-11-27 18:09 ` Dan Carpenter [this message]
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=202511272353.nOqEau6n-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=Sudeep.Holla@arm.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=yubowen8@huawei.com \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.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
all inboxes | Powered by JetHome®