[csky-linux:riscv_compat_v5 6/21] arch/arm64/include/asm/compat.h:69:8: error: redefinition of 'compat_statfs'

From: kernel test robot
Date: Tue Feb 01 2022 - 11:10:38 EST


tree: https://github.com/c-sky/csky-linux riscv_compat_v5
head: 653df84165a3999569804361df88af1a54d58180
commit: ec2542a61a8a75165df0c14f215f6b4f3821ee36 [6/21] asm-generic: compat: Cleanup duplicate definitions
config: arm64-randconfig-r031-20220130 (https://download.01.org/0day-ci/archive/20220202/202202020013.HE3OoT9n-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/c-sky/csky-linux/commit/ec2542a61a8a75165df0c14f215f6b4f3821ee36
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux riscv_compat_v5
git checkout ec2542a61a8a75165df0c14f215f6b4f3821ee36
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:22:
In file included from include/linux/stat.h:6:
In file included from arch/arm64/include/asm/stat.h:13:
>> arch/arm64/include/asm/compat.h:69:8: error: redefinition of 'compat_statfs'
struct compat_statfs {
^
include/asm-generic/compat.h:80:8: note: previous definition is here
struct compat_statfs {
^
1 error generated.
make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1191: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.


vim +/compat_statfs +69 arch/arm64/include/asm/compat.h

3dd681d944f6d8 Will Deacon 2012-03-05 68
3dd681d944f6d8 Will Deacon 2012-03-05 @69 struct compat_statfs {
3dd681d944f6d8 Will Deacon 2012-03-05 70 int f_type;
3dd681d944f6d8 Will Deacon 2012-03-05 71 int f_bsize;
3dd681d944f6d8 Will Deacon 2012-03-05 72 int f_blocks;
3dd681d944f6d8 Will Deacon 2012-03-05 73 int f_bfree;
3dd681d944f6d8 Will Deacon 2012-03-05 74 int f_bavail;
3dd681d944f6d8 Will Deacon 2012-03-05 75 int f_files;
3dd681d944f6d8 Will Deacon 2012-03-05 76 int f_ffree;
3dd681d944f6d8 Will Deacon 2012-03-05 77 compat_fsid_t f_fsid;
3dd681d944f6d8 Will Deacon 2012-03-05 78 int f_namelen; /* SunOS ignores this field. */
3dd681d944f6d8 Will Deacon 2012-03-05 79 int f_frsize;
3dd681d944f6d8 Will Deacon 2012-03-05 80 int f_flags;
3dd681d944f6d8 Will Deacon 2012-03-05 81 int f_spare[4];
3dd681d944f6d8 Will Deacon 2012-03-05 82 };
3dd681d944f6d8 Will Deacon 2012-03-05 83

:::::: The code at line 69 was first introduced by commit
:::::: 3dd681d944f6d861f12ee03aff17a14342963330 arm64: 32-bit (compat) applications support

:::::: TO: Will Deacon <will.deacon@xxxxxxx>
:::::: CC: Catalin Marinas <catalin.marinas@xxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx