drm/i915: enable W=1 warnings by default
authorJani Nikula <jani.nikula@intel.com>
Wed, 11 Oct 2023 07:29:04 +0000 (10:29 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 11 Oct 2023 20:48:56 +0000 (23:48 +0300)
commit2250c7ead8ad95185249d24cf169e4f2b07dcc1a
tree5fdd6de5e2ed05dcdd604e3ba975b752f5f8aac4
parent7e1defac4b158cecb4628266f4d89732b4bd9179
drm/i915: enable W=1 warnings by default

We enable a bunch more compiler warnings than the kernel
defaults. However, they've drifted to become a unique set of warnings,
and have increasingly fallen behind from the W=1 set.

Align with the W=1 warnings from scripts/Makefile.extrawarn for clarity,
by copy-pasting them with s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it
easier to compare in the future.

Some of the -Wextra warnings do need to be disabled, just like in
Makefile.extrawarn, but take care to not disable them for W=2 or W=3
builds, depending on the warning.

v2: Add back some -Wextra warning disables (Nathan)

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
[Final s/KBUILD_CFLAGS/subdir-ccflags-y/ fix while applying]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/69a812273091b6535ddc7f9346289d71bb30f43d.1697009258.git.jani.nikula@intel.com
drivers/gpu/drm/i915/Makefile