devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: kbuild-all@lists.01.org, sboyd@kernel.org,
	mturquette@baylibre.com, robh+dt@kernel.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	haitao.suo@bitmain.com, darren.tsao@bitmain.com,
	fisher.cheng@bitmain.com, alec.lin@bitmain.com,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH v6 6/7] clk: Add common clock driver for BM1880 SoC
Date: Wed, 30 Oct 2019 11:44:41 +0800	[thread overview]
Message-ID: <201910301128.2cDas58o%lkp@intel.com> (raw)
In-Reply-To: <20191026110253.18426-7-manivannan.sadhasivam@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 9313 bytes --]

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@intel.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@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 72026 bytes --]

  parent reply	other threads:[~2019-10-30  3:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26 11:02 [PATCH v6 0/7] Add Bitmain BM1880 clock driver Manivannan Sadhasivam
2019-10-26 11:02 ` [PATCH v6 1/7] clk: Zero init clk_init_data in helpers Manivannan Sadhasivam
2019-10-26 11:02 ` [PATCH v6 2/7] clk: Add clk_hw_unregister_composite helper function definition Manivannan Sadhasivam
2019-10-26 11:02 ` [PATCH v6 3/7] dt-bindings: clock: Add devicetree binding for BM1880 SoC Manivannan Sadhasivam
2019-10-26 11:02 ` [PATCH v6 4/7] arm64: dts: bitmain: Add clock controller support " Manivannan Sadhasivam
2019-10-26 11:02 ` [PATCH v6 5/7] arm64: dts: bitmain: Source common clock for UART controllers Manivannan Sadhasivam
2019-10-26 11:02 ` [PATCH v6 6/7] clk: Add common clock driver for BM1880 SoC Manivannan Sadhasivam
2019-10-29  9:01   ` kbuild test robot
2019-10-30  3:44   ` kbuild test robot [this message]
2019-10-26 11:02 ` [PATCH v6 7/7] MAINTAINERS: Add entry for BM1880 SoC clock driver Manivannan Sadhasivam
2019-11-13 22:21 ` [PATCH v6 0/7] Add Bitmain BM1880 " Stephen Boyd
2019-11-14  5:34   ` Manivannan Sadhasivam
2019-11-14  5:50     ` Stephen Boyd
2019-11-14  6:09       ` Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910301128.2cDas58o%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alec.lin@bitmain.com \
    --cc=darren.tsao@bitmain.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fisher.cheng@bitmain.com \
    --cc=haitao.suo@bitmain.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).