Content-Type: multipart/mixed; boundary="===============4134422719440270843==" MIME-Version: 1.0 From: Liam Beguin To: kbuild-all@lists.01.org Subject: Re: [PATCH v8 09/14] iio: afe: rescale: fix accuracy for small fractional scales Date: Fri, 20 Aug 2021 21:33:13 -0400 Message-ID: In-Reply-To: <202108210716.pxy9O6XW-lkp@intel.com> List-Id: --===============4134422719440270843== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri Aug 20, 2021 at 7:37 PM EDT, kernel test robot wrote: > Hi Liam, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on 6cbb3aa0f9d5d23221df787cf36f74d3866fdb78] > > url: > https://github.com/0day-ci/linux/commits/Liam-Beguin/iio-afe-add-temperat= ure-rescaling-support/20210821-032112 > base: 6cbb3aa0f9d5d23221df787cf36f74d3866fdb78 > config: nds32-buildonly-randconfig-r005-20210821 (attached as .config) > compiler: nds32le-linux-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/e5c2e1505fa3f8cf9fe6d3a21f3a5c585= efc6dce > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review > Liam-Beguin/iio-afe-add-temperature-rescaling-support/20210821-032112 > git checkout e5c2e1505fa3f8cf9fe6d3a21f3a5c585efc6dce > # save the attached .config to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross > O=3Dbuild_dir ARCH=3Dnds32 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 >>): > > nds32le-linux-ld: drivers/iio/afe/iio-rescale.o: in function > `rescale_process_scale': > >> iio-rescale.c:(.text+0x5f4): undefined reference to `__divdi3' > >> nds32le-linux-ld: iio-rescale.c:(.text+0x5f8): undefined reference to = `__divdi3' My mistake, I'll replace the division by a div64_s64(). --- a/drivers/iio/afe/iio-rescale.c +++ b/drivers/iio/afe/iio-rescale.c @@ -53,7 +53,7 @@ int rescale_process_scale(struct rescale *rescale, int sc= ale_type, else tmp =3D 1 << *val2; = - if (abs(rem) > 10000000 && abs(*val / tmp) < 100) { + if (abs(rem) > 10000000 && abs(div64_s64(*val, tmp)) < 100) { *val =3D div_s64_rem(*val, tmp, &rem2); = *val2 =3D div_s64(rem, tmp); The if statement is also misaligned here. I'll fix that too. Thanks, Liam > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4134422719440270843==--