Hi ChiaEn, Thank you for the patch! Yet something to improve: [auto build test ERROR on sre-power-supply/for-next] [also build test ERROR on robh/for-next linus/master v6.0-rc7 next-20220928] [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/ChiaEn-Wu/Add-Richtek-RT9467-5A-Battery-Charger-support/20220929-183906 base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next config: sh-allmodconfig compiler: sh4-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/042b1a763ec2948a412ff2a7fa500b98aace9923 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review ChiaEn-Wu/Add-Richtek-RT9467-5A-Battery-Charger-support/20220929-183906 git checkout 042b1a763ec2948a412ff2a7fa500b98aace9923 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/power/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/power/supply/rt9467-charger.c: In function 'rt9467_get_adc_raw_data': >> drivers/power/supply/rt9467-charger.c:436:43: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration] 436 | reg_val = RT9467_MASK_ADC_START | FIELD_PREP(RT9467_MASK_ADC_IN_SEL, adc_sel); | ^~~~~~~~~~ drivers/power/supply/rt9467-charger.c: At top level: drivers/power/supply/rt9467-charger.c:256:26: warning: 'rt9467_port_stat_names' defined but not used [-Wunused-const-variable=] 256 | static const char *const rt9467_port_stat_names[RT9467_CHG_TYPE_MAX] = { | ^~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/FIELD_PREP +436 drivers/power/supply/rt9467-charger.c 416 417 static int rt9467_get_adc_raw_data(struct rt9467_chg_data *data, 418 enum rt9467_adc_chan chan, int *val) 419 { 420 unsigned int adc_stat, reg_val, adc_sel; 421 __be16 chan_raw_data; 422 int ret; 423 424 mutex_lock(&data->adc_lock); 425 426 ret = rt9467_get_adc_sel(chan, &adc_sel); 427 if (ret) 428 goto adc_unlock; 429 430 ret = regmap_write(data->regmap, RT9467_REG_CHG_ADC, 0); 431 if (ret) { 432 dev_err(data->dev, "Failed to clear ADC enable\n"); 433 goto adc_unlock; 434 } 435 > 436 reg_val = RT9467_MASK_ADC_START | FIELD_PREP(RT9467_MASK_ADC_IN_SEL, adc_sel); 437 ret = regmap_write(data->regmap, RT9467_REG_CHG_ADC, reg_val); 438 if (ret) 439 goto adc_unlock; 440 441 /* Minimum wait time for one channel processing */ 442 msleep(RT9467_ADCCONV_TIME_MS); 443 444 ret = regmap_read_poll_timeout(data->regmap, RT9467_REG_CHG_ADC, 445 adc_stat, 446 !(adc_stat & RT9467_MASK_ADC_START), 447 MILLI, RT9467_ADCCONV_TIME_MS * MILLI); 448 if (ret) { 449 dev_err(data->dev, "Failed to wait ADC conversion, chan = %d\n", chan); 450 goto adc_unlock; 451 } 452 453 ret = regmap_raw_read(data->regmap, RT9467_REG_ADC_DATA_H, 454 &chan_raw_data, sizeof(chan_raw_data)); 455 if (ret) 456 goto adc_unlock; 457 458 *val = be16_to_cpu(chan_raw_data); 459 460 adc_unlock: 461 mutex_unlock(&data->adc_lock); 462 return ret; 463 } 464 -- 0-DAY CI Kernel Test Service https://01.org/lkp