Hi, kernel test robot noticed the following build errors: [auto build test ERROR on abelloni/rtc-next] [also build test ERROR on linus/master v6.13-rc6 next-20250110] [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/alexandre-belloni-bootlin-com/rtc-pcf2127-add-BSM-support/20250109-214654 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next patch link: https://lore.kernel.org/r/20250109134253.827796-1-alexandre.belloni%40bootlin.com patch subject: [PATCH] rtc: pcf2127: add BSM support config: i386-buildonly-randconfig-006-20250111 (https://download.01.org/0day-ci/archive/20250111/202501110609.EswlBu9L-lkp@xxxxxxxxx/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/20250111/202501110609.EswlBu9L-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202501110609.EswlBu9L-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from drivers/rtc/rtc-pcf2127.c:20: In file included from include/linux/i2c.h:19: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:21: In file included from include/linux/mm.h:2213: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/rtc/rtc-pcf2127.c:347:11: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 347 | value = FIELD_GET(PCF2127_CTRL3_PM, value); | ^ drivers/rtc/rtc-pcf2127.c:378:11: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 378 | value = FIELD_GET(PCF2127_CTRL3_PM, value); | ^ >> drivers/rtc/rtc-pcf2127.c:402:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 402 | FIELD_PREP(PCF2127_CTRL3_PM, mode + value)); | ^ 1 warning and 3 errors generated. vim +/FIELD_GET +347 drivers/rtc/rtc-pcf2127.c 334 335 static int pcf2127_param_get(struct device *dev, struct rtc_param *param) 336 { 337 struct pcf2127 *pcf2127 = dev_get_drvdata(dev); 338 u32 value; 339 int ret; 340 341 switch (param->param) { 342 case RTC_PARAM_BACKUP_SWITCH_MODE: 343 ret = regmap_read(pcf2127->regmap, PCF2127_REG_CTRL3, &value); 344 if (ret < 0) 345 return ret; 346 > 347 value = FIELD_GET(PCF2127_CTRL3_PM, value); 348 349 if (value < 0x3) 350 param->uvalue = RTC_BSM_LEVEL; 351 else if (value < 0x6) 352 param->uvalue = RTC_BSM_DIRECT; 353 else 354 param->uvalue = RTC_BSM_DISABLED; 355 356 break; 357 358 default: 359 return -EINVAL; 360 } 361 362 return 0; 363 } 364 365 static int pcf2127_param_set(struct device *dev, struct rtc_param *param) 366 { 367 struct pcf2127 *pcf2127 = dev_get_drvdata(dev); 368 u8 mode = 0; 369 u32 value; 370 int ret; 371 372 switch (param->param) { 373 case RTC_PARAM_BACKUP_SWITCH_MODE: 374 ret = regmap_read(pcf2127->regmap, PCF2127_REG_CTRL3, &value); 375 if (ret < 0) 376 return ret; 377 378 value = FIELD_GET(PCF2127_CTRL3_PM, value); 379 380 if (value > 5) 381 value -= 5; 382 else if (value > 2) 383 value -= 3; 384 385 switch (param->uvalue) { 386 case RTC_BSM_LEVEL: 387 break; 388 case RTC_BSM_DIRECT: 389 mode = 3; 390 break; 391 case RTC_BSM_DISABLED: 392 if (value == 0) 393 value = 1; 394 mode = 5; 395 break; 396 default: 397 return -EINVAL; 398 } 399 400 return regmap_update_bits(pcf2127->regmap, PCF2127_REG_CTRL3, 401 PCF2127_CTRL3_PM, > 402 FIELD_PREP(PCF2127_CTRL3_PM, mode + value)); 403 404 break; 405 406 default: 407 return -EINVAL; 408 } 409 410 return 0; 411 } 412 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki