From: Sam Ravnborg <sam@ravnborg.org>
To: Jani Nikula <jani.nikula@intel.com>
Cc: dri-devel@lists.freedesktop.org, imx@lists.linux.dev,
nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm: enable -Wformat-truncation across the subsystem
Date: Thu, 23 May 2024 20:41:28 +0200 [thread overview]
Message-ID: <20240523184128.GA523806@ravnborg.org> (raw)
In-Reply-To: <719debc351075abc36b2573266bfd4d963361e40.1716479340.git.jani.nikula@intel.com>
Hi Jani,
On Thu, May 23, 2024 at 06:51:09PM +0300, Jani Nikula wrote:
> With the -Wformat-truncation warnings fixed, finish the job started in
> commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across
> the subsystem"), and enable that warning too.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
When it is enabled for all of drm then the explicit assignments here
could be dropped I think:
drivers/gpu/drm/i915/Makefile:subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
drivers/gpu/drm/xe/Makefile:subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
Just a drive-by comment, I know this patch was mostly for the bots.
Sam
>
> ---
>
> Gut feeling says there are more issues, and my configs just don't catch
> them all, but let's see what the build bots have to say. ;)
> ---
> drivers/gpu/drm/Makefile | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 68cc9258ffc4..644613dbedda 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -16,8 +16,7 @@ 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, -Wformat-overflow)
> -# FIXME: fix -Wformat-truncation warnings and uncomment
> -#subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
> +subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
> subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
> # The following turn off the warnings enabled by -Wextra
> ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
> --
> 2.39.2
next prev parent reply other threads:[~2024-05-23 19:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 15:51 [PATCH 0/4] drm: enable -Wformat-truncation Jani Nikula
2024-05-23 15:51 ` [PATCH 1/4] drm/amdgpu: fix -Wformat-truncation warning in amdgpu_gfx_kiq_init_ring() Jani Nikula
2024-05-23 18:07 ` Alex Deucher
2024-05-24 9:07 ` Jani Nikula
2024-05-23 15:51 ` [PATCH 2/4] drm/nouveau: fix -Wformat-truncation warning in nouveau_backlight_init() Jani Nikula
2024-05-23 15:51 ` [PATCH 3/4] drm/imx: fix -Wformat-truncation warning in imx_ldb_probe() Jani Nikula
2024-05-23 17:32 ` Ville Syrjälä
2024-05-24 9:04 ` Jani Nikula
2024-05-23 15:51 ` [PATCH 4/4] drm: enable -Wformat-truncation across the subsystem Jani Nikula
2024-05-23 18:41 ` Sam Ravnborg [this message]
2024-05-24 9:08 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240523184128.GA523806@ravnborg.org \
--to=sam@ravnborg.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=jani.nikula@intel.com \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox