linux-stable/scripts
Nathan Chancellor 81a3a0c1a6 kbuild: Move -Wenum-enum-conversion to W=2
commit 8f6629c004 upstream.

-Wenum-enum-conversion was strengthened in clang-19 to warn for C, which
caused the kernel to move it to W=1 in commit 75b5ab134b ("kbuild:
Move -Wenum-{compare-conditional,enum-conversion} into W=1") because
there were numerous instances that would break builds with -Werror.
Unfortunately, this is not a full solution, as more and more developers,
subsystems, and distributors are building with W=1 as well, so they
continue to see the numerous instances of this warning.

Since the move to W=1, there have not been many new instances that have
appeared through various build reports and the ones that have appeared
seem to be following similar existing patterns, suggesting that most
instances of this warning will not be real issues. The only alternatives
for silencing this warning are adding casts (which is generally seen as
an ugly practice) or refactoring the enums to macro defines or a unified
enum (which may be undesirable because of type safety in other parts of
the code).

Move the warning to W=2, where warnings that occur frequently but may be
relevant should reside.

Cc: stable@vger.kernel.org
Fixes: 75b5ab134b ("kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1")
Link: https://lore.kernel.org/ZwRA9SOcOjjLJcpi@google.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-03-13 12:50:29 +01:00
..
atomic
basic
clang-tools gen_compile_commands: fix invalid escape sequence warning 2024-03-26 18:21:12 -04:00
coccinelle
dtc
dummy-tools
gcc-plugins gcc-plugins: Rename last_stmt() for GCC 14+ 2024-07-27 10:46:06 +02:00
gdb scripts/gdb: fix SB_* constants parsing 2024-06-16 13:39:54 +02:00
genksyms genksyms: fix memory leak when the same symbol is read from *.symref file 2025-03-13 12:50:13 +01:00
kconfig kconfig: fix memory leak in sym_warn_unmet_dep() 2025-03-13 12:50:14 +01:00
ksymoops
mod modpost: fix the missed iteration for the max bit in do_input() 2025-01-09 13:28:49 +01:00
package
selinux
tracing
.gitignore
adjust_autoksyms.sh
as-version.sh
asn1_compiler.c
bin2c.c
bloat-o-meter
bootgraph.pl
bpf_doc.py bpf, scripts: Correct GPL license name 2024-03-01 13:21:58 +01:00
cc-can-link.sh
cc-version.sh
check_extable.sh
check-sysctl-docs
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch
decode_stacktrace.sh scripts/decode_stacktrace.sh: optionally use LLVM utilities 2024-02-23 08:55:13 +01:00
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-x86_32-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-08-19 05:45:16 +02:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-08-19 05:45:16 +02:00
gen_autoksyms.sh
gen_ksymdeps.sh
generate_initcall_order.pl
get_abi.pl scripts/get_abi: fix source path leak 2024-02-23 08:54:25 +01:00
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
insert-sys-cert.c
jobserver-exec
kallsyms.c
Kbuild.include
Kconfig.include
kernel-doc
ld-version.sh kbuild: Make ld-version.sh more robust against version string changes 2024-07-18 13:07:45 +02:00
leaking_addresses.pl
Lindent
link-vmlinux.sh kbuild: fix short log for AS in link-vmlinux.sh 2024-07-18 13:07:36 +02:00
Makefile
Makefile.asm-generic
Makefile.build
Makefile.clang
Makefile.clean
Makefile.compiler
Makefile.dtbinst kbuild: Install dtb files as 0644 in Makefile.dtbinst 2024-07-05 09:14:48 +02:00
Makefile.extrawarn kbuild: Move -Wenum-enum-conversion to W=2 2025-03-13 12:50:29 +01:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.lib
Makefile.modfinal kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries 2024-05-17 11:50:53 +02:00
Makefile.modinst
Makefile.modpost
Makefile.package
Makefile.ubsan
Makefile.userprogs
makelst
markup_oops.pl
min-tool-version.sh
mkcompile_h
mksysmap
mkuboot.sh
module.lds.S
modules-check.sh
nsdeps
objdiff
pahole-flags.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
remove-stale-files
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity 2025-01-23 17:15:52 +01:00
spdxcheck-test.sh
spdxcheck.py
spelling.txt
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
syscallhdr.sh
syscallnr.sh
syscalltbl.sh
tags.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh