AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Sam Ravnborg <sam@ravnborg.org>
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: Fri, 24 May 2024 12:08:50 +0300	[thread overview]
Message-ID: <87ed9ro9ul.fsf@intel.com> (raw)
In-Reply-To: <20240523184128.GA523806@ravnborg.org>

On Thu, 23 May 2024, Sam Ravnborg <sam@ravnborg.org> wrote:
> 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.

Additionally, I didn't want to create any conflicts with [1]. There's no
harm in having the duplication.

BR,
Jani.

[1] https://lore.kernel.org/r/cover.1716471145.git.jani.nikula@intel.com


>
> 	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

-- 
Jani Nikula, Intel

      reply	other threads:[~2024-05-24  9:16 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
2024-05-24  9:08     ` Jani Nikula [this message]

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=87ed9ro9ul.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=nouveau@lists.freedesktop.org \
    --cc=sam@ravnborg.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