Re: [PATCH v2] drm/amd/display: enable more strict compile checks

From: Felix Kuehling
Date: Wed May 24 2023 - 15:46:08 EST

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?


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?


*From:* amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> *On Behalf Of *Ho, Kenny
*Sent:* Wednesday, May 24, 2023 3:23 PM
*To:* Alex Deucher <alexdeucher@xxxxxxxxx>; Mahfooz, Hamza <Hamza.Mahfooz@xxxxxxx>
*Cc:* Li, Sun peng (Leo) <Sunpeng.Li@xxxxxxx>; Wentland, Harry <Harry.Wentland@xxxxxxx>; Pan, Xinhui <Xinhui.Pan@xxxxxxx>; Siqueira, Rodrigo <Rodrigo.Siqueira@xxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Daniel Vetter <daniel@xxxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Koenig, Christian <Christian.Koenig@xxxxxxx>
*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.



*From:*Alex Deucher <alexdeucher@xxxxxxxxx>
*Sent:* Wednesday, May 24, 2023 3:22 PM
*To:* Mahfooz, Hamza <Hamza.Mahfooz@xxxxxxx>
*Cc:* amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Li, Sun peng (Leo) <Sunpeng.Li@xxxxxxx>; Ho, Kenny <Kenny.Ho@xxxxxxx>; Pan, Xinhui <Xinhui.Pan@xxxxxxx>; Siqueira, Rodrigo <Rodrigo.Siqueira@xxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx <linux-kernel@xxxxxxxxxxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx <dri-devel@xxxxxxxxxxxxxxxxxxxxx>; Daniel Vetter <daniel@xxxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Wentland, Harry <Harry.Wentland@xxxxxxx>; Koenig, Christian <Christian.Koenig@xxxxxxx>
*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@xxxxxxx> 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@xxxxxxx>
> Cc: Harry Wentland <harry.wentland@xxxxxxx>
> Cc: Kenny Ho <kenny.ho@xxxxxxx>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@xxxxxxx>
> ---
> 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 @@
> +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@xxxxxxx>


>  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