From: Greg Kroah-Hartman Date: Tue, 4 Dec 2018 10:35:24 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.19.7~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e925bffa00be9c8f265b43bbc8ccfa9b55a84415;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: arm-8766-1-drop-no-thumb-interwork-in-eabi-mode.patch arm-8767-1-add-support-for-building-arm-kernel-with-clang.patch arm-trusted_foundations-do-not-use-naked-function.patch bus-arm-cci-remove-unnecessary-unreachable.patch efi-libstub-arm-support-building-with-clang.patch efi-libstub-make-file-i-o-chunking-x86-specific.patch kbuild-set-kbuild_cflags-before-incl.-arch-makefile.patch workqueue-avoid-clang-warning.patch --- diff --git a/queue-4.9/arm-8766-1-drop-no-thumb-interwork-in-eabi-mode.patch b/queue-4.9/arm-8766-1-drop-no-thumb-interwork-in-eabi-mode.patch new file mode 100644 index 00000000000..0fb4a3a592e --- /dev/null +++ b/queue-4.9/arm-8766-1-drop-no-thumb-interwork-in-eabi-mode.patch @@ -0,0 +1,35 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Stefan Agner +Date: Tue, 8 May 2018 22:49:49 +0100 +Subject: ARM: 8766/1: drop no-thumb-interwork in EABI mode + +From: Stefan Agner + +(commit 22905a24306c8c312c2d66da9f90d09af0414f81 upstream) + +According to GCC documentation -m(no-)thumb-interwork is +meaningless in AAPCS configurations. Also clang does not +support the flag: + clang-5.0: error: unknown argument: '-mno-thumb-interwork' + +Just drop -mno-thumb-interwork in AEABI configuration. + +Signed-off-by: Stefan Agner +Signed-off-by: Russell King +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/Makefile ++++ b/arch/arm/Makefile +@@ -104,7 +104,7 @@ tune-$(CONFIG_CPU_V6K) =$(call cc-optio + tune-y := $(tune-y) + + ifeq ($(CONFIG_AEABI),y) +-CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp ++CFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp + else + CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) + endif diff --git a/queue-4.9/arm-8767-1-add-support-for-building-arm-kernel-with-clang.patch b/queue-4.9/arm-8767-1-add-support-for-building-arm-kernel-with-clang.patch new file mode 100644 index 00000000000..68dd514e1be --- /dev/null +++ b/queue-4.9/arm-8767-1-add-support-for-building-arm-kernel-with-clang.patch @@ -0,0 +1,34 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Stefan Agner +Date: Tue, 8 May 2018 22:50:38 +0100 +Subject: ARM: 8767/1: add support for building ARM kernel with clang + +From: Stefan Agner + +(commit c1c386681bd73c4fc28eb5cc91cf8b7be9b409ba upstream) + +Use cc-options call for compiler options which are not available +in clang. With this patch an ARMv7 multi platform kernel can be +successfully build using clang (tested with version 5.0.1). + +Based-on-patches-by: Behan Webster + +Signed-off-by: Stefan Agner +Signed-off-by: Russell King +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/compressed/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/compressed/Makefile ++++ b/arch/arm/boot/compressed/Makefile +@@ -112,7 +112,7 @@ CFLAGS_fdt_ro.o := $(nossp_flags) + CFLAGS_fdt_rw.o := $(nossp_flags) + CFLAGS_fdt_wip.o := $(nossp_flags) + +-ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj) ++ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj) + asflags-y := -DZIMAGE + + # Supply kernel BSS size to the decompressor via a linker symbol. diff --git a/queue-4.9/arm-trusted_foundations-do-not-use-naked-function.patch b/queue-4.9/arm-trusted_foundations-do-not-use-naked-function.patch new file mode 100644 index 00000000000..779a6b317e3 --- /dev/null +++ b/queue-4.9/arm-trusted_foundations-do-not-use-naked-function.patch @@ -0,0 +1,70 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Stefan Agner +Date: Sun, 25 Mar 2018 20:09:56 +0200 +Subject: ARM: trusted_foundations: do not use naked function + +From: Stefan Agner + +(commit 4ea7bdc6b5b33427bbd3f41c333e21c1825462a3 upstream) + +As documented in GCC naked functions should only use basic ASM +syntax. The extended ASM or mixture of basic ASM and "C" code is +not guaranteed. Currently this works because it was hard coded +to follow and check GCC behavior for arguments and register +placement. + +Furthermore with clang using parameters in Extended asm in a +naked function is not supported: + arch/arm/firmware/trusted_foundations.c:47:10: error: parameter + references not allowed in naked functions + : "r" (type), "r" (arg1), "r" (arg2) + ^ + +Use a regular function to be more portable. This aligns also with +the other SMC call implementations e.g. in qcom_scm-32.c and +bcm_kona_smc.c. + +Cc: Dmitry Osipenko +Cc: Stephen Warren +Cc: Thierry Reding +Signed-off-by: Stefan Agner +Signed-off-by: Thierry Reding +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/firmware/trusted_foundations.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +--- a/arch/arm/firmware/trusted_foundations.c ++++ b/arch/arm/firmware/trusted_foundations.c +@@ -31,21 +31,25 @@ + + static unsigned long cpu_boot_addr; + +-static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2) ++static void tf_generic_smc(u32 type, u32 arg1, u32 arg2) + { ++ register u32 r0 asm("r0") = type; ++ register u32 r1 asm("r1") = arg1; ++ register u32 r2 asm("r2") = arg2; ++ + asm volatile( + ".arch_extension sec\n\t" +- "stmfd sp!, {r4 - r11, lr}\n\t" ++ "stmfd sp!, {r4 - r11}\n\t" + __asmeq("%0", "r0") + __asmeq("%1", "r1") + __asmeq("%2", "r2") + "mov r3, #0\n\t" + "mov r4, #0\n\t" + "smc #0\n\t" +- "ldmfd sp!, {r4 - r11, pc}" ++ "ldmfd sp!, {r4 - r11}\n\t" + : +- : "r" (type), "r" (arg1), "r" (arg2) +- : "memory"); ++ : "r" (r0), "r" (r1), "r" (r2) ++ : "memory", "r3", "r12", "lr"); + } + + static int tf_set_cpu_boot_addr(int cpu, unsigned long boot_addr) diff --git a/queue-4.9/bus-arm-cci-remove-unnecessary-unreachable.patch b/queue-4.9/bus-arm-cci-remove-unnecessary-unreachable.patch new file mode 100644 index 00000000000..5128149fcab --- /dev/null +++ b/queue-4.9/bus-arm-cci-remove-unnecessary-unreachable.patch @@ -0,0 +1,46 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Stefan Agner +Date: Tue, 8 May 2018 16:27:26 +0200 +Subject: bus: arm-cci: remove unnecessary unreachable() + +From: Stefan Agner + +(commit 10d8713429d345867fc8998d6193b233c0cab28c upstream) + +Mixing asm and C code is not recommended in a naked function by +gcc and leads to an error when using clang: + drivers/bus/arm-cci.c:2107:2: error: non-ASM statement in naked + function is not supported + unreachable(); + ^ + +While the function is marked __naked it actually properly return +in asm. There is no need for the unreachable() call. + +GCC 7.2 generates identical object files before and after, other +than (for obvious reasons) the line numbers generated by +WANT_WARN_ON_SLOWPATH for all the WARN()s appearing later in the +file. + +Suggested-by: Russell King +Signed-off-by: Stefan Agner +Acked-by: Nicolas Pitre +Reviewed-by: Robin Murphy +Signed-off-by: Olof Johansson +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + drivers/bus/arm-cci.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/bus/arm-cci.c ++++ b/drivers/bus/arm-cci.c +@@ -2103,8 +2103,6 @@ asmlinkage void __naked cci_enable_port_ + [sizeof_struct_cpu_port] "i" (sizeof(struct cpu_port)), + [sizeof_struct_ace_port] "i" (sizeof(struct cci_ace_port)), + [offsetof_port_phys] "i" (offsetof(struct cci_ace_port, phys)) ); +- +- unreachable(); + } + + /** diff --git a/queue-4.9/efi-libstub-arm-support-building-with-clang.patch b/queue-4.9/efi-libstub-arm-support-building-with-clang.patch new file mode 100644 index 00000000000..4f1e3fdfdfe --- /dev/null +++ b/queue-4.9/efi-libstub-arm-support-building-with-clang.patch @@ -0,0 +1,41 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Alistair Strachan +Date: Mon, 3 Dec 2018 11:40:57 -0800 +Subject: efi/libstub: arm: support building with clang + +From: Alistair Strachan + +(commit 41f1c48420709470c51ee0e54b6fb28b956bb4e0 upstream) + +When building with CONFIG_EFI and CONFIG_EFI_STUB on ARM, the libstub +Makefile would use -mno-single-pic-base without checking it was +supported by the compiler. As the ARM (32-bit) clang backend does not +support this flag, the build would fail. + +This changes the Makefile to check the compiler's support for +-mno-single-pic-base before using it, similar to c1c386681bd7 ("ARM: +8767/1: add support for building ARM kernel with clang"). + +Signed-off-by: Alistair Strachan +Reviewed-by: Stefan Agner +Signed-off-by: Ard Biesheuvel +[ND: adjusted due to missing commit ce279d374ff3 ("efi/libstub: + Only disable stackleak plugin for arm64")] +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + drivers/firmware/efi/libstub/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/firmware/efi/libstub/Makefile ++++ b/drivers/firmware/efi/libstub/Makefile +@@ -12,7 +12,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__K + + cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie + cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ +- -fno-builtin -fpic -mno-single-pic-base ++ -fno-builtin -fpic \ ++ $(call cc-option,-mno-single-pic-base) + + cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt + diff --git a/queue-4.9/efi-libstub-make-file-i-o-chunking-x86-specific.patch b/queue-4.9/efi-libstub-make-file-i-o-chunking-x86-specific.patch new file mode 100644 index 00000000000..032a6899ade --- /dev/null +++ b/queue-4.9/efi-libstub-make-file-i-o-chunking-x86-specific.patch @@ -0,0 +1,75 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Ard Biesheuvel +Date: Mon, 6 Feb 2017 11:22:46 +0000 +Subject: efi/libstub: Make file I/O chunking x86-specific + +From: Ard Biesheuvel + +(commit b3879a4d3a31ef14265a52e8d941cf4b0f6627ae upstream) + +The ARM decompressor is finicky when it comes to uninitialized variables +with local linkage, the reason being that it may relocate .text and .bss +independently when executing from ROM. This is only possible if all +references into .bss from .text are absolute, and this happens to be the +case for references emitted under -fpic to symbols with external linkage, +and so all .bss references must involve symbols with external linkage. + +When building the ARM stub using clang, the initialized local variable +__chunk_size is optimized into a zero-initialized flag that indicates +whether chunking is in effect or not. This flag is therefore emitted into +.bss, which triggers the ARM decompressor's diagnostics, resulting in a +failed build. + +Under UEFI, we never execute the decompressor from ROM, so the diagnostic +makes little sense here. But we can easily work around the issue by making +__chunk_size global instead. + +However, given that the file I/O chunking that is controlled by the +__chunk_size variable is intended to work around known bugs on various +x86 implementations of UEFI, we can simply make the chunking an x86 +specific feature. This is an improvement by itself, and also removes the +need to parse the efi= options in the stub entirely. + +Tested-by: Arnd Bergmann +Signed-off-by: Ard Biesheuvel +Reviewed-by: Matt Fleming +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Cc: linux-efi@vger.kernel.org +Link: http://lkml.kernel.org/r/1486380166-31868-8-git-send-email-ard.biesheuvel@linaro.org +[ Small readability edits. ] +Signed-off-by: Ingo Molnar +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + drivers/firmware/efi/libstub/efi-stub-helper.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/firmware/efi/libstub/efi-stub-helper.c ++++ b/drivers/firmware/efi/libstub/efi-stub-helper.c +@@ -356,6 +356,14 @@ efi_status_t efi_parse_options(char *cmd + char *str; + + /* ++ * Currently, the only efi= option we look for is 'nochunk', which ++ * is intended to work around known issues on certain x86 UEFI ++ * versions. So ignore for now on other architectures. ++ */ ++ if (!IS_ENABLED(CONFIG_X86)) ++ return EFI_SUCCESS; ++ ++ /* + * If no EFI parameters were specified on the cmdline we've got + * nothing to do. + */ +@@ -528,7 +536,8 @@ efi_status_t handle_cmdline_files(efi_sy + size = files[j].size; + while (size) { + unsigned long chunksize; +- if (size > __chunk_size) ++ ++ if (IS_ENABLED(CONFIG_X86) && size > __chunk_size) + chunksize = __chunk_size; + else + chunksize = size; diff --git a/queue-4.9/kbuild-set-kbuild_cflags-before-incl.-arch-makefile.patch b/queue-4.9/kbuild-set-kbuild_cflags-before-incl.-arch-makefile.patch new file mode 100644 index 00000000000..bf3cc7c100d --- /dev/null +++ b/queue-4.9/kbuild-set-kbuild_cflags-before-incl.-arch-makefile.patch @@ -0,0 +1,109 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Chris Fries +Date: Mon, 3 Dec 2018 11:56:19 -0800 +Subject: kbuild: Set KBUILD_CFLAGS before incl. arch Makefile + +From: Chris Fries + +(commit ae6b289a37890909fea0e4a1666e19377fa0ed2c upstream) + +Set the clang KBUILD_CFLAGS up before including arch/ Makefiles, +so that ld-options (etc.) can work correctly. + +This fixes errors with clang such as ld-options trying to CC +against your host architecture, but LD trying to link against +your target architecture. + +Signed-off-by: Chris Fries +Signed-off-by: Nick Desaulniers +Reviewed-by: Matthias Kaehlcke +Tested-by: Matthias Kaehlcke +Signed-off-by: Masahiro Yamada +[ND: adjusted context due to upstream having removed code above where I +placed this block in this backport] +Signed-off-by: Greg Kroah-Hartman +--- + Makefile | 65 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 33 insertions(+), 32 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -509,6 +509,39 @@ ifneq ($(filter install,$(MAKECMDGOALS)) + endif + endif + ++ifeq ($(cc-name),clang) ++ifneq ($(CROSS_COMPILE),) ++CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%)) ++GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) ++endif ++ifneq ($(GCC_TOOLCHAIN),) ++CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN) ++endif ++KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) ++KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) ++KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) ++KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) ++KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) ++KBUILD_CFLAGS += $(call cc-disable-warning, gnu) ++KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) ++# Quiet clang warning: comparison of unsigned expression < 0 is always false ++KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) ++# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the ++# source of a reference will be _MergedGlobals and not on of the whitelisted names. ++# See modpost pattern 2 ++KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) ++KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) ++KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) ++KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) ++else ++ ++# These warnings generated too much noise in a regular build. ++# Use make W=1 to enable them (see scripts/Makefile.build) ++KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) ++KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) ++endif ++ ++ + ifeq ($(mixed-targets),1) + # =========================================================================== + # We're called with mixed targets (*config and build targets). +@@ -704,38 +737,6 @@ ifdef CONFIG_CC_STACKPROTECTOR + endif + KBUILD_CFLAGS += $(stackp-flag) + +-ifeq ($(cc-name),clang) +-ifneq ($(CROSS_COMPILE),) +-CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%)) +-GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) +-endif +-ifneq ($(GCC_TOOLCHAIN),) +-CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN) +-endif +-KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) +-KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) +-KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) +-KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) +-KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) +-KBUILD_CFLAGS += $(call cc-disable-warning, gnu) +-KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) +-# Quiet clang warning: comparison of unsigned expression < 0 is always false +-KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) +-# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the +-# source of a reference will be _MergedGlobals and not on of the whitelisted names. +-# See modpost pattern 2 +-KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) +-KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) +-KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) +-KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) +-else +- +-# These warnings generated too much noise in a regular build. +-# Use make W=1 to enable them (see scripts/Makefile.build) +-KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) +-KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) +-endif +- + ifdef CONFIG_FRAME_POINTER + KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + else diff --git a/queue-4.9/series b/queue-4.9/series index bb8e08a4521..ca738282744 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -40,3 +40,11 @@ iio-st_magn-fix-enable-device-after-trigger.patch mm-use-swp_offset-as-key-in-shmem_replace_page.patch drivers-hv-vmbus-check-the-creation_status-in-vmbus_establish_gpadl.patch misc-mic-scif-fix-copy-paste-error-in-scif_create_remote_lookup.patch +efi-libstub-arm-support-building-with-clang.patch +arm-8766-1-drop-no-thumb-interwork-in-eabi-mode.patch +arm-8767-1-add-support-for-building-arm-kernel-with-clang.patch +bus-arm-cci-remove-unnecessary-unreachable.patch +arm-trusted_foundations-do-not-use-naked-function.patch +workqueue-avoid-clang-warning.patch +efi-libstub-make-file-i-o-chunking-x86-specific.patch +kbuild-set-kbuild_cflags-before-incl.-arch-makefile.patch diff --git a/queue-4.9/workqueue-avoid-clang-warning.patch b/queue-4.9/workqueue-avoid-clang-warning.patch new file mode 100644 index 00000000000..e38e89919eb --- /dev/null +++ b/queue-4.9/workqueue-avoid-clang-warning.patch @@ -0,0 +1,58 @@ +From foo@baz Tue Dec 4 11:34:44 CET 2018 +From: Arnd Bergmann +Date: Wed, 1 Feb 2017 18:01:17 +0100 +Subject: workqueue: avoid clang warning + +From: Arnd Bergmann + +(commit a45463cbf3f9dcdae683033c256f50bded513d6a upstream) + +Building with clang shows lots of warning like: + +drivers/amba/bus.c:447:8: warning: implicit conversion from 'long long' to 'int' changes value from 4294967248 to -48 + [-Wconstant-conversion] +static DECLARE_DELAYED_WORK(deferred_retry_work, amba_deferred_retry_func); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +include/linux/workqueue.h:187:26: note: expanded from macro 'DECLARE_DELAYED_WORK' + struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, 0) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +include/linux/workqueue.h:177:10: note: expanded from macro '__DELAYED_WORK_INITIALIZER' + .work = __WORK_INITIALIZER((n).work, (f)), \ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +include/linux/workqueue.h:170:10: note: expanded from macro '__WORK_INITIALIZER' + .data = WORK_DATA_STATIC_INIT(), \ + ^~~~~~~~~~~~~~~~~~~~~~~ +include/linux/workqueue.h:111:39: note: expanded from macro 'WORK_DATA_STATIC_INIT' + ATOMIC_LONG_INIT(WORK_STRUCT_NO_POOL | WORK_STRUCT_STATIC) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ +include/asm-generic/atomic-long.h:32:41: note: expanded from macro 'ATOMIC_LONG_INIT' + #define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i) + ~~~~~~~~~~~~^~ +arch/arm/include/asm/atomic.h:21:27: note: expanded from macro 'ATOMIC_INIT' + #define ATOMIC_INIT(i) { (i) } + ~ ^ + +This makes the type cast explicit, which shuts up the warning. + +Signed-off-by: Arnd Bergmann +Signed-off-by: Tejun Heo +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/workqueue.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/include/linux/workqueue.h ++++ b/include/linux/workqueue.h +@@ -106,9 +106,9 @@ struct work_struct { + #endif + }; + +-#define WORK_DATA_INIT() ATOMIC_LONG_INIT(WORK_STRUCT_NO_POOL) ++#define WORK_DATA_INIT() ATOMIC_LONG_INIT((unsigned long)WORK_STRUCT_NO_POOL) + #define WORK_DATA_STATIC_INIT() \ +- ATOMIC_LONG_INIT(WORK_STRUCT_NO_POOL | WORK_STRUCT_STATIC) ++ ATOMIC_LONG_INIT((unsigned long)(WORK_STRUCT_NO_POOL | WORK_STRUCT_STATIC)) + + struct delayed_work { + struct work_struct work;