From: kernel test robot <lkp@intel.com>
To: Faruque Ansari <faruque.ansari@oss.qualcomm.com>,
Sebastian Reichel <sre@kernel.org>,
Benson Leung <bleung@chromium.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
Guenter Roeck <groeck@chromium.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Matti Vaittinen <mazziesaccount@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev,
avaneesh.dwivedi@oss.qualcomm.com,
Umang Chheda <umang.chheda@oss.qualcomm.com>,
Ulf Hansson <ulfh@kernel.org>,
Faruque Ansari <faruque.ansari@oss.qualcomm.com>,
Bradley Morgan <brads@mainlining.org>
Subject: Re: [PATCH v16 2/6] reboot: hw_protection_trigger: use standardized numeric shutdown/reboot reasons instead of strings
Date: Tue, 13 Oct 2026 03:22:27 +0800 [thread overview]
Message-ID: <202610130349.c7FTyYw4-lkp@intel.com> (raw)
In-Reply-To: <20261007-pscrr-framework-v16-2-3642c277bebb@oss.qualcomm.com>
Hi Faruque,
kernel test robot noticed the following build errors:
[auto build test ERROR on 5c4d4169604b335c38bbc79bc1fc03042981fc6f]
url: https://github.com/intel-lab-lkp/linux/commits/Faruque-Ansari/power-Extend-power_on_reason-h-for-upcoming-PSCRR-framework/20261007-123636
base: 5c4d4169604b335c38bbc79bc1fc03042981fc6f
patch link: https://lore.kernel.org/r/20261007-pscrr-framework-v16-2-3642c277bebb%40oss.qualcomm.com
patch subject: [PATCH v16 2/6] reboot: hw_protection_trigger: use standardized numeric shutdown/reboot reasons instead of strings
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20261013/202610130349.c7FTyYw4-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261013/202610130349.c7FTyYw4-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/202610130349.c7FTyYw4-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/power/supply/macsmc-power.c:587:25: error: incompatible pointer to integer conversion passing 'char[37]' to parameter of type 'enum psc_reason' [-Wint-conversion]
587 | hw_protection_trigger("Battery voltage below design minimum", 1500);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reboot.h:276:58: note: passing argument to parameter 'reason' here
276 | static inline void hw_protection_trigger(enum psc_reason reason,
| ^
1 error generated.
vim +587 drivers/power/supply/macsmc-power.c
0ebf821cf6c75de Hector Martin 2026-02-17 554
0ebf821cf6c75de Hector Martin 2026-02-17 555 static void macsmc_power_critical_work(struct work_struct *wrk)
0ebf821cf6c75de Hector Martin 2026-02-17 556 {
0ebf821cf6c75de Hector Martin 2026-02-17 557 struct macsmc_power *power = container_of(wrk, struct macsmc_power, critical_work);
0ebf821cf6c75de Hector Martin 2026-02-17 558 u16 bitv, b0av;
0ebf821cf6c75de Hector Martin 2026-02-17 559 u32 bcf0;
0ebf821cf6c75de Hector Martin 2026-02-17 560
0ebf821cf6c75de Hector Martin 2026-02-17 561 if (!power->batt)
0ebf821cf6c75de Hector Martin 2026-02-17 562 return;
0ebf821cf6c75de Hector Martin 2026-02-17 563
0ebf821cf6c75de Hector Martin 2026-02-17 564 /*
0ebf821cf6c75de Hector Martin 2026-02-17 565 * Avoid duplicate atempts at emergency shutdown
0ebf821cf6c75de Hector Martin 2026-02-17 566 */
0ebf821cf6c75de Hector Martin 2026-02-17 567 if (power->emergency_shutdown_triggered || system_state > SYSTEM_RUNNING)
0ebf821cf6c75de Hector Martin 2026-02-17 568 return;
0ebf821cf6c75de Hector Martin 2026-02-17 569
0ebf821cf6c75de Hector Martin 2026-02-17 570 /*
0ebf821cf6c75de Hector Martin 2026-02-17 571 * EMERGENCY: Check voltage vs design minimum.
0ebf821cf6c75de Hector Martin 2026-02-17 572 * If we are below BITV, the battery is physically exhausted.
0ebf821cf6c75de Hector Martin 2026-02-17 573 * We must shut down NOW to protect the filesystem.
0ebf821cf6c75de Hector Martin 2026-02-17 574 */
0ebf821cf6c75de Hector Martin 2026-02-17 575 if (apple_smc_read_u16(power->smc, SMC_KEY(BITV), &bitv) >= 0 &&
0ebf821cf6c75de Hector Martin 2026-02-17 576 apple_smc_read_u16(power->smc, SMC_KEY(B0AV), &b0av) >= 0 &&
0ebf821cf6c75de Hector Martin 2026-02-17 577 b0av < bitv) {
0ebf821cf6c75de Hector Martin 2026-02-17 578 power->emergency_shutdown_triggered = true;
0ebf821cf6c75de Hector Martin 2026-02-17 579 dev_emerg(power->dev,
0ebf821cf6c75de Hector Martin 2026-02-17 580 "Battery voltage (%d mV) below design minimum (%d mV)! Emergency shutdown.\n",
0ebf821cf6c75de Hector Martin 2026-02-17 581 b0av, bitv);
0ebf821cf6c75de Hector Martin 2026-02-17 582
0ebf821cf6c75de Hector Martin 2026-02-17 583 /*
0ebf821cf6c75de Hector Martin 2026-02-17 584 * Shutdown is now imminent. Kick userspace again and give it some
0ebf821cf6c75de Hector Martin 2026-02-17 585 * brief time to (hopefully) flush what's needed, before forcing.
0ebf821cf6c75de Hector Martin 2026-02-17 586 */
0ebf821cf6c75de Hector Martin 2026-02-17 @587 hw_protection_trigger("Battery voltage below design minimum", 1500);
0ebf821cf6c75de Hector Martin 2026-02-17 588 }
0ebf821cf6c75de Hector Martin 2026-02-17 589
0ebf821cf6c75de Hector Martin 2026-02-17 590 /*
0ebf821cf6c75de Hector Martin 2026-02-17 591 * Avoid duplicate attempts at orderly shutdown.
0ebf821cf6c75de Hector Martin 2026-02-17 592 * Voltage check is above this as we may want to
0ebf821cf6c75de Hector Martin 2026-02-17 593 * "upgrade" an orderly shutdown to a critical power
0ebf821cf6c75de Hector Martin 2026-02-17 594 * off if voltage drops.
0ebf821cf6c75de Hector Martin 2026-02-17 595 */
0ebf821cf6c75de Hector Martin 2026-02-17 596 if (power->orderly_shutdown_triggered || system_state > SYSTEM_RUNNING)
0ebf821cf6c75de Hector Martin 2026-02-17 597 return;
0ebf821cf6c75de Hector Martin 2026-02-17 598
0ebf821cf6c75de Hector Martin 2026-02-17 599 /*
0ebf821cf6c75de Hector Martin 2026-02-17 600 * Check if SMC flagged the battery as empty.
0ebf821cf6c75de Hector Martin 2026-02-17 601 * We trigger a graceful shutdown to let the OS save data.
0ebf821cf6c75de Hector Martin 2026-02-17 602 */
f7b253a6e217f71 Sasha Finkelstein 2026-07-12 603 if (macsmc_battery_read_bcf0(power, &bcf0) == 0 && bcf0 != 0) {
0ebf821cf6c75de Hector Martin 2026-02-17 604 power->orderly_shutdown_triggered = true;
0ebf821cf6c75de Hector Martin 2026-02-17 605 dev_crit(power->dev, "Battery critical (empty flag set). Triggering orderly shutdown.\n");
0ebf821cf6c75de Hector Martin 2026-02-17 606 orderly_poweroff(true);
0ebf821cf6c75de Hector Martin 2026-02-17 607 }
0ebf821cf6c75de Hector Martin 2026-02-17 608 }
0ebf821cf6c75de Hector Martin 2026-02-17 609
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-10-12 19:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 7:06 [PATCH v16 0/6] power: reset: Introduce the Power State Change Reasons Recording (PSCRR) framework Faruque Ansari
2026-10-07 7:06 ` [PATCH v16 1/6] power: Extend power_on_reason.h for upcoming PSCRR framework Faruque Ansari
2026-10-07 7:06 ` [PATCH v16 2/6] reboot: hw_protection_trigger: use standardized numeric shutdown/reboot reasons instead of strings Faruque Ansari
2026-10-12 19:22 ` kernel test robot [this message]
2026-10-12 19:55 ` kernel test robot
2026-10-07 7:06 ` [PATCH v16 3/6] reboot: add parsable tokens for power state change reasons Faruque Ansari
2026-10-07 7:06 ` [PATCH v16 4/6] reboot: extend psc_reason with power-on and reset causes Faruque Ansari
2026-10-07 7:06 ` [PATCH v16 5/6] power: reset: Introduce PSCR Recording Framework for Non-Volatile Storage Faruque Ansari
2026-10-07 8:45 ` Daniel Lezcano
2026-10-07 15:00 ` Bradley Morgan
2026-10-07 7:06 ` [PATCH v16 6/6] Documentation: Add sysfs documentation for PSCRR Faruque Ansari
2026-10-07 8:53 ` Daniel Lezcano
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=202610130349.c7FTyYw4-lkp@intel.com \
--to=lkp@intel.com \
--cc=avaneesh.dwivedi@oss.qualcomm.com \
--cc=bleung@chromium.org \
--cc=brads@mainlining.org \
--cc=broonie@kernel.org \
--cc=chrome-platform@lists.linux.dev \
--cc=daniel.lezcano@kernel.org \
--cc=faruque.ansari@oss.qualcomm.com \
--cc=groeck@chromium.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lukasz.luba@arm.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=o.rempel@pengutronix.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sre@kernel.org \
--cc=tzungbi@kernel.org \
--cc=ulfh@kernel.org \
--cc=umang.chheda@oss.qualcomm.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®