After llvm/llvm-project@fd11cf4 (llvm/llvm-project@fd11cf4 split the warning out from -Wunused-but-set-variable into -Wunused-but-set-global):
scripts/dtc/dtc-lexer.lex.c:641:12: error: variable 'dts_version' set but not used [-Werror,-Wunused-but-set-global]
641 | static int dts_version = 1;
| ^
This one is unfortunate because dtc is a vendored project in the kernel. I submitted the fix against upstream dtc:
https://lore.kernel.org/20260325-dtc-lexer-remove-dts_version-v1-1-0b5d64903bbb@kernel.org/
Once that is merged in dtc.git upstream, I will ask Rob to cherry-pick it into the kernel or just sync with dtc (hopefully the former so that it is easy to backport to stable).
After llvm/llvm-project@fd11cf4 (llvm/llvm-project@fd11cf4 split the warning out from
-Wunused-but-set-variableinto-Wunused-but-set-global):This one is unfortunate because
dtcis a vendored project in the kernel. I submitted the fix against upstreamdtc:https://lore.kernel.org/20260325-dtc-lexer-remove-dts_version-v1-1-0b5d64903bbb@kernel.org/
Once that is merged in
dtc.gitupstream, I will ask Rob to cherry-pick it into the kernel or just sync withdtc(hopefully the former so that it is easy to backport to stable).