[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230609164207.430377-1-hamza.mahfooz@amd.com>
Date: Fri, 9 Jun 2023 12:42:06 -0400
From: Hamza Mahfooz <hamza.mahfooz@....com>
To: <amd-gfx@...ts.freedesktop.org>
CC: Hamza Mahfooz <hamza.mahfooz@....com>,
Alex Deucher <alexander.deucher@....com>,
Nathan Chancellor <nathan@...nel.org>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Hawking Zhang <Hawking.Zhang@....com>, Le Ma <le.ma@....com>,
Tao Zhou <tao.zhou1@....com>,
YiPeng Chai <YiPeng.Chai@....com>,
James Zhu <James.Zhu@....com>,
Xiaojian Du <Xiaojian.Du@....com>,
Lijo Lazar <lijo.lazar@....com>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/amd/amdgpu: enable W=1 for amdgpu
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@....com>
Cc: Nathan Chancellor <nathan@...nel.org>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@....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
Powered by blists - more mailing lists