[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202601260326.ZuabPAK0-lkp@intel.com>
Date: Mon, 26 Jan 2026 03:56:05 +0800
From: kernel test robot <lkp@...el.com>
To: Michael Reeves via B4 Relay <devnull+michael.reeves077.gmail.com@...nel.org>,
Sebastian Reichel <sre@...nel.org>, Sven Peter <sven@...nel.org>,
Janne Grunau <j@...nau.net>, Neal Gompa <neal@...pa.dev>,
Lee Jones <lee@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
Michael Reeves <michael.reeves077@...il.com>,
Hector Martin <marcan@...can.st>, Joey Gouly <joey.gouly@....com>
Subject: Re: [PATCH v5 1/2] power: supply: Add macsmc-power driver for Apple
Silicon
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@...el.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
Powered by blists - more mailing lists