From: "Michel Dänzer" <michel.daenzer@mailbox.org>
To: "Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>
Cc: nicholas.choi@amd.com, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/amdgpu: Treat warning as an error
Date: Tue, 11 Jan 2022 11:41:01 +0100 [thread overview]
Message-ID: <3bfd4b1f-effb-e16f-8282-628fe2e6089b@mailbox.org> (raw)
In-Reply-To: <20220110233906.1178021-2-Rodrigo.Siqueira@amd.com>
On 2022-01-11 00:39, Rodrigo Siqueira wrote:
> We have one internal CI that builds our kernel with the -Werror flag; as
> a result, when we try to sync our branch with amd-staging-drm-next we
> get some failures due to warnings. This commit tries to alleviate this
> problem by forcing a warning to be treated as an error.
>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 7fedbb725e17..158f427c2f2e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -27,6 +27,8 @@ FULL_AMD_PATH=$(srctree)/$(src)/..
> DISPLAY_FOLDER_NAME=display
> FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
>
> +subdir-ccflags-y += -Werror
The problem with this is that different compilers, or even different versions of the same compiler, can generate different warnings for the same code. So this will definitely result in some people hitting compile failures for no reason other than using a different compiler (version) than the code had been tested with. Or maybe just a different .config.
Unless you secretly hate your users ;) [0], I'd strongly recommend against enabling this unconditionally.
(The proper place for -Werror is in CI which gates merging of all changes. E.g. Mesa's upstream GitLab CI does this with great success)
[0] No, this isn't about RHEL — the RHEL kernel build always enables -Werror, so we need to deal with that anyway.
--
Earthling Michel Dänzer | https://redhat.com
Libre software enthusiast | Mesa and Xwayland developer
next prev parent reply other threads:[~2022-01-11 10:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 23:39 [PATCH 0/4] Use -Werror by default and fix compilation warnings Rodrigo Siqueira
2022-01-10 23:39 ` [PATCH 1/4] drm/amdgpu: Treat warning as an error Rodrigo Siqueira
2022-01-11 10:41 ` Michel Dänzer [this message]
2022-01-11 11:00 ` Michel Dänzer
2022-01-11 13:42 ` Rodrigo Siqueira Jordao
2022-01-10 23:39 ` [PATCH 2/4] drm/amdgpu: Fix compilation warning due to double semicolon Rodrigo Siqueira
2022-01-10 23:39 ` [PATCH 3/4] drm/amdgpu: Drop unused variable Rodrigo Siqueira
2022-01-10 23:39 ` [PATCH 4/4] drm/amdgpu: Silent GCC warning Rodrigo Siqueira
2022-01-11 2:06 ` Alex Deucher
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=3bfd4b1f-effb-e16f-8282-628fe2e6089b@mailbox.org \
--to=michel.daenzer@mailbox.org \
--cc=Rodrigo.Siqueira@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=harry.wentland@amd.com \
--cc=nicholas.choi@amd.com \
--cc=sunpeng.li@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.