From: kernel test robot <lkp@intel.com>
To: Michael Reeves via B4 Relay
<devnull+michael.reeves077.gmail.com@kernel.org>,
Sebastian Reichel <sre@kernel.org>, Sven Peter <sven@kernel.org>,
Janne Grunau <j@jannau.net>, Neal Gompa <neal@gompa.dev>,
Lee Jones <lee@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Michael Reeves <michael.reeves077@gmail.com>,
Hector Martin <marcan@marcan.st>, Joey Gouly <joey.gouly@arm.com>
Subject: Re: [PATCH v5 1/2] power: supply: Add macsmc-power driver for Apple Silicon
Date: Mon, 26 Jan 2026 03:56:05 +0800 [thread overview]
Message-ID: <202601260326.ZuabPAK0-lkp@intel.com> (raw)
In-Reply-To: <20260126-b4-macsmc-power-v5-1-302462673b18@gmail.com>
Hi Michael,
kernel test robot noticed the following build errors:
[auto build test ERROR on ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea]
url: https://github.com/intel-lab-lkp/linux/commits/Michael-Reeves-via-B4-Relay/power-supply-Add-macsmc-power-driver-for-Apple-Silicon/20260125-211800
base: ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea
patch link: https://lore.kernel.org/r/20260126-b4-macsmc-power-v5-1-302462673b18%40gmail.com
patch subject: [PATCH v5 1/2] power: supply: Add macsmc-power driver for Apple Silicon
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20260126/202601260326.ZuabPAK0-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260126/202601260326.ZuabPAK0-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/202601260326.ZuabPAK0-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/power/supply/macsmc-power.c:559:3: error: call to undeclared function 'emergency_sync'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
559 | emergency_sync();
| ^
1 error generated.
vim +/emergency_sync +559 drivers/power/supply/macsmc-power.c
531
532 static void macsmc_power_critical_work(struct work_struct *wrk)
533 {
534 struct macsmc_power *power = container_of(wrk, struct macsmc_power, critical_work);
535 u16 bitv, b0av;
536 u32 bcf0;
537
538 if (!power->batt)
539 return;
540
541 /*
542 * Avoid duplicate atempts at emergency shutdown
543 */
544 if (power->emergency_shutdown_triggered || system_state > SYSTEM_RUNNING)
545 return;
546
547 /*
548 * EMERGENCY: Check voltage vs design minimum.
549 * If we are below BITV, the battery is physically exhausted.
550 * We must shut down NOW to protect the filesystem.
551 */
552 if (apple_smc_read_u16(power->smc, SMC_KEY(BITV), &bitv) >= 0 &&
553 apple_smc_read_u16(power->smc, SMC_KEY(B0AV), &b0av) >= 0 &&
554 b0av < bitv) {
555 power->emergency_shutdown_triggered = true;
556 dev_emerg(power->dev,
557 "Battery voltage (%d mV) below design minimum (%d mV)! Emergency shutdown.\n",
558 b0av, bitv);
> 559 emergency_sync();
560 kernel_power_off();
561 }
562
563 /*
564 * Avoid duplicate attempts at orderly shutdown.
565 * Voltage check is above this as we may want to
566 * "upgrade" an orderly shutdown to a critical power
567 * off if voltage drops.
568 */
569 if (power->orderly_shutdown_triggered || system_state > SYSTEM_RUNNING)
570 return;
571
572 /*
573 * Check if SMC flagged the battery as empty.
574 * We trigger a graceful shutdown to let the OS save data.
575 */
576 if (apple_smc_read_u32(power->smc, SMC_KEY(BCF0), &bcf0) == 0 && bcf0 != 0) {
577 power->orderly_shutdown_triggered = true;
578 dev_crit(power->dev, "Battery critical (empty flag set). Triggering orderly shutdown.\n");
579 orderly_poweroff(true);
580 }
581 }
582
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-01-25 19:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 13:14 [PATCH v5 0/2] Add Apple Silicon SMC power driver Michael Reeves via B4 Relay
2026-01-25 13:14 ` [PATCH v5 1/2] power: supply: Add macsmc-power driver for Apple Silicon Michael Reeves via B4 Relay
2026-01-25 19:56 ` kernel test robot [this message]
2026-01-25 13:14 ` [PATCH v5 2/2] mfd: macsmc: Wire up Apple SMC power driver Michael Reeves via B4 Relay
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=202601260326.ZuabPAK0-lkp@intel.com \
--to=lkp@intel.com \
--cc=asahi@lists.linux.dev \
--cc=devnull+michael.reeves077.gmail.com@kernel.org \
--cc=j@jannau.net \
--cc=joey.gouly@arm.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=marcan@marcan.st \
--cc=michael.reeves077@gmail.com \
--cc=neal@gompa.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sre@kernel.org \
--cc=sven@kernel.org \
/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