From nobody Sat Feb 7 01:42:10 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A38562E06D2; Fri, 17 Oct 2025 16:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760720031; cv=none; b=dwHTEx7vu+oitMEnCu0M8qaE/WuEJAn+wIRgd4HKBbpGprDFYOK08UGcWgiQT6YLSYizcLm/yqqiDwcH6t5rfKkFu3NGI36wgqUTPC0o7rQVFmf1kOHn5bYGWMCYcF4uTmZaRwSXo87NZ2PJLzobSkDk9Th2/2+8LcEEJbaUUJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760720031; c=relaxed/simple; bh=56kXImUOjI7S0JtfattLR6VoUm8jYTpY84IFUYVfYAo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Lr5pvU0n4DP63eHhd40xA5V1uoy+cxFhRxnpagraA7Cv4mjeYi2tyejBXA+lrePRuvqeRDVOlkAuH9JmS0b9WaQSdwe9XlTKI+4cxoW0ykf1d8zgwYI0CQuVA7N9RtcnkZppsi64anDZLmlF4RDml3Ps/hrwTGkoBuHlH7SsPFg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C1Bg3h5u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C1Bg3h5u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60A99C4CEFE; Fri, 17 Oct 2025 16:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760720031; bh=56kXImUOjI7S0JtfattLR6VoUm8jYTpY84IFUYVfYAo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C1Bg3h5ueGjboU/TprejgVFM0X5oYVxaiYV/tg6jdLnIgNF4Ll/pSmvnEJ5ly+ZGE 3l640KjuYLptQ7+v3YIte0WQxs/sJm1tq7LPfiLq/038dD6lCX0CMcbkVeXMwUGa5M RRdBdNfS3xzDs5zQV2/VpK3bSJQxF3zo9z6FIn8rWH/reR17jhXcon2SQj6c6Hs6oy w0ZdjZfWjHRwt5uyIMRe+d5w1dfdoWZD46u38hI2jvZI2EXfkD+BGWTcSSjN4fiujP EIt0x26lukeeYN2JppehofcFOGHEn0QyzGY2y9UHUoS1k5WMr4nLBYUCDVApA8AB2l KF0HKelxiJnbA== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 18:53:25 +0200 Subject: [PATCH 5.10.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-10-gcc-15-v1-1-cdbbfe1a2100@kernel.org> References: <20251017-v5-10-gcc-15-v1-0-cdbbfe1a2100@kernel.org> In-Reply-To: <20251017-v5-10-gcc-15-v1-0-cdbbfe1a2100@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Alexey Dobriyan , Ingo Molnar , "H. Peter Anvin (Intel)" , Nathan Chancellor , Dave Hansen , Ard Biesheuvel X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3055; i=matttbe@kernel.org; h=from:subject:message-id; bh=Vm/w1YyWqDcVlHEO1pDghuv63FD1ynM2aKxxlwUTgv0=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+lUy7b7z+ZsLLphDGxPjl0w0UHT7tb7biZT8uatT3b M0zdku+jlIWBjEuBlkxRRbptsj8mc+reEu8/Cxg5rAygQxh4OIUgIn4ZjD893v64zhX9mcFm3bW fz0Pnkuuf9SZwK7fMCfXL/OasfNXY0aGfzvjHp3Zzpu05H3qR+8/J3XFP6y482nVS99PXgLHdKN zuQE= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Alexey Dobriyan commit b3bee1e7c3f2b1b77182302c7b2131c804175870 upstream. Use -std=3Dgnu11 for consistency with main kernel code. It doesn't seem to change anything in vmlinux. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Acked-by: H. Peter Anvin (Intel) Link: https://lore.kernel.org/r/2058761e-12a4-4b2f-9690-3c3c1c9902a5@p183 [ This kernel version doesn't build with GCC 15: In file included from include/uapi/linux/posix_types.h:5, from include/uapi/linux/types.h:14, from include/linux/types.h:6, from arch/x86/realmode/rm/wakeup.h:11, from arch/x86/realmode/rm/wakemain.c:2: include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enume= ration constant 11 | false =3D 0, | ^~~~~ include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=3Dc2= 3' onwards include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typed= ef' 30 | typedef _Bool bool; | ^~~~ include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=3Dc23= ' onwards include/linux/types.h:30:1: warning: useless type name in empty declara= tion 30 | typedef _Bool bool; | ^~~~~~~ The fix is similar to commit ee2ab467bddf ("x86/boot: Use '-std=3Dgnu11' to fix build with GCC 15") which has been backported to this kernel. Note: In < 5.18 version, -std=3Dgnu89 is used instead of -std=3Dgnu11, see commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). I suggest not to modify that in this commit here as all the other similar fixes to support GCC 15 set -std=3Dgnu11. This can be done in a dedicated commit if needed. There was a conflict, because commit 2838307b019d ("x86/build: Remove -m16 workaround for unsupported versions of GCC") is not in this version and change code in the context. -std=3Dgnu11 can still be added at the same place. ] Signed-off-by: Matthieu Baerts (NGI0) --- Cc: Nathan Chancellor Cc: Dave Hansen Cc: Ard Biesheuvel --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 8b9fa777f513..f584d07095f1 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,7 +31,7 @@ endif CODE16GCC_CFLAGS :=3D -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h M16_CFLAGS :=3D $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) =20 -REALMODE_CFLAGS :=3D $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__D= ISABLE_EXPORTS \ +REALMODE_CFLAGS :=3D -std=3Dgnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PR= OFILING -D__DISABLE_EXPORTS \ -Wall -Wstrict-prototypes -march=3Di386 -mregparm=3D3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=3Dnone) --=20 2.51.0 From nobody Sat Feb 7 01:42:10 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 931F92EB5BF; Fri, 17 Oct 2025 16:53:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760720033; cv=none; b=YsNV99AdiS6Oolm2udCOLnRGjSmXv74Hpxm8xz6k+21BI4N4wskHa5wK/J4aMXc6lG3aS0P6FD+KCWVQL3rRCGusBG2HxWzO3k8lS0LKKmg8nNEMqiOfOwN80OifwAE6YFgcOQjljKdpolTVf2aJmoogRyjVjaVCyDeAm8hdb3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760720033; c=relaxed/simple; bh=xrkeJwXM+i8qR4svwajAcLC0hPsg40Cv44lw5sc9AZM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oF2Af2OFqc2oYzGiCnEBuKZT0ey4gXwvr21j/TVmtKUE2529mZRTkraHAwUwZNjJQvXhVDK8Of1/B3s1FAnNpn2SpB2kjyTDba97byc6OxUvdjh0S74hf55OTqs6CVUFNGfSHzUb6EhIWM+6uAG/T3IqeTtNGSTjj+NDpuZhiAs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n3rjlwc7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n3rjlwc7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98CC1C4CEE7; Fri, 17 Oct 2025 16:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760720033; bh=xrkeJwXM+i8qR4svwajAcLC0hPsg40Cv44lw5sc9AZM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=n3rjlwc7lvIUVWHU6e8XGCl07SUtnBvQJfGI1luxMfLtNVUOiinNu5BCn1eXJh8rZ FPmzsEye3/LHZA9pUDurcN6rSbUM9dMfdfUqPdvCiW/XRS8+mtHY3Q3dObyWFtrumw zS+d0+yevcoSpnyyVfspPFJSz3iPhlws75d1CueXz+lsDX/JoCJ52XXqqHPMOyjssw CZXj2C9JCGHDM+Uzgun+2EYEIxFY44xXdXXBKAfvUWzt8HwzvN5KJUl5eX07K4HKBb J14lhc4QMBHVFRAKlmYsm/ADsc14atKvuwo9qeUkV4GnAOay1JAmwnDE/jrKMpDt54 OXVqJlyfFlmFQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 18:53:26 +0200 Subject: [PATCH 5.10.y 2/3] arch: back to -std=gnu89 in < v5.18 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-10-gcc-15-v1-2-cdbbfe1a2100@kernel.org> References: <20251017-v5-10-gcc-15-v1-0-cdbbfe1a2100@kernel.org> In-Reply-To: <20251017-v5-10-gcc-15-v1-0-cdbbfe1a2100@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Nathan Chancellor , Ard Biesheuvel , Alexey Dobriyan , Arnd Bergmann X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5509; i=matttbe@kernel.org; h=from:subject:message-id; bh=xrkeJwXM+i8qR4svwajAcLC0hPsg40Cv44lw5sc9AZM=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+lczYwJnhffG91vRAfonulisemuWxc/zKBAoEqrrPJ ZaKlrzqKGVhEONikBVTZJFui8yf+byKt8TLzwJmDisTyBAGLk4BmEi0FCPDhYjJ/fcO3SmaGmL9 W/TVgZ8ntn4/6d+f5B5brHP3z87eZYwMDf42F75qGJ6QfNe+7+vN5HU/rzxXN0ndZLvy+b1qi46 fPAA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Recent fixes have been backported to < v5.18 to fix build issues with GCC 5.15. They all force -std=3Dgnu11 in the CFLAGS, "because [the kernel] requests the gnu11 standard via '-std=3D' in the main Makefile". This is true for >=3D 5.18 versions, but not before. This switch to -std=3Dgnu11 has been done in commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). For a question of uniformity, force -std=3Dgnu89, similar to what is done in the main Makefile. Note: the fixes tags below refers to upstream commits, but this fix is only for kernels not having commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") Fixes: 3b8b80e99376 ("s390: Add '-std=3Dgnu11' to decompressor and purgator= y CFLAGS") Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=3Dgnu11 too") Fixes: ee2ab467bddf ("x86/boot: Use '-std=3Dgnu11' to fix build with GCC 15= ") Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=3Dgnu11' to fix build with GC= C 15") Signed-off-by: Matthieu Baerts (NGI0) --- Note: An alternative is to backport commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"), but I guess we might not want to do that for stable, as it might introduce new warnings. Cc: Nathan Chancellor Cc: Ard Biesheuvel Cc: Alexey Dobriyan Cc: Arnd Bergmann --- arch/parisc/boot/compressed/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/s390/purgatory/Makefile | 2 +- arch/x86/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compre= ssed/Makefile index 4e5aecc263a2..f2efd55a0c81 100644 --- a/arch/parisc/boot/compressed/Makefile +++ b/arch/parisc/boot/compressed/Makefile @@ -22,7 +22,7 @@ KBUILD_CFLAGS +=3D -fno-PIE -mno-space-regs -mdisable-fpr= egs -Os ifndef CONFIG_64BIT KBUILD_CFLAGS +=3D -mfast-indirect-calls endif -KBUILD_CFLAGS +=3D -std=3Dgnu11 +KBUILD_CFLAGS +=3D -std=3Dgnu89 =20 OBJECTS +=3D $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o = $(obj)/piggy.o =20 diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 92f2426d8797..9680c6c9a710 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -23,7 +23,7 @@ endif aflags_dwarf :=3D -Wa,-gdwarf-2 KBUILD_AFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ KBUILD_AFLAGS_DECOMPRESSOR +=3D $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) -KBUILD_CFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -O2 -std=3Dgnu11 +KBUILD_CFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -O2 -std=3Dgnu89 KBUILD_CFLAGS_DECOMPRESSOR +=3D -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR +=3D -fno-delete-null-pointer-checks -msoft-flo= at KBUILD_CFLAGS_DECOMPRESSOR +=3D -fno-asynchronous-unwind-tables diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index 955f113cf320..e03f234fcfbe 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -20,7 +20,7 @@ GCOV_PROFILE :=3D n UBSAN_SANITIZE :=3D n KASAN_SANITIZE :=3D n =20 -KBUILD_CFLAGS :=3D -std=3Dgnu11 -fno-strict-aliasing -Wall -Wstrict-protot= ypes +KBUILD_CFLAGS :=3D -std=3Dgnu89 -fno-strict-aliasing -Wall -Wstrict-protot= ypes KBUILD_CFLAGS +=3D -Wno-pointer-sign -Wno-sign-compare KBUILD_CFLAGS +=3D -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS +=3D -c -MD -Os -m64 -msoft-float -fno-common diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f584d07095f1..9c08f2cd399f 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,7 +31,7 @@ endif CODE16GCC_CFLAGS :=3D -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h M16_CFLAGS :=3D $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) =20 -REALMODE_CFLAGS :=3D -std=3Dgnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PR= OFILING -D__DISABLE_EXPORTS \ +REALMODE_CFLAGS :=3D -std=3Dgnu89 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PR= OFILING -D__DISABLE_EXPORTS \ -Wall -Wstrict-prototypes -march=3Di386 -mregparm=3D3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=3Dnone) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/M= akefile index e1a750baf036..6dd03543235a 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -33,7 +33,7 @@ targets :=3D vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.b= in.bz2 vmlinux.bin.lzma \ # avoid errors with '-march=3Di386', and future flags may depend on the ta= rget to # be valid. KBUILD_CFLAGS :=3D -m$(BITS) -O2 $(CLANG_FLAGS) -KBUILD_CFLAGS +=3D -std=3Dgnu11 +KBUILD_CFLAGS +=3D -std=3Dgnu89 KBUILD_CFLAGS +=3D -fno-strict-aliasing -fPIE KBUILD_CFLAGS +=3D -DDISABLE_BRANCH_PROFILING cflags-$(CONFIG_X86_32) :=3D -march=3Di386 diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/l= ibstub/Makefile index d7bcfe0d50d1..d719134e2d3a 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -7,7 +7,7 @@ # cflags-$(CONFIG_X86_32) :=3D -march=3Di386 cflags-$(CONFIG_X86_64) :=3D -mcmodel=3Dsmall -cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -std=3Dgnu11 \ +cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -std=3Dgnu89 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \ --=20 2.51.0 From nobody Sat Feb 7 01:42:10 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 772CD2EB5C8; Fri, 17 Oct 2025 16:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760720035; cv=none; b=XrJufG0Ngse4vn/s7BCd7asHtFXgYgh5YVCB1ZjUcnGjEali6rpxI2D05i+Sc2qYAp9vFWNh+fxQIvFzA89gmV2rJGqaIOCmDNSVaO+wLp7Xp3A4qoO6fzMnbhjcTyNYelcskDpq6+LHWMg46gCsJhfIUk/K9QwTVDrZBFpqggE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760720035; c=relaxed/simple; bh=xJEp87cP8YctFoabS5BEu8FdvJkbWM5F1W3Z88WRGyQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B40iphHgqkGeTC4Yf76m6cc9eY7dGvhDYBhaHQLbJSOdzfRJ3xugeAu0e40MeYsLjB9dVjAiCbTGcmMBPU/RWU2I+70W0HXy/D9r4BnA0JJ8Jh/MWqP7BQmIkAO6UGHPbP5wwWZtxR+acmhmRsg7+0Z9RRYrmrzvnvXdNjQyg5k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B/hY72eo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B/hY72eo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83616C116C6; Fri, 17 Oct 2025 16:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760720035; bh=xJEp87cP8YctFoabS5BEu8FdvJkbWM5F1W3Z88WRGyQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=B/hY72eorFpum9ri2RbgI41VJ2sAWU19LWX7owGh/oLiajZS9437K64n7vDWvuiXv tHaLGA0AN4e8zmV8q/18ODOdjEZcOZ14Nj2cpMQkModgw8SQUwWOe9s6WtkdHBe/+O QRfggsqw5RJ8CVb2kVgSX+IGAsvGcg2tS28AfNCXt++s6EWT/SHjWGcoKCTwawP8FL KQh+MIJJGGx2P0qgK7B66hj5UP+BNTFBlAN3t1scb/6h5pVZTIKVzwoF7J8VFgo4ix 3bKLV/P/4+Mxyh5Blx9gEeIUznlxXdfdCwLCjbtgnpOPPFxJI4KK5iE1gFyRqC+3f1 jYacP0bZWNWdQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 18:53:27 +0200 Subject: [PATCH 5.10.y 3/3] tracing: fix declaration-after-statement warning Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-10-gcc-15-v1-3-cdbbfe1a2100@kernel.org> References: <20251017-v5-10-gcc-15-v1-0-cdbbfe1a2100@kernel.org> In-Reply-To: <20251017-v5-10-gcc-15-v1-0-cdbbfe1a2100@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Douglas Raillard , "Masami Hiramatsu (Google)" , "Steven Rostedt (Google)" , Mathieu Desnoyers X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1977; i=matttbe@kernel.org; h=from:subject:message-id; bh=xJEp87cP8YctFoabS5BEu8FdvJkbWM5F1W3Z88WRGyQ=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+lcz0Xb0m8Dqf4AnPT9xLHSRTJ920zN3dp6iqlbG0p iJL85ZlRykLgxgXg6yYIot0W2T+zOdVvCVefhYwc1iZQIYwcHEKwEQK7zD8T9g1Md/ZVIl/x9m2 rbcXZZr6bJSWnrzI2+5N/zPd/dm+ExgZ3idPeRemU+zKo9n9r4NblWXRXpZ9XPKn7upI7P2wLn0 mPwA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 When building this kernel version this warning is visible: kernel/trace/trace_events_synth.c: In function 'synth_event_reg': kernel/trace/trace_events_synth.c:847:9: warning: ISO C90 forbids mixed d= eclarations and code [-Wdeclaration-after-statement] 847 | int ret =3D trace_event_reg(call, type, data); | ^~~ This can be easily fixed by declaring 'ret' earlier. This issue is visible in < v5.18, because -std=3Dgnu89 is used by default, see commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). Please note that in v5.15.y, the 'Fixes' commit has been modified during the backport, not to have this warning. See commit 72848b81b3dd ("tracing: Ensure module defining synth event cannot be unloaded while tracing") from v5.15.y. Fixes: 21581dd4e7ff ("tracing: Ensure module defining synth event cannot be= unloaded while tracing") Signed-off-by: Matthieu Baerts (NGI0) --- Cc: Douglas Raillard Cc: Masami Hiramatsu (Google) Cc: Steven Rostedt (Google) Cc: Mathieu Desnoyers --- kernel/trace/trace_events_synth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_= synth.c index 613d45e7b608..b126af59e61c 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -831,6 +831,7 @@ static int synth_event_reg(struct trace_event_call *cal= l, enum trace_reg type, void *data) { struct synth_event *event =3D container_of(call, struct synth_event, call= ); + int ret; =20 switch (type) { #ifdef CONFIG_PERF_EVENTS @@ -844,7 +845,7 @@ static int synth_event_reg(struct trace_event_call *cal= l, break; } =20 - int ret =3D trace_event_reg(call, type, data); + ret =3D trace_event_reg(call, type, data); =20 switch (type) { #ifdef CONFIG_PERF_EVENTS --=20 2.51.0