Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/3] drm/i915: copy-paste the extra warnings from scripts/Makefile.extrawarn
@ 2023-06-08 11:22 Jani Nikula
  2023-06-08 11:22 ` [Intel-gfx] [PATCH 2/3] drm/i915: fix Makefile sort and indent Jani Nikula
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jani Nikula @ 2023-06-08 11:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

We enable a lot more compiler warnings than the kernel defaults. A lot
of them are comparable with the W=1 warnings (and warning disables!) in
scripts/Makefile.extrawarn. Copy-paste them with
s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it easier to compare. Some of
them overlap with the -Wall we also add, but it doesn't really matter.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/Makefile | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 789dce9e2608..690308dc7047 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,15 +12,30 @@
 # Note the danger in using -Wall -Wextra is that when CI updates gcc we
 # will most likely get a sudden build breakage... Hopefully we will fix
 # new warnings before CI updates!
-subdir-ccflags-y := -Wall -Wextra
-subdir-ccflags-y += -Wno-format-security
-subdir-ccflags-y += -Wno-unused-parameter
-subdir-ccflags-y += -Wno-type-limits
+subdir-ccflags-y := -Wall
+
+# begin copy-paste W=1 warnings from scripts/Makefile.extrawarn
+subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
+subdir-ccflags-y += -Wmissing-declarations
+subdir-ccflags-y += -Wmissing-format-attribute
+subdir-ccflags-y += -Wmissing-prototypes
+subdir-ccflags-y += -Wold-style-definition
+subdir-ccflags-y += -Wmissing-include-dirs
+subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
+subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)
+subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned)
+subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
+# The following turn off the warnings enabled by -Wextra
 subdir-ccflags-y += -Wno-missing-field-initializers
 subdir-ccflags-y += -Wno-sign-compare
+subdir-ccflags-y += -Wno-type-limits
 subdir-ccflags-y += -Wno-shift-negative-value
-subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
+# end copy-paste
+
+# The following turn off the warnings enabled by -Wall
+subdir-ccflags-y += -Wno-format-security
 subdir-ccflags-y += $(call cc-disable-warning, frame-address)
+
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
 
 subdir-ccflags-y += -I$(srctree)/$(src)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-09 17:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 11:22 [Intel-gfx] [PATCH 1/3] drm/i915: copy-paste the extra warnings from scripts/Makefile.extrawarn Jani Nikula
2023-06-08 11:22 ` [Intel-gfx] [PATCH 2/3] drm/i915: fix Makefile sort and indent Jani Nikula
2023-06-08 11:22 ` [Intel-gfx] [PATCH 3/3] drm/i915: move Makefile display debugfs files next to display Jani Nikula
2023-06-08 14:31 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915: copy-paste the extra warnings from scripts/Makefile.extrawarn Patchwork
2023-06-08 14:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-09 17:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox