Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25287rwd; Wed, 24 May 2023 13:34:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kTVBJ6/Kz4gsK8Kd9vBmG6h5UOELeZ8XZ6hOAoTZUdbEd8UVnNGJe1JZNYP2OFKIh2V88 X-Received: by 2002:a17:90a:8a92:b0:253:342b:a14e with SMTP id x18-20020a17090a8a9200b00253342ba14emr17677715pjn.21.1684960442293; Wed, 24 May 2023 13:34:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684960442; cv=pass; d=google.com; s=arc-20160816; b=j9UHTQltymRoUnmRUSoH3u703Fr7iYw9fcI+xxJKzEw2cHNJUa2FNyltS1Xw4fCV1A 1lC6bmOcn1lfxbZsNFLiuZARJbAcAKVNkKRLoSbW3xMQja1LitMjdpWUhhGn+/ShJyq7 1QTq/evUaVJD3nefSHHr5FKtwyexKqulvprtijjU8RIICm0+qE92SV92ks5QtNAHzPsV ux/+ID1zCe2+R9Ao1E4HuEY0tmFLNk91Qg4q/mESUpQ7/w1Gp6LyuDd5PcPS0N10ZEM+ e+YP+zOMbi/u0jcZp6YCttg68w5TRlUmNYAb2jn56o0ASjDNLVWZv7UaTGW3zyVYycdP z63A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=mWgyyIQHzgoD8orLpkVvl9GE7eHFz+bwp9tEVU9imY8=; b=uPpDZ87aNIb7pyij1gbGUbCq3++suKY4gvliHw9D+TyS6Dp7nt7T2uBSERo/fuEosx lGPKbtopdtFcUQugXB+v/LdhxJX17RvF6CACL/jj+PzxSUDP+jEY9LPhrNe76+7FjF+L cjG90EwKkDsWyObJPzwcOE1BVyZgWhzwyUhqYIcjnKQN/Am14WEKPTtC9ICrokm551Pb UBzqzg9r87N8rcD9wkxO69E7Z55VHxkDE0xJtewOGLoTrmXXs16UF7/+kiO7+eWUHfru wwv1KZNb8BNB9NCq0YFEYxGHXZttoySKWCTf0VBcYcA8TfVYYFKJonqW110d0CAjLczn 9V9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="4aVS7/z9"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gm4-20020a17090b100400b0024eab334011si1263076pjb.175.2023.05.24.13.33.49; Wed, 24 May 2023 13:34:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="4aVS7/z9"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232878AbjEXT5Y (ORCPT + 99 others); Wed, 24 May 2023 15:57:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232301AbjEXT5U (ORCPT ); Wed, 24 May 2023 15:57:20 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2074.outbound.protection.outlook.com [40.107.94.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E4AFBB for ; Wed, 24 May 2023 12:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cg2Y5lYMegd7QhVpZ4yBjjXINZWQujiZQctMbatcB4PvJtIuZSkOO9fhEujOViyNjWzPuW6hU6XSxDG6drdQ3dW+mixf+dgJ370kuP6Kjp5JxBQGmgiNCOwQuP3F0V44lJTIGaEuh58qp+dX1i+b75Jy0Fvt4Zwv7gmN32m0sUV4+SGGXTWneROOLCueExU625kDSMTRtxalKqz6G5W1dKRRLOjX9QZSI5wtFM6th8KoOMR5WwWpWUhWgEwTZgN6gnn3cYGbT/LkXDjViYTtNpxLoz+9pdzdcDTqHL1r21og2+QE8Bot/MoF49CLpVtZNKnH6SaItnWgQWm8zCrRYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mWgyyIQHzgoD8orLpkVvl9GE7eHFz+bwp9tEVU9imY8=; b=Og0Gal+MDyY0WKQtRORTlZr375+bwibPRGXbLWresapZbzNyh/Es1HruHUMNY1gw3/6lnofiyY9C+CFsjbsWU1iyoCLvkWHow7x95JGj9lfYvebDZpXV0WLPidb9u3DQUrR8tcFTMYkggP96IlDi2gw/N60kImvc8Grorc/8IC8aaFEn5JSQ2dkqcGqTrMmWZ883P0WnovO3EAlh8+msHnRtXkB9E28mGqzSaf4fIPEliKwKWfsalTe8WLPUJith0e0T1jN9hP9bYGNXTVXZ2ZHnKI5lNqSomRtqovwnoz0w8q1xo+jMHCR9IBxOjla5BMqKTBMZ786bHe9PN6IhWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mWgyyIQHzgoD8orLpkVvl9GE7eHFz+bwp9tEVU9imY8=; b=4aVS7/z9C1+6WW06/FhcXeB4bzJr7oSECJjm4y37zRBYgH0/VRfDoO01ruEOsIpVYWhiB90qJjNrEtlx66XdUQtGZMahEKj6wwWpz9nA79A4f/a8m16V8xl8/2pwF7cUxI1/+sM6iI8R5lB+HTFK4MhppfNuKFwxp1utAWyDxqg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) by SA3PR12MB8764.namprd12.prod.outlook.com (2603:10b6:806:31f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 19:57:17 +0000 Received: from DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::fe53:2742:10f9:b8f1]) by DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::fe53:2742:10f9:b8f1%7]) with mapi id 15.20.6411.028; Wed, 24 May 2023 19:57:16 +0000 Message-ID: <0774d3f5-6c8a-9737-ee58-4c0bd1ada9cb@amd.com> Date: Wed, 24 May 2023 15:57:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] drm/amd/display: enable more strict compile checks Content-Language: en-US To: Harry Wentland , Alex Deucher Cc: amd-gfx@lists.freedesktop.org, Leo Li , Kenny Ho , "Pan, Xinhui" , Rodrigo Siqueira , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Alex Deucher , David Airlie , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20230524191955.252212-1-hamza.mahfooz@amd.com> From: Hamza Mahfooz In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YQZPR01CA0123.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:87::28) To DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB6280:EE_|SA3PR12MB8764:EE_ X-MS-Office365-Filtering-Correlation-Id: 633df9f6-4b39-43ad-98a4-08db5c911342 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZbLDKzz9TrmIWHkkqwYE3NJqxGfHl9295k5zmaZLa7IQXUyn5Ns+7xp0/+B7zy/Vg24UeEZx1mCjiNSk7w6dp/ohzwRjxYD9fPIXfGEhOxzAMgMgpN/IsJ9fLZfZy8hE/WRltZpFdpzdFwmS91jAuZZpGMVPk7bPIojxhpBBGMjQpX/ZJRrioLinjRLT1xFQdO3ohE6R0G9bzlEv8sCW1qd6ytF4m3eJ5JZUqlSopZ39Mr9Wcv3e73tIR0P9QQhZnFmg+k7BD3rezM3m1zTWa+QxF1t/GguTXO62z7krlSHsa4TxHZMwJ8uJyf/GeT8ucQRCdMRjViPGjvY0DH++x+LJTYG27ZRCgZd0VR02JduYKxoP3l/gVUz8qUzXQRhX2wJHJqAfasYVD/fVsInU4bYjDAWpZPiWLckV/c6NyWcMb4l/bHyb6gp7gTpN9cTC693PVcA5sksUd6PY/V2m5Th67/bqg+zvbQhKpAL9G4Gxpg5t9cOTwb1RfkwH0NvHc/yp25eNHJrzP5G8uUqWLcaTc55GjC/P00xQow1OKvZchJF+DTO7RC3mWGj55AK8hrWdDUENft3mRb9y4wMLcXieHHgq6U9HgXZJcRpCNnz6Fmu09mBr2xUtPmg7dxN05JPEjY/Wlh1w2oAdxa6H6g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB6280.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(39860400002)(376002)(366004)(346002)(451199021)(26005)(38100700002)(83380400001)(6486002)(31696002)(6666004)(53546011)(6506007)(6512007)(186003)(86362001)(478600001)(110136005)(54906003)(31686004)(2616005)(4326008)(66556008)(66946007)(66476007)(316002)(44832011)(5660300002)(8936002)(8676002)(2906002)(41300700001)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V1BaY3RHLzBOS1Rlakc0Kzk4NE56QS9NdFhiWkZtU3hpN3lDbHBFS2lsSmY1?= =?utf-8?B?c2ZQQzdaVVhaUnhSWnovSHNjbkxxdlBPUnNBdlZIN1lvTFN4V2Y0Z1pjTi9O?= =?utf-8?B?UWxPazVmdXJmV0xvZnRqd1doajdkVmR5U041VngyeDd5ZmNYYlhXTDV0L3pV?= =?utf-8?B?S2lwbWwwWVNvd1FZc0hmUTJhM01vT1dmcFNtUzBVS3BjZzdMdlo0Y1YwOThr?= =?utf-8?B?SDJpa1pSME1TZzdxVHlMVUUreVprOG5JK1pxWEVGeGNPVjBvTGxkbHppdjhl?= =?utf-8?B?THRJdnAwQjdhUFVqOHpUSFUrSXFIUlk1RVRJTjFHZnVXbzVISFVjTzJaYlo4?= =?utf-8?B?WllkbGY3VVlIZEFLL3JGMnFZRlluVlJUVTF6KzBNb0N4YkhUZDdSRjdDZHBD?= =?utf-8?B?Rm1LRG9uQnNhZkdhMm14TDc3UVo3NHpKRGlEUUIxcTdNUlY1WCtzSzZvek5l?= =?utf-8?B?M2JoWmtsTkFNc29nWmtscGNXOVI0NDUvUURSUlVRVjVTYnVzUWRoNjllaj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Et1bEwz?= =?utf-8?B?Mm9vM213M2JVejlpZDBsU0tna1J0WEpXbWZBMXZLZzVBbFlNcjZ0bXFFckg5?= =?utf-8?B?dW05dHN6ZGcxekUzd0Q1NnptdTFpUERGNjNTNzlhR3pYTkwyOTlRdkliV2Ru?= =?utf-8?B?WFJPSnJWeGhqRjFyRThsTDNRSzh3SEJzZlJwd2U5OHc5YWZYT2F1N1I2dGNC?= =?utf-8?B?WTNZU0V0QzdpR0ZBcElianRLSkJ4N3MrbHFDSEhNNjgwb05wY3pJVTEwK3VT?= =?utf-8?B?QnNHYXRzWVpCUktMemFvTWloaGdWckp2bkZhMmVVREg4cUJ1cERaOUcwcS81?= =?utf-8?B?VUJOS1NTZWZWVWpkdUlsc0piYTNjb3dENjN4NDE1T0JwbFdPUDdYdEpYRWdv?= =?utf-8?B?RWxmcEJVa0JrZkdPSVA0MzcwVXFkTjU5M1FvYzBESFFjTEtCNGlDYmU2Nmtu?= =?utf-8?B?dWFmZ08rRGFzUXBEZXV0NXY2dGJ5NWhqTXRackhSRGVyT3E4Sm1XakpRbTMw?= =?utf-8?B?aGkzR1lsdjk5bUFaRnNOMjR0dUJvUE5TUUZ4WFdMYnI1Nk5EeEpXQ21lbnpn?= =?utf-8?B?OFZHU1preWcrUUFRUmZZc3IyOGU3dzhrSWE1RUxsUERzS0QrTW54amhSclk5?= =?utf-8?B?Zjk5WWhuZGliVmdXdENOYzVTcnZkS0RtU01ORUpuVGRDYkdoalFqZ1c4Zk9F?= =?utf-8?Q?brk1Mku3kEZEmvbDF+XX4XWlX?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 633df9f6-4b39-43ad-98a4-08db5c911342 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB6280.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 19:57:16.7971 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Nhq9bjKI76o6GLYmkuGdYKHuVv+e2c5GiJaZqlfqqaMvHnOyKDIRaMO7y4EGP7Ek9mSYChtLCNDQvKYOemqKRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8764 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 >>>> Cc: Harry Wentland >>>> Cc: Kenny Ho >>>> Signed-off-by: Hamza Mahfooz >>>> --- >>>> 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 >> >> 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