From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============9158627506523165839==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 05/11] power: supply: ab8500_fg: Break out load compensated voltage Date: Fri, 28 Jan 2022 06:31:54 +0800 Message-ID: <202201280613.1yVNjErX-lkp@intel.com> In-Reply-To: <20220127011236.332687-6-linus.walleij@linaro.org> List-Id: --===============9158627506523165839== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Linus, I love your patch! Yet something to improve: [auto build test ERROR on sre-power-supply/for-next] [also build test ERROR on v5.17-rc1 next-20220127] [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/Linus-Walleij/AB8500-charg= ing-fixes/20220127-091555 base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-sup= ply.git for-next config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220128/= 202201280613.1yVNjErX-lkp(a)intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/b950e6ce295a6cfa6175ece7b= 11f9e0e904e35ee git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Linus-Walleij/AB8500-charging-fixe= s/20220127-091555 git checkout b950e6ce295a6cfa6175ece7b11f9e0e904e35ee # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darm SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/power/supply/ab8500_fg.c: In function 'ab8500_load_comp_fg_bat_v= oltage': >> drivers/power/supply/ab8500_fg.c:947:17: error: too many arguments to fu= nction 'ab8500_fg_battery_resistance' 947 | rcomp =3D ab8500_fg_battery_resistance(di, vbat_uv); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/power/supply/ab8500_fg.c:883:12: note: declared here 883 | static int ab8500_fg_battery_resistance(struct ab8500_fg *di) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/power/supply/ab8500_fg.c: In function 'ab8500_fg_get_ext_psy_dat= a': drivers/power/supply/ab8500_fg.c:2237:75: warning: variable 'b' set but = not used [-Wunused-but-set-variable] 2237 | const struct ab8500_batt= ery_type *b; | = ^ vim +/ab8500_fg_battery_resistance +947 drivers/power/supply/ab8500_fg.c 910 = 911 /** 912 * ab8500_load_comp_fg_bat_voltage() - get load compensated battery = voltage 913 * @di: pointer to the ab8500_fg structure 914 * 915 * Returns compensated battery voltage (on success) else error code. 916 * If always is specified, we always return a voltage but it may be 917 * uncompensated. 918 */ 919 static int ab8500_load_comp_fg_bat_voltage(struct ab8500_fg *di) 920 { 921 int i =3D 0; 922 int vbat_uv =3D 0; 923 int rcomp; 924 = 925 /* Average the instant current to get a stable current measurement = */ 926 ab8500_fg_inst_curr_start(di); 927 = 928 do { 929 vbat_uv +=3D ab8500_fg_bat_voltage(di); 930 i++; 931 usleep_range(5000, 6000); 932 } while (!ab8500_fg_inst_curr_done(di) && 933 i <=3D WAIT_FOR_INST_CURRENT_MAX); 934 = 935 if (i > WAIT_FOR_INST_CURRENT_MAX) { 936 dev_err(di->dev, 937 "TIMEOUT: return uncompensated measurement of VBAT\n"); 938 di->vbat_uv =3D vbat_uv / i; 939 return di->vbat_uv; 940 } 941 = 942 ab8500_fg_inst_curr_finalize(di, &di->inst_curr_ua); 943 = 944 vbat_uv =3D vbat_uv / i; 945 = 946 /* Next we apply voltage compensation from internal resistance */ > 947 rcomp =3D ab8500_fg_battery_resistance(di, vbat_uv); 948 vbat_uv =3D vbat_uv - (di->inst_curr_ua * rcomp) / 1000; 949 = 950 /* Always keep this state at latest measurement */ 951 di->vbat_uv =3D vbat_uv; 952 = 953 return vbat_uv; 954 } 955 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============9158627506523165839==--