tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
deferred-inactivation-5.14
head: 77e8ee4ef7dcff86e0848e876cff8de28808a253
commit: ff61fd32f3a0f1bb9794d9f8fc02de5ec9c2fb40 [20/24] xfs: parallelize inode
inactivation
config: arm-randconfig-r006-20210613 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
d2012d965d60c3258b3a69d024491698f8aec386)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs deferred-inactivation-5.14
git checkout ff61fd32f3a0f1bb9794d9f8fc02de5ec9c2fb40
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
> fs/xfs/xfs_mount.c:373:2: warning: comparison of distinct pointer
types ('typeof ((ag_space)) *' (aka 'unsigned int *') and 'uint64_t
*' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:228:28: note: expanded from macro 'do_div'
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
> fs/xfs/xfs_mount.c:373:2: error: incompatible pointer types
passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'uint64_t *' (aka 'unsigned long long *')
[-Werror,-Wincompatible-pointer-types]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:245:22: note: expanded from macro 'do_div'
__rem = __div64_32(&(n), __base); \
^~~~
arch/arm/include/asm/div64.h:24:45: note: passing argument to parameter 'n'
here
static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
^
> fs/xfs/xfs_mount.c:373:2: warning: shift count >= width of
type [-Wshift-count-overflow]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:241:25: note: expanded from macro 'do_div'
} else if (likely(((n) >> 32) == 0)) { \
^ ~~
include/linux/compiler.h:45:39: note: expanded from macro 'likely'
# define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
> fs/xfs/xfs_mount.c:373:2: warning: shift count >= width of
type [-Wshift-count-overflow]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:241:25: note: expanded from macro 'do_div'
} else if (likely(((n) >> 32) == 0)) { \
^ ~~
include/linux/compiler.h:45:66: note: expanded from macro 'likely'
# define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
^
include/linux/compiler.h:35:19: note: expanded from macro '__branch_check__'
expect, is_constant); \
^~~~~~~~~~~
3 warnings and 1 error generated.
vim +373 fs/xfs/xfs_mount.c
360
361 /*
362 * precalculate the low space thresholds for dynamic speculative preallocation.
363 */
364 void
365 xfs_set_low_space_thresholds(
366 struct xfs_mount *mp)
367 {
368 uint64_t space = mp->m_sb.sb_dblocks;
369 uint32_t ag_space = mp->m_sb.sb_agblocks;
370 int i;
371
372 do_div(space, 100);
373 do_div(ag_space, 100);
374
375 for (i = 0; i < XFS_LOWSP_MAX; i++) {
376 mp->m_low_space[i] = space * (i + 1);
377 mp->m_ag_low_space[i] = ag_space * (i + 1);
378 }
379 }
380
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org