From: Matthias Kaehlcke Date: Fri, 21 Apr 2017 23:00:56 +0000 (-0700) Subject: CHROMIUM: arm64: Disable asm-operand-width warning for clang X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c82740b2d75be3d6a6ebf8209f45ff90e518315;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git CHROMIUM: arm64: Disable asm-operand-width warning for clang clang raises 'asm-operand-widths' warnings in inline assembly code when the size of an operand is < 64 bits and the operand width is unspecified. Most warnings are raised in macros, i.e. the datatype of the operand may vary. Most of these warnings are fixed in upstream, however we consider it isn't worth the effort/risk to backport all the necessary changes. On future CrOS kernels >= v4.13 the warning should be re-enabled. Change-Id: Ie44748344853f5a394879718ad5d6f610f3c396a Signed-off-by: Matthias Kaehlcke --- diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index a3bda11406e4..62274e34d78e 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -95,6 +95,10 @@ else TEXT_OFFSET := 0x00080000 endif +ifeq ($(cc-name),clang) +KBUILD_CFLAGS += $(call cc-disable-warning, asm-operand-widths) +endif + # KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61) # in 32-bit arithmetic KASAN_SHADOW_OFFSET := $(shell printf "0x%08x00000000\n" $$(( \