[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202502142339.NmW9FTBM-lkp@intel.com>
Date: Fri, 14 Feb 2025 23:31:18 +0800
From: kernel test robot <lkp@...el.com>
To: Anjelique Melendez <anjelique.melendez@....qualcomm.com>,
amitk@...nel.org, thara.gopinath@...il.com, rafael@...nel.org,
daniel.lezcano@...aro.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
rui.zhang@...el.com, lukasz.luba@....com,
david.collins@....qualcomm.com, linux-arm-msm@...r.kernel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] thermal: qcom-spmi-temp-alarm: add support for LITE
PMIC peripherals
Hi Anjelique,
kernel test robot noticed the following build errors:
[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master v6.14-rc2 next-20250214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Anjelique-Melendez/thermal-qcom-spmi-temp-alarm-enable-stage-2-shutdown-when-required/20250214-050700
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link: https://lore.kernel.org/r/20250213210403.3396392-5-anjelique.melendez%40oss.qualcomm.com
patch subject: [PATCH 4/4] thermal: qcom-spmi-temp-alarm: add support for LITE PMIC peripherals
config: i386-buildonly-randconfig-003-20250214 (https://download.01.org/0day-ci/archive/20250214/202502142339.NmW9FTBM-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250214/202502142339.NmW9FTBM-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/202502142339.NmW9FTBM-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/thermal/qcom/qcom-spmi-temp-alarm.c:196:9: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
196 | return FIELD_GET(STATUS_GEN1_STAGE_MASK, reg);
| ^
drivers/thermal/qcom/qcom-spmi-temp-alarm.c:217:8: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
217 | ret = FIELD_GET(STATUS_GEN2_STATE_MASK, reg);
| ^
>> drivers/thermal/qcom/qcom-spmi-temp-alarm.c:477:9: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
477 | reg |= FIELD_PREP(LITE_TEMP_CFG_THRESHOLD_MASK, thresh);
| ^
drivers/thermal/qcom/qcom-spmi-temp-alarm.c:634:11: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
634 | thresh = FIELD_GET(LITE_TEMP_CFG_THRESHOLD_MASK, reg);
| ^
4 errors generated.
vim +/FIELD_PREP +477 drivers/thermal/qcom/qcom-spmi-temp-alarm.c
418
419 static int qpnp_tm_lite_set_temp_thresh(struct qpnp_tm_chip *chip, int trip, int temp)
420 {
421 int ret, temp_cfg, i;
422 const long *temp_map;
423 u16 addr;
424 u8 reg, thresh;
425
426 if (trip < 0 || trip >= STAGE_COUNT) {
427 dev_err(chip->dev, "invalid TEMP_LITE trip = %d\n", trip);
428 return -EINVAL;
429 }
430
431 switch (trip) {
432 case 0:
433 temp_map = temp_lite_warning_map;
434 addr = QPNP_TM_REG_LITE_TEMP_CFG1;
435 break;
436 case 1:
437 /*
438 * The second trip point is purely in software to facilitate
439 * a controlled shutdown after the warning threshold is crossed
440 * but before the automatic hardware shutdown threshold is
441 * crossed.
442 */
443 return 0;
444 case 2:
445 temp_map = temp_lite_shutdown_map;
446 addr = QPNP_TM_REG_LITE_TEMP_CFG2;
447 break;
448 default:
449 return 0;
450 }
451
452 if (temp < temp_map[THRESH_MIN] || temp > temp_map[THRESH_MAX]) {
453 dev_err(chip->dev, "invalid TEMP_LITE temp = %d\n", temp);
454 return -EINVAL;
455 }
456
457 thresh = 0;
458 temp_cfg = temp_map[thresh];
459 for (i = THRESH_MAX; i >= THRESH_MIN; i--) {
460 if (temp >= temp_map[i]) {
461 thresh = i;
462 temp_cfg = temp_map[i];
463 break;
464 }
465 }
466
467 if (temp_cfg == chip->temp_thresh_map[trip])
468 return 0;
469
470 ret = qpnp_tm_read(chip, addr, ®);
471 if (ret < 0) {
472 dev_err(chip->dev, "LITE_TEMP_CFG read failed, ret=%d\n", ret);
473 return ret;
474 }
475
476 reg &= ~LITE_TEMP_CFG_THRESHOLD_MASK;
> 477 reg |= FIELD_PREP(LITE_TEMP_CFG_THRESHOLD_MASK, thresh);
478
479 ret = qpnp_tm_write(chip, addr, reg);
480 if (ret < 0) {
481 dev_err(chip->dev, "LITE_TEMP_CFG write failed, ret=%d\n", ret);
482 return ret;
483 }
484
485 chip->temp_thresh_map[trip] = temp_cfg;
486
487 return 0;
488 }
489
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists