linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: enable -Wformat-truncation
@ 2024-09-03 20:09 Hamza Mahfooz
  2024-09-04  8:21 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Hamza Mahfooz @ 2024-09-03 20:09 UTC (permalink / raw)
  To: amd-gfx
  Cc: dri-devel, Alex Deucher, Christian König, Jani Nikula,
	linux-kernel, Hawking Zhang, 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.

Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
index 34943b866687..64adadb56fd6 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -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
-- 
2.46.0


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

* Re: [PATCH] drm/amdgpu: enable -Wformat-truncation
  2024-09-03 20:09 [PATCH] drm/amdgpu: enable -Wformat-truncation Hamza Mahfooz
@ 2024-09-04  8:21 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2024-09-04  8:21 UTC (permalink / raw)
  To: Hamza Mahfooz, amd-gfx
  Cc: dri-devel, Alex Deucher, Christian König, linux-kernel,
	Hawking Zhang, Hamza Mahfooz

On Tue, 03 Sep 2024, Hamza Mahfooz <hamza.mahfooz@amd.com> wrote:
> 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/cover.1716479340.git.jani.nikula@intel.com

>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 34943b866687..64adadb56fd6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -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

-- 
Jani Nikula, Intel

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

end of thread, other threads:[~2024-09-04  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 20:09 [PATCH] drm/amdgpu: enable -Wformat-truncation Hamza Mahfooz
2024-09-04  8:21 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).