AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: Harry Wentland <harry.wentland@amd.com>,
	Alex Deucher <alexdeucher@gmail.com>
Cc: "Leo Li" <sunpeng.li@amd.com>, "Kenny Ho" <kenny.ho@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH v2] drm/amd/display: enable more strict compile checks
Date: Wed, 24 May 2023 15:57:12 -0400	[thread overview]
Message-ID: <0774d3f5-6c8a-9737-ee58-4c0bd1ada9cb@amd.com> (raw)
In-Reply-To: <f8cd7bc5-86c7-f113-f7a1-aec4bbf4aeb3@amd.com>

On 5/24/23 15:54, Harry Wentland wrote:
> 
> 
> On 5/24/23 15:27, Hamza Mahfooz wrote:
>> On 5/24/23 15:22, Alex Deucher wrote:
>>> 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>
>>
>> As far as I can tell, if `CONFIG_DRM_AMD_DC` is set it will run these
>> checks on at least the base driver code.
>>
> 
> It's probable best to put that into amdgpu/Makefile in that case.

I tried the following, but it doesn't seem to work:

diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile 
b/drivers/gpu/drm/amd/amdgpu/Makefile
index 74a9aa6fe18c..d97bde0796dc 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -39,6 +39,8 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
         -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \
         -I$(FULL_AMD_PATH)/amdkfd

+ccflags-y += -Werror -Wunused -Wmisleading-indentation
+
  amdgpu-y := amdgpu_drv.o

  # add KMS driver

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


  reply	other threads:[~2023-05-24 19:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 19:19 [PATCH v2] drm/amd/display: enable more strict compile checks Hamza Mahfooz
2023-05-24 19:22 ` Alex Deucher
2023-05-24 19:23   ` Ho, Kenny
2023-05-24 19:41     ` Russell, Kent
2023-05-24 19:45       ` Felix Kuehling
2023-05-24 19:50         ` Alex Deucher
2023-05-24 19:56           ` Ho, Kenny
2023-05-24 20:27           ` Hamza Mahfooz
2023-05-25  7:48             ` Jani Nikula
2023-05-25 15:37             ` Kees Cook
2023-05-25 16:26               ` Nathan Chancellor
2023-05-24 19:27   ` Hamza Mahfooz
2023-05-24 19:54     ` Harry Wentland
2023-05-24 19:57       ` Hamza Mahfooz [this message]
2023-05-25  9:43 ` Christoph Hellwig
2023-05-26  5:00 ` kernel test robot

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=0774d3f5-6c8a-9737-ee58-4c0bd1ada9cb@amd.com \
    --to=hamza.mahfooz@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=kenny.ho@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox