[PATCH v3 06/13] hwmon: Add Apple Silicon SMC hwmon driver
kernel test robot
lkp at intel.com
Fri Oct 10 13:25:35 PDT 2025
Hi James,
kernel test robot noticed the following build errors:
[auto build test ERROR on c746c3b5169831d7fb032a1051d8b45592ae8d78]
url: https://github.com/intel-lab-lkp/linux/commits/James-Calligeros/dt-bindings-rtc-Add-Apple-SMC-RTC/20251010-092141
base: c746c3b5169831d7fb032a1051d8b45592ae8d78
patch link: https://lore.kernel.org/r/20251007-macsmc-subdevs-v3-6-d7d3bfd7ae02%40gmail.com
patch subject: [PATCH v3 06/13] hwmon: Add Apple Silicon SMC hwmon driver
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20251011/202510110421.ZnJdu1ds-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251011/202510110421.ZnJdu1ds-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510110421.ZnJdu1ds-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/hwmon/macsmc-hwmon.c: In function 'macsmc_hwmon_write_f32':
>> drivers/hwmon/macsmc-hwmon.c:246:24: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
246 | fval = FIELD_PREP(FLT_SIGN_MASK, neg) |
| ^~~~~~~~~~
vim +/FIELD_PREP +246 drivers/hwmon/macsmc-hwmon.c
225
226 static int macsmc_hwmon_write_f32(struct apple_smc *smc, smc_key key, int value)
227 {
228 u64 val;
229 u32 fval = 0;
230 int exp = 0, neg;
231
232 val = abs(value);
233 neg = val != value;
234
235 if (val) {
236 int msb = __fls(val) - exp;
237
238 if (msb > 23) {
239 val >>= msb - FLT_MANT_BIAS;
240 exp -= msb - FLT_MANT_BIAS;
241 } else if (msb < 23) {
242 val <<= FLT_MANT_BIAS - msb;
243 exp += msb;
244 }
245
> 246 fval = FIELD_PREP(FLT_SIGN_MASK, neg) |
247 FIELD_PREP(FLT_EXP_MASK, exp + FLT_EXP_BIAS) |
248 FIELD_PREP(FLT_MANT_MASK, val);
249 }
250
251 return apple_smc_write_u32(smc, key, fval);
252 }
253
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list