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: <201612100534.ZYsVXD1X%fengguang.wu@intel.com>
Date:   Sat, 10 Dec 2016 05:52:38 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Eva Rachel Retuya <eraretuya@...il.com>
Cc:     kbuild-all@...org, linux-iio@...r.kernel.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
        knaack.h@....de, pmeerw@...erw.net, gregkh@...uxfoundation.org,
        Eva Rachel Retuya <eraretuya@...il.com>
Subject: Re: [PATCH v2 2/2] staging: iio: ad7606: move out of staging

Hi Eva,

[auto build test WARNING on iio/togreg]
[also build test WARNING on next-20161209]
[cannot apply to v4.9-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Eva-Rachel-Retuya/staging-iio-ad7606-move-driver-out-of-staging/20161210-041408
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: blackfin-allmodconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

All warnings (new ones prefixed by >>):

   In file included from ./arch/blackfin/include/generated/asm/div64.h:1:0,
                    from include/linux/kernel.h:142,
                    from include/linux/interrupt.h:5,
                    from drivers/iio/adc/ad7606.c:9:
   drivers/iio/adc/ad7606.c: In function 'ad7606_probe':
   include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
     (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                               ^
>> drivers/iio/adc/ad7606.c:440:27: note: in expansion of macro 'do_div'
      st->scale_avail[i][1] = do_div(scale, 100000000) * 10;
                              ^~~~~~
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from include/linux/interrupt.h:5,
                    from drivers/iio/adc/ad7606.c:9:
   include/asm-generic/div64.h:220:25: warning: right shift count >= width of type [-Wshift-count-overflow]
     } else if (likely(((n) >> 32) == 0)) {  \
                            ^
   include/linux/compiler.h:167:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
>> drivers/iio/adc/ad7606.c:440:27: note: in expansion of macro 'do_div'
      st->scale_avail[i][1] = do_div(scale, 100000000) * 10;
                              ^~~~~~
   In file included from ./arch/blackfin/include/generated/asm/div64.h:1:0,
                    from include/linux/kernel.h:142,
                    from include/linux/interrupt.h:5,
                    from drivers/iio/adc/ad7606.c:9:
   include/asm-generic/div64.h:224:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
      __rem = __div64_32(&(n), __base); \
                         ^
>> drivers/iio/adc/ad7606.c:440:27: note: in expansion of macro 'do_div'
      st->scale_avail[i][1] = do_div(scale, 100000000) * 10;
                              ^~~~~~
   include/asm-generic/div64.h:198:17: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'unsigned int *'
    extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
                    ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/do_div +440 drivers/iio/adc/ad7606.c

b9618c0c drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-02-22  424  
e61181d0 drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-05-18  425  	st = iio_priv(indio_dev);
e61181d0 drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-05-18  426  
b9618c0c drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-02-22  427  	st->dev = dev;
b9618c0c drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-02-22  428  	st->bops = bops;
b9618c0c drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-02-22  429  	st->base_address = base_address;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  430  	/* tied to logic low, analog input range is +/- 5V */
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  431  	st->range = 0;
e79e8027 drivers/staging/iio/adc/ad7606_core.c Lars-Peter Clausen 2016-10-19  432  	st->oversampling = 1;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  433  	/* Populate the scales, 2.5/2**16 then 5/2**16 */
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  434  	range = 5000;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  435  	for (i = 0, j = 1; i < ARRAY_SIZE(st->scale_avail); i++, j--) {
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  436  		scale = ((u64)range * 100000000) >>
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  437  			ad7606_channels[1].scan_type.realbits;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  438  		scale >>= j;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  439  
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09 @440  		st->scale_avail[i][1] = do_div(scale, 100000000) * 10;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  441  		st->scale_avail[i][0] = scale;
c22bfdb9 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-12-09  442  	}
fa23105f drivers/staging/iio/adc/ad7606.c      Lars-Peter Clausen 2016-10-19  443  	INIT_WORK(&st->poll_work, &ad7606_poll_bh_to_ring);
b9618c0c drivers/staging/iio/adc/ad7606_core.c Michael Hennerich  2011-02-22  444  
12edb974 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-10-20  445  	st->reg = devm_regulator_get(dev, "avcc");
f0879217 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-10-20  446  	if (IS_ERR(st->reg))
f0879217 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-10-20  447  		return PTR_ERR(st->reg);
f0879217 drivers/staging/iio/adc/ad7606.c      Eva Rachel Retuya  2016-10-20  448  

:::::: The code at line 440 was first introduced by commit
:::::: c22bfdb966a91ee001c3ab37b8fb070dbebb2510 staging: iio: ad7606: replace range/range_available with corresponding scale

:::::: TO: Eva Rachel Retuya <eraretuya@...il.com>
:::::: CC: 0day robot <fengguang.wu@...el.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (42121 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ