From: Greg Kroah-Hartman Date: Thu, 23 Apr 2026 12:20:06 +0000 (+0200) Subject: 6.12-stable patches X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=8e68291e6058a9483b54fddc0a1efd21521b70d6;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: scripts-dtc-remove-unused-dts_version-in-dtc-lexer.l.patch --- diff --git a/queue-6.12/scripts-dtc-remove-unused-dts_version-in-dtc-lexer.l.patch b/queue-6.12/scripts-dtc-remove-unused-dts_version-in-dtc-lexer.l.patch new file mode 100644 index 0000000000..56a97be723 --- /dev/null +++ b/queue-6.12/scripts-dtc-remove-unused-dts_version-in-dtc-lexer.l.patch @@ -0,0 +1,55 @@ +From stable+bounces-240015-greg=kroah.com@vger.kernel.org Tue Apr 21 02:37:02 2026 +From: Nathan Chancellor +Date: Mon, 20 Apr 2026 17:36:46 -0700 +Subject: scripts/dtc: Remove unused dts_version in dtc-lexer.l +To: Greg Kroah-Hartman , Sasha Levin +Cc: stable@vger.kernel.org, devicetree@vger.kernel.org, Nathan Chancellor +Message-ID: <20260420-stable-dts-unused-but-set-global-v1-1-9bdfba6889bb@kernel.org> + +From: Nathan Chancellor + +This patch is for stable only. Commit 5a09df20872c ("scripts/dtc: Update +to upstream version v1.7.2-69-g53373d135579") upstream applied it as +part of a regular scripts/dtc sync, which may be unsuitable for older +versions of stable where the warning it fixes is present. + +A recent strengthening of -Wunused-but-set-variable (enabled with -Wall) +in clang under a new subwarning, -Wunused-but-set-global, points out an +unused static global variable in dtc-lexer.lex.c (compiled from +dtc-lexer.l): + + scripts/dtc/dtc-lexer.lex.c:641:12: warning: variable 'dts_version' set but not used [-Wunused-but-set-global] + 641 | static int dts_version = 1; + | ^ + +Remove it to clear up the warning, as it is truly unused. + +Fixes: 658f29a51e98 ("of/flattree: Update dtc to current mainline.") +Signed-off-by: Nathan Chancellor +Signed-off-by: Greg Kroah-Hartman +--- +This should apply cleanly to all supported stable branches. +Signed-off-by: Greg Kroah-Hartman +--- + scripts/dtc/dtc-lexer.l | 3 --- + 1 file changed, 3 deletions(-) + +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -39,8 +39,6 @@ extern bool treesource_error; + #define DPRINT(fmt, ...) do { } while (0) + #endif + +-static int dts_version = 1; +- + #define BEGIN_DEFAULT() DPRINT("\n"); \ + BEGIN(V1); \ + +@@ -101,7 +99,6 @@ static void PRINTF(1, 2) lexical_error(c + + <*>"/dts-v1/" { + DPRINT("Keyword: /dts-v1/\n"); +- dts_version = 1; + BEGIN_DEFAULT(); + return DT_V1; + } diff --git a/queue-6.12/series b/queue-6.12/series index e3e1f7cf0b..1cc5af2c85 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -9,3 +9,4 @@ drm-amdgpu-replace-pasid-idr-with-xarray.patch scripts-generate_rust_analyzer.py-define-scripts.patch mm-pagewalk-fix-race-between-concurrent-split-and-refault.patch ksmbd-fix-use-after-free-in-__ksmbd_close_fd-via-durable-scavenger.patch +scripts-dtc-remove-unused-dts_version-in-dtc-lexer.l.patch