lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CDOSXWS42V5H.4Q06IYCLIBTG@shaak>
Date:   Fri, 20 Aug 2021 21:33:13 -0400
From:   "Liam Beguin" <liambeguin@...il.com>
To:     "kernel test robot" <lkp@...el.com>, <peda@...ntia.se>,
        <jic23@...nel.org>, <lars@...afoo.de>
Cc:     <kbuild-all@...ts.01.org>, <linux-kernel@...r.kernel.org>,
        <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <robh+dt@...nel.org>
Subject: Re: [PATCH v8 09/14] iio: afe: rescale: fix accuracy for small
 fractional scales

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-temperature-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=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/e5c2e1505fa3f8cf9fe6d3a21f3a5c585efc6dce
> 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=$HOME/0day COMPILER=gcc-11.2.0 make.cross
> O=build_dir ARCH=nds32 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
>
> 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 scale_type,
 		else
 			tmp = 1 << *val2;
 
-		 if (abs(rem) > 10000000 && abs(*val / tmp) < 100) {
+		 if (abs(rem) > 10000000 && abs(div64_s64(*val, tmp)) < 100) {
 			*val = div_s64_rem(*val, tmp, &rem2);
 
 			*val2 = 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@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ