hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9SOCR
---------------------------
Fix three false positive warning options for Bisheng Clang.
Exclude -Walign-mismatch for: block/blk-mq.c:767:51: warning: passing 8-byte aligned argument to 32-byte aligned parameter 2 of 'smp_call_function_single_async' may result in an unaligned pointer access [-Walign-mismatch] smp_call_function_single_async(rq->mq_ctx->cpu, &rq->csd); ^
Exclude -Wbitwise-instead-of-logical for: fs/namei.c:2053:13: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] } while (!(has_zero(a, &adata, &constants) | has_zero(b, &bdata,... ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ || fs/namei.c:2053:13: note: cast one or both operands to int to silence this warning
Exclude -Wmacro-redefined for: ./arch/arm64/include/asm/elf.h:218:9: warning: 'COMPAT_ARCH_DLINFO' macro redefined [-Wmacro-redefined] #define COMPAT_ARCH_DLINFO \ ^ arch/arm64/kernel/binfmt_elf32.c:22:9: note: previous definition is here #define COMPAT_ARCH_DLINFO
Signed-off-by: Chen Zhongjin chenzhongjin@huawei.com --- arch/arm64/kernel/Makefile | 3 +++ block/Makefile | 3 +++ fs/Makefile | 3 +++ 3 files changed, 9 insertions(+)
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index c839a123aa4c7..5b9951b6fb052 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -32,6 +32,9 @@ $(obj)/%.stub.o: $(obj)/%.o FORCE
obj-$(CONFIG_AARCH32_EL0) += binfmt_elf32.o sys32.o signal32.o \ sys_compat.o +ifdef CONFIG_CC_IS_CLANG +CFLAGS_binfmt_elf32.o := $(call cc-disable-warning, macro-redefined) +endif obj-$(CONFIG_AARCH32_EL0) += sigreturn32.o obj-$(CONFIG_KUSER_HELPERS) += kuser32.o obj-$(CONFIG_ARM64_ILP32) += binfmt_ilp32.o sys_ilp32.o \ diff --git a/block/Makefile b/block/Makefile index 8d841f5f986fe..29814c6bb2df8 100644 --- a/block/Makefile +++ b/block/Makefile @@ -9,6 +9,9 @@ obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-sysfs.o \ blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \ blk-mq-sysfs.o blk-mq-cpumap.o blk-mq-sched.o ioctl.o \ genhd.o ioprio.o badblocks.o partitions/ blk-rq-qos.o +ifdef CONFIG_CC_IS_CLANG +CFLAGS_blk-mq.o := $(call cc-disable-warning, align-mismatch) +endif
obj-$(CONFIG_BOUNCE) += bounce.o obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_ioctl.o diff --git a/fs/Makefile b/fs/Makefile index 2a756dda52e56..29cc13ba2c088 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -15,6 +15,9 @@ obj-y := open.o read_write.o file_table.o super.o \ stack.o fs_struct.o statfs.o fs_pin.o nsfs.o \ fs_types.o fs_context.o fs_parser.o fsopen.o init.o \ kernel_read_file.o remap_range.o +ifdef CONFIG_CC_IS_CLANG +CFLAGS_namei.o := $(call cc-disable-warning, bitwise-instead-of-logical) +endif
ifeq ($(CONFIG_BLOCK),y) obj-y += buffer.o block_dev.o direct-io.o mpage.o