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: <201910301128.2cDas58o%lkp@intel.com>
Date:   Wed, 30 Oct 2019 11:44:41 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc:     kbuild-all@...ts.01.org, sboyd@...nel.org, mturquette@...libre.com,
        robh+dt@...nel.org, linux-clk@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, haitao.suo@...main.com,
        darren.tsao@...main.com, fisher.cheng@...main.com,
        alec.lin@...main.com,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: Re: [PATCH v6 6/7] clk: Add common clock driver for BM1880 SoC

Hi Manivannan,

I love your patch! Yet something to improve:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on v5.4-rc5 next-20191029]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Manivannan-Sadhasivam/Add-Bitmain-BM1880-clock-driver/20191029-142130
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   In file included from arch/arm/include/asm/div64.h:127:0,
                    from include/linux/kernel.h:18,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers/clk/clk-bm1880.c:9:
   drivers/clk/clk-bm1880.c: In function 'bm1880_pll_rate_calc':
   include/asm-generic/div64.h:226:28: warning: comparison of distinct pointer types lacks a cast
     (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                               ^
   drivers/clk/clk-bm1880.c:488:2: note: in expansion of macro 'do_div'
     do_div(numerator, denominator);
     ^~~~~~
   In file included from arch/arm/include/asm/bitops.h:27:0,
                    from include/linux/bitops.h:19,
                    from include/linux/of.h:15,
                    from include/linux/clk-provider.h:9,
                    from drivers/clk/clk-bm1880.c:9:
   include/asm-generic/div64.h:239:25: warning: right shift count >= width of type [-Wshift-count-overflow]
     } else if (likely(((n) >> 32) == 0)) {  \
                            ^
   include/linux/compiler.h:77:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   drivers/clk/clk-bm1880.c:488:2: note: in expansion of macro 'do_div'
     do_div(numerator, denominator);
     ^~~~~~
   In file included from arch/arm/include/asm/div64.h:127:0,
                    from include/linux/kernel.h:18,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers/clk/clk-bm1880.c:9:
>> include/asm-generic/div64.h:243:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
      __rem = __div64_32(&(n), __base); \
                         ^
   drivers/clk/clk-bm1880.c:488:2: note: in expansion of macro 'do_div'
     do_div(numerator, denominator);
     ^~~~~~
   In file included from include/linux/kernel.h:18:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers/clk/clk-bm1880.c:9:
   arch/arm/include/asm/div64.h:33:24: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'long unsigned int *'
    static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
                           ^~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from arch/arm/include/asm/div64.h:127:0,
                    from include/linux/kernel.h:18,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers//clk/clk-bm1880.c:9:
   drivers//clk/clk-bm1880.c: In function 'bm1880_pll_rate_calc':
   include/asm-generic/div64.h:226:28: warning: comparison of distinct pointer types lacks a cast
     (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                               ^
   drivers//clk/clk-bm1880.c:488:2: note: in expansion of macro 'do_div'
     do_div(numerator, denominator);
     ^~~~~~
   In file included from arch/arm/include/asm/bitops.h:27:0,
                    from include/linux/bitops.h:19,
                    from include/linux/of.h:15,
                    from include/linux/clk-provider.h:9,
                    from drivers//clk/clk-bm1880.c:9:
   include/asm-generic/div64.h:239:25: warning: right shift count >= width of type [-Wshift-count-overflow]
     } else if (likely(((n) >> 32) == 0)) {  \
                            ^
   include/linux/compiler.h:77:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   drivers//clk/clk-bm1880.c:488:2: note: in expansion of macro 'do_div'
     do_div(numerator, denominator);
     ^~~~~~
   In file included from arch/arm/include/asm/div64.h:127:0,
                    from include/linux/kernel.h:18,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers//clk/clk-bm1880.c:9:
>> include/asm-generic/div64.h:243:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
      __rem = __div64_32(&(n), __base); \
                         ^
   drivers//clk/clk-bm1880.c:488:2: note: in expansion of macro 'do_div'
     do_div(numerator, denominator);
     ^~~~~~
   In file included from include/linux/kernel.h:18:0,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers//clk/clk-bm1880.c:9:
   arch/arm/include/asm/div64.h:33:24: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'long unsigned int *'
    static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
                           ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/__div64_32 +243 include/asm-generic/div64.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  219  
^1da177e4c3f41 Linus Torvalds 2005-04-16  220  /* The unnecessary pointer compare is there
^1da177e4c3f41 Linus Torvalds 2005-04-16  221   * to check for type safety (n must be 64bit)
^1da177e4c3f41 Linus Torvalds 2005-04-16  222   */
^1da177e4c3f41 Linus Torvalds 2005-04-16  223  # define do_div(n,base) ({				\
^1da177e4c3f41 Linus Torvalds 2005-04-16  224  	uint32_t __base = (base);			\
^1da177e4c3f41 Linus Torvalds 2005-04-16  225  	uint32_t __rem;					\
^1da177e4c3f41 Linus Torvalds 2005-04-16  226  	(void)(((typeof((n)) *)0) == ((uint64_t *)0));	\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  227  	if (__builtin_constant_p(__base) &&		\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  228  	    is_power_of_2(__base)) {			\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  229  		__rem = (n) & (__base - 1);		\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  230  		(n) >>= ilog2(__base);			\
461a5e51060c93 Nicolas Pitre  2015-10-30  231  	} else if (__div64_const32_is_OK &&		\
461a5e51060c93 Nicolas Pitre  2015-10-30  232  		   __builtin_constant_p(__base) &&	\
461a5e51060c93 Nicolas Pitre  2015-10-30  233  		   __base != 0) {			\
461a5e51060c93 Nicolas Pitre  2015-10-30  234  		uint32_t __res_lo, __n_lo = (n);	\
461a5e51060c93 Nicolas Pitre  2015-10-30  235  		(n) = __div64_const32(n, __base);	\
461a5e51060c93 Nicolas Pitre  2015-10-30  236  		/* the remainder can be computed with 32-bit regs */ \
461a5e51060c93 Nicolas Pitre  2015-10-30  237  		__res_lo = (n);				\
461a5e51060c93 Nicolas Pitre  2015-10-30  238  		__rem = __n_lo - __res_lo * __base;	\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  239  	} else if (likely(((n) >> 32) == 0)) {		\
^1da177e4c3f41 Linus Torvalds 2005-04-16  240  		__rem = (uint32_t)(n) % __base;		\
^1da177e4c3f41 Linus Torvalds 2005-04-16  241  		(n) = (uint32_t)(n) / __base;		\
^1da177e4c3f41 Linus Torvalds 2005-04-16  242  	} else 						\
^1da177e4c3f41 Linus Torvalds 2005-04-16 @243  		__rem = __div64_32(&(n), __base);	\
^1da177e4c3f41 Linus Torvalds 2005-04-16  244  	__rem;						\
^1da177e4c3f41 Linus Torvalds 2005-04-16  245   })
^1da177e4c3f41 Linus Torvalds 2005-04-16  246  

:::::: The code at line 243 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

---
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" (72026 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ