lkml.org 
[lkml]   [2023]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] drm/amd/display: enable more strict compile checks
Hi!

On Wed, May 24, 2023 at 04:27:31PM -0400, Hamza Mahfooz wrote:
> + Kees
>
> On 5/24/23 15:50, Alex Deucher wrote:
> > On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote:
> > >
> > > Sure, I think we tried enabling warnings as errors before and had to
> > > revert it because of weird compiler quirks or the variety of compiler
> > > versions that need to be supported.
> > >
> > > Alex, are you planning to upstream this, or is this only to enforce more
> > > internal discipline about not ignoring warnings?
> >
> > I'd like to upstream it. Upstream already has CONFIG_WERROR as a
> > config option, but it's been problematic to enable in CI because of
> > various breakages outside of the driver and in different compilers.
> > That said, I don't know how much trouble enabling it will cause with
> > various compilers in the wild.

-Wmisleading-indentation is already part of -Wall, so this is globally
enabled already.

-Wunused is enabled under W=1, and it's pretty noisy still. If you can
get builds clean in drm, that'll be a good step towards getting it
enabled globally. (A middle ground with less to clean up might be
-Wunused-but-set-variable)

I agree about -Werror: just stick with CONFIG_WERROR instead.

-Kees

> >
> > Alex
> >
> > >
> > > Regards,
> > > Felix
> > >
> > >
> > > On 2023-05-24 15:41, Russell, Kent wrote:
> > > >
> > > > [AMD Official Use Only - General]
> > > >
> > > >
> > > > (Adding Felix in CC)
> > > >
> > > > I’m a fan of adding it to KFD as well. Felix, can you foresee any
> > > > issues here?
> > > >
> > > > Kent
> > > >
> > > > *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of
> > > > *Ho, Kenny
> > > > *Sent:* Wednesday, May 24, 2023 3:23 PM
> > > > *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza
> > > > <Hamza.Mahfooz@amd.com>
> > > > *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry
> > > > <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira,
> > > > Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org;
> > > > dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel
> > > > Vetter <daniel@ffwll.ch>; Deucher, Alexander
> > > > <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig,
> > > > Christian <Christian.Koenig@amd.com>
> > > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile
> > > > checks
> > > >
> > > > [AMD Official Use Only - General]
> > > >
> > > > [AMD Official Use Only - General]
> > > >
> > > > (+ Felix)
> > > >
> > > > Should we do the same for other modules under amd (amdkfd)? I was
> > > > going to enable full kernel werror in the kconfig used by my CI but
> > > > this is probably better.
> > > >
> > > > Kenny
> > > >
> > > > ------------------------------------------------------------------------
> > > >
> > > > *From:*Alex Deucher <alexdeucher@gmail.com>
> > > > *Sent:* Wednesday, May 24, 2023 3:22 PM
> > > > *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com>
> > > > *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>;
> > > > Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>;
> > > > Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo
> > > > <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org
> > > > <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org
> > > > <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>;
> > > > Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie
> > > > <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig,
> > > > Christian <Christian.Koenig@amd.com>
> > > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile
> > > > checks
> > > >
> > > > On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com>
> > > > wrote:
> > > > >
> > > > > Currently, there are quite a number of issues that are quite easy for
> > > > > the CI to catch, that slip through the cracks. Among them, there are
> > > > > unused variable and indentation issues. Also, we should consider all
> > > > > warnings to be compile errors, since the community will eventually end
> > > > > up complaining about them. So, enable -Werror, -Wunused and
> > > > > -Wmisleading-indentation for all kernel builds.
> > > > >
> > > > > Cc: Alex Deucher <alexander.deucher@amd.com>
> > > > > Cc: Harry Wentland <harry.wentland@amd.com>
> > > > > Cc: Kenny Ho <kenny.ho@amd.com>
> > > > > Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> > > > > ---
> > > > > v2: fix grammatical error
> > > > > ---
> > > > > drivers/gpu/drm/amd/display/Makefile | 2 ++
> > > > > 1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/amd/display/Makefile
> > > > b/drivers/gpu/drm/amd/display/Makefile
> > > > > index 0d610cb376bb..3c44162ebe21 100644
> > > > > --- a/drivers/gpu/drm/amd/display/Makefile
> > > > > +++ b/drivers/gpu/drm/amd/display/Makefile
> > > > > @@ -26,6 +26,8 @@
> > > > >
> > > > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH)
> > > > >
> > > > > +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation
> > > > > +
> > > >
> > > > Care to enable this for the rest of amdgpu as well? Or send out an
> > > > additional patch to do that? Either way:
> > > > Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> > > >
> > > > Alex
> > > >
> > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/
> > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw
> > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr
> > > > > --
> > > > > 2.40.1
> > > > >
> > > >
> --
> Hamza
>

--
Kees Cook

\
 
 \ /
  Last update: 2023-05-25 17:37    [W:0.119 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site