All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/amdgpu: enable W=1 for amdgpu
@ 2023-06-09 16:42 ` Hamza Mahfooz
  0 siblings, 0 replies; 11+ messages in thread
From: Hamza Mahfooz @ 2023-06-09 16:42 UTC (permalink / raw)
  To: amd-gfx
  Cc: Lijo Lazar, Tao Zhou, Xiaojian Du, Pan, Xinhui, linux-kernel,
	dri-devel, Nathan Chancellor, Le Ma, YiPeng Chai, Hamza Mahfooz,
	Daniel Vetter, Alex Deucher, James Zhu, David Airlie,
	Christian König, Hawking Zhang

We have a clean build with W=1 as of
commit 12a15dd589ac ("drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move
SYNAPTICS_DEVICE_ID into CONFIG_DRM_AMD_DC_DCN ifdef"). So, let's enable
these checks unconditionally for the entire module to catch these errors
during development.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/Makefile | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
index 86b833085f19..8d16f280b695 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -40,7 +40,18 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
 	-I$(FULL_AMD_PATH)/amdkfd
 
 subdir-ccflags-y := -Wextra
-subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
+subdir-ccflags-y += -Wunused
+subdir-ccflags-y += -Wmissing-prototypes
+subdir-ccflags-y += -Wmissing-declarations
+subdir-ccflags-y += -Wmissing-include-dirs
+subdir-ccflags-y += -Wold-style-definition
+subdir-ccflags-y += -Wmissing-format-attribute
+# Need this to avoid recursive variable evaluation issues
+cond-flags := $(call cc-option, -Wunused-but-set-variable) \
+	$(call cc-option, -Wunused-const-variable) \
+	$(call cc-option, -Wstringop-truncation) \
+	$(call cc-option, -Wpacked-not-aligned)
+subdir-ccflags-y += $(cond-flags)
 subdir-ccflags-y += -Wno-unused-parameter
 subdir-ccflags-y += -Wno-type-limits
 subdir-ccflags-y += -Wno-sign-compare
-- 
2.40.1


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

end of thread, other threads:[~2023-06-10  6:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09 16:42 [PATCH] drm/amd/amdgpu: enable W=1 for amdgpu Hamza Mahfooz
2023-06-09 16:42 ` Hamza Mahfooz
2023-06-09 16:42 ` Hamza Mahfooz
2023-06-09 20:17 ` Nathan Chancellor
2023-06-09 20:17   ` Nathan Chancellor
2023-06-09 20:17   ` Nathan Chancellor
2023-06-10  1:20   ` Masahiro Yamada
2023-06-10  1:20     ` Masahiro Yamada
2023-06-10  1:20     ` Masahiro Yamada
2023-06-10  6:49     ` Jani Nikula
2023-06-10  6:49       ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.