[radeon-alex:drm-next-4.20-wip 99/258] include/asm-generic/div64.h:239:22: error: passing argument 1 of '__div64_32' from incompatible pointer type
kbuild test robot
lkp at intel.com
Tue Sep 4 15:57:42 UTC 2018
Hi Evan,
FYI, the error/warning still remains.
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.20-wip
head: 6abc0c8f8cf3e0c47707b01f027f9f9b9aa75646
commit: d617d4d73043bc4cbc316a7a1b4370fa5bc26a31 [99/258] drm/amd/powerplay: new interfaces for overdrive vega20 sclk and mclk
config: microblaze-allyesconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d617d4d73043bc4cbc316a7a1b4370fa5bc26a31
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=microblaze
:::::: branch date: 2 days ago
:::::: commit date: 8 days ago
All errors (new ones prefixed by >>):
In file included from ./arch/microblaze/include/generated/asm/div64.h:1,
from include/linux/kernel.h:207,
from include/linux/delay.h:22,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:24:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c: In function 'vega20_set_sclk_od':
include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^~
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:1200:2: note: in expansion of macro 'do_div'
do_div(od_sclk, 100);
^~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/delay.h:22,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:24:
include/asm-generic/div64.h:235:25: warning: right shift count >= width of type [-Wshift-count-overflow]
} else if (likely(((n) >> 32) == 0)) { \
^~
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:1200:2: note: in expansion of macro 'do_div'
do_div(od_sclk, 100);
^~~~~~
In file included from ./arch/microblaze/include/generated/asm/div64.h:1,
from include/linux/kernel.h:207,
from include/linux/delay.h:22,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:24:
>> include/asm-generic/div64.h:239:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
__rem = __div64_32(&(n), __base); \
^~~~
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:1200:2: note: in expansion of macro 'do_div'
do_div(od_sclk, 100);
^~~~~~
include/asm-generic/div64.h:213:38: note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'uint32_t *' {aka 'unsigned int *'}
extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
~~~~~~~~~~^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c: In function 'vega20_set_mclk_od':
include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^~
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:1247:2: note: in expansion of macro 'do_div'
do_div(od_mclk, 100);
^~~~~~
In file included from include/linux/kernel.h:10,
from include/linux/delay.h:22,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:24:
include/asm-generic/div64.h:235:25: warning: right shift count >= width of type [-Wshift-count-overflow]
} else if (likely(((n) >> 32) == 0)) { \
^~
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:1247:2: note: in expansion of macro 'do_div'
do_div(od_mclk, 100);
^~~~~~
In file included from ./arch/microblaze/include/generated/asm/div64.h:1,
from include/linux/kernel.h:207,
from include/linux/delay.h:22,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:24:
>> include/asm-generic/div64.h:239:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
__rem = __div64_32(&(n), __base); \
^~~~
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega20_hwmgr.c:1247:2: note: in expansion of macro 'do_div'
do_div(od_mclk, 100);
^~~~~~
include/asm-generic/div64.h:213:38: note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'uint32_t *' {aka 'unsigned int *'}
extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
~~~~~~~~~~^~~~~~~~
cc1: some warnings being treated as errors
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git remote update radeon-alex
git checkout d617d4d73043bc4cbc316a7a1b4370fa5bc26a31
vim +/__div64_32 +239 include/asm-generic/div64.h
^1da177e Linus Torvalds 2005-04-16 215
^1da177e Linus Torvalds 2005-04-16 216 /* The unnecessary pointer compare is there
^1da177e Linus Torvalds 2005-04-16 217 * to check for type safety (n must be 64bit)
^1da177e Linus Torvalds 2005-04-16 218 */
^1da177e Linus Torvalds 2005-04-16 219 # define do_div(n,base) ({ \
^1da177e Linus Torvalds 2005-04-16 220 uint32_t __base = (base); \
^1da177e Linus Torvalds 2005-04-16 221 uint32_t __rem; \
^1da177e Linus Torvalds 2005-04-16 222 (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
911918aa Nicolas Pitre 2015-11-02 223 if (__builtin_constant_p(__base) && \
911918aa Nicolas Pitre 2015-11-02 224 is_power_of_2(__base)) { \
911918aa Nicolas Pitre 2015-11-02 225 __rem = (n) & (__base - 1); \
911918aa Nicolas Pitre 2015-11-02 226 (n) >>= ilog2(__base); \
461a5e51 Nicolas Pitre 2015-10-30 227 } else if (__div64_const32_is_OK && \
461a5e51 Nicolas Pitre 2015-10-30 228 __builtin_constant_p(__base) && \
461a5e51 Nicolas Pitre 2015-10-30 229 __base != 0) { \
461a5e51 Nicolas Pitre 2015-10-30 230 uint32_t __res_lo, __n_lo = (n); \
461a5e51 Nicolas Pitre 2015-10-30 231 (n) = __div64_const32(n, __base); \
461a5e51 Nicolas Pitre 2015-10-30 232 /* the remainder can be computed with 32-bit regs */ \
461a5e51 Nicolas Pitre 2015-10-30 233 __res_lo = (n); \
461a5e51 Nicolas Pitre 2015-10-30 234 __rem = __n_lo - __res_lo * __base; \
911918aa Nicolas Pitre 2015-11-02 235 } else if (likely(((n) >> 32) == 0)) { \
^1da177e Linus Torvalds 2005-04-16 236 __rem = (uint32_t)(n) % __base; \
^1da177e Linus Torvalds 2005-04-16 237 (n) = (uint32_t)(n) / __base; \
^1da177e Linus Torvalds 2005-04-16 238 } else \
^1da177e Linus Torvalds 2005-04-16 @239 __rem = __div64_32(&(n), __base); \
^1da177e Linus Torvalds 2005-04-16 240 __rem; \
^1da177e Linus Torvalds 2005-04-16 241 })
^1da177e Linus Torvalds 2005-04-16 242
:::::: The code at line 239 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds at ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds at ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 54643 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180904/e50b6c12/attachment-0001.gz>
More information about the dri-devel
mailing list