drm/amdgpu: enable -Wformat-truncation
Subsystems (2)
PATCH 1/1 drm/amdgpu: enable -Wformat-truncation
It is enabled by W=1 and amdgpu has a clean build with it enabled. So, to make sure we block future instances of it from showing up on our driver, enable it by default for the module.
Signed-off-by Hamza Mahfooz <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/Makefile +1 -0
@@ -41,6 +41,7 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \ # Locally disable W=1 warnings enabled in drm subsystem Makefile subdir-ccflags-y += -Wno-override-init +subdir-ccflags-y += $(call cc-option, -Wformat-truncation) subdir-ccflags-$(CONFIG_DRM_AMDGPU_WERROR) += -Werror amdgpu-y := amdgpu_drv.o
Signature · 1 line
2.46.0
Quoted 3 lines · Hamza Mahfooz
It is enabled by W=1 and amdgpu has a clean build with it enabled. So, to make sure we block future instances of it from showing up on our driver, enable it by default for the module.
Would prefer enabling it by default across the subsystem [1].
BR,
Jani.
[1] https://lore.kernel.org/r/[email protected]
Quoted 18 lines
Signed-off-by Hamza Mahfooz <[email protected]>--- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/Makefile +1
-0@@ -41,6 +41,7 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \ # Locally disable W=1 warnings enabled in drm subsystem Makefile subdir-ccflags-y += -Wno-override-init +subdir-ccflags-y += $(call cc-option, -Wformat-truncation) subdir-ccflags-$(CONFIG_DRM_AMDGPU_WERROR) += -Werror amdgpu-y := amdgpu_drv.o
Signature · 1 line
Jani Nikula, Intel