Thread (14 messages) 14 messages, 2 authors, 2021-08-01

Re: [PATCH v2 08/10] power: supply: axp288_fuel_gauge: Refresh all registers in one go

From: kernel test robot <hidden>
Date: 2021-07-30 16:15:03
Also in: oe-kbuild-all

Hi Hans,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on power-supply/for-next]
[also build test ERROR on v5.14-rc3 next-20210729]
[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]

url:    https://github.com/0day-ci/linux/commits/Hans-de-Goede/power-supply-axp288_fuel_gauge-Reduce-number-of-register-accesses-cleanups/20210730-175716
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
config: x86_64-buildonly-randconfig-r001-20210730 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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/0day-ci/linux/commit/1ff192ccce54fdfce899447999a60a195537460c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Hans-de-Goede/power-supply-axp288_fuel_gauge-Reduce-number-of-register-accesses-cleanups/20210730-175716
        git checkout 1ff192ccce54fdfce899447999a60a195537460c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):
quoted
drivers/power/supply/axp288_fuel_gauge.c:219:8: error: implicit declaration of function 'iosf_mbi_block_punit_i2c_access' [-Werror,-Wimplicit-function-declaration]
           ret = iosf_mbi_block_punit_i2c_access();
                 ^
quoted
drivers/power/supply/axp288_fuel_gauge.c:268:2: error: implicit declaration of function 'iosf_mbi_unblock_punit_i2c_access' [-Werror,-Wimplicit-function-declaration]
           iosf_mbi_unblock_punit_i2c_access();
           ^
   drivers/power/supply/axp288_fuel_gauge.c:268:2: note: did you mean 'iosf_mbi_block_punit_i2c_access'?
   drivers/power/supply/axp288_fuel_gauge.c:219:8: note: 'iosf_mbi_block_punit_i2c_access' declared here
           ret = iosf_mbi_block_punit_i2c_access();
                 ^
   2 errors generated.


vim +/iosf_mbi_block_punit_i2c_access +219 drivers/power/supply/axp288_fuel_gauge.c

   209	
   210	static int fuel_gauge_update_registers(struct axp288_fg_info *info)
   211	{
   212		int ret;
   213	
   214		if (info->valid && time_before(jiffies, info->last_updated + AXP288_REG_UPDATE_INTERVAL))
   215			return 0;
   216	
   217		dev_dbg(info->dev, "Fuel Gauge updating register values...\n");
   218	
 > 219		ret = iosf_mbi_block_punit_i2c_access();
   220		if (ret < 0)
   221			return ret;
   222	
   223		ret = fuel_gauge_reg_readb(info, AXP20X_PWR_INPUT_STATUS);
   224		if (ret < 0)
   225			goto out;
   226		info->pwr_stat = ret;
   227	
   228		ret = fuel_gauge_reg_readb(info, AXP20X_FG_RES);
   229		if (ret < 0)
   230			goto out;
   231		info->fg_res = ret;
   232	
   233		ret = iio_read_channel_raw(info->iio_channel[BAT_VOLT], &info->bat_volt);
   234		if (ret < 0)
   235			goto out;
   236	
   237		if (info->pwr_stat & PS_STAT_BAT_CHRG_DIR) {
   238			info->d_curr = 0;
   239			ret = iio_read_channel_raw(info->iio_channel[BAT_CHRG_CURR], &info->c_curr);
   240			if (ret < 0)
   241				goto out;
   242		} else {
   243			info->c_curr = 0;
   244			ret = iio_read_channel_raw(info->iio_channel[BAT_D_CURR], &info->d_curr);
   245			if (ret < 0)
   246				goto out;
   247		}
   248	
   249		ret = fuel_gauge_read_12bit_word(info, AXP288_FG_OCVH_REG);
   250		if (ret < 0)
   251			goto out;
   252		info->ocv = ret;
   253	
   254		ret = fuel_gauge_read_15bit_word(info, AXP288_FG_CC_MTR1_REG);
   255		if (ret < 0)
   256			goto out;
   257		info->fg_cc_mtr1 = ret;
   258	
   259		ret = fuel_gauge_read_15bit_word(info, AXP288_FG_DES_CAP1_REG);
   260		if (ret < 0)
   261			goto out;
   262		info->fg_des_cap1 = ret;
   263	
   264		info->last_updated = jiffies;
   265		info->valid = 1;
   266		ret = 0;
   267	out:
 > 268		iosf_mbi_unblock_punit_i2c_access();
   269		return ret;
   270	}
   271	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help