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] [day] [month] [year] [list]
Message-ID: <202111261848.357oHcvz-lkp@intel.com>
Date:   Fri, 26 Nov 2021 18:56:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Cosmin Tanislav <demonsingur@...il.com>
Cc:     kbuild-all@...ts.01.org, demonsingur@...il.com,
        cosmin.tanislav@...log.com, Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Rob Herring <robh+dt@...nel.org>, linux-iio@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v4 3/3] iio: addac: add AD74413R driver

Hi Cosmin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on robh/for-next linus/master v5.16-rc2 next-20211126]
[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/Cosmin-Tanislav/Add-AD74413R-driver/20211125-212256
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20211126/202111261848.357oHcvz-lkp@intel.com/config)
compiler: ia64-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/fc77dddb39ba26db2e5f66817f9e12dc3191659d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cosmin-Tanislav/Add-AD74413R-driver/20211125-212256
        git checkout fc77dddb39ba26db2e5f66817f9e12dc3191659d
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/iio/addac/ad74413r.c: In function 'ad74413r_range_to_voltage_offset_raw':
>> drivers/iio/addac/ad74413r.c:586:24: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709486081' to '-65535' [-Woverflow]
     586 |                 *val = -AD74413R_ADC_RESULT_MAX;
         |                        ^
   drivers/iio/addac/ad74413r.c:589:24: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '9223372036854743040' to '-32768' [-Woverflow]
     589 |                 *val = -AD74413R_ADC_RESULT_MAX / 2;
         |                        ^


vim +586 drivers/iio/addac/ad74413r.c

   576	
   577	static int ad74413r_range_to_voltage_offset_raw(struct ad74413r_state *st,
   578							unsigned int range, int *val)
   579	{
   580		switch (range) {
   581		case AD74413R_ADC_RANGE_10V:
   582		case AD74413R_ADC_RANGE_2P5V_EXT_POW:
   583			*val = 0;
   584			return 0;
   585		case AD74413R_ADC_RANGE_2P5V_INT_POW:
 > 586			*val = -AD74413R_ADC_RESULT_MAX;
   587			return 0;
   588		case AD74413R_ADC_RANGE_5V_BI_DIR:
   589			*val = -AD74413R_ADC_RESULT_MAX / 2;
   590			return 0;
   591		default:
   592			dev_err(st->dev, "ADC range invalid\n");
   593			return -EINVAL;
   594		}
   595	}
   596	

---
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