Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2569564rwd; Fri, 9 Jun 2023 13:20:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZOH0ekmeCx5SF0VYAnTVgwU/tZjEn8CCqBtS/DsiepSbpjWMH+UgAfFueM8Tj3U2yV9h/ X-Received: by 2002:a05:6a20:3d88:b0:115:5ed5:34d3 with SMTP id s8-20020a056a203d8800b001155ed534d3mr2170541pzi.20.1686342034451; Fri, 09 Jun 2023 13:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686342034; cv=none; d=google.com; s=arc-20160816; b=DjXcPSjN1rQM96vzSITh6HutS7BMxhgWEFNMQEWQF0AGN3LfeKAh+2ApiZUxqhdrfh cF62o6lls9Ny1Jx/zntAfHzUQAvl28tWzZkUTScjQoCqJW9eXp3dfo6BLP8Gp8U8Rp3X X5Daw63J1vOHjzhjNXj3CXQY57fO7WM54zJtJIGKSBUanzIrrIQ0hn0osSJ1M6tAdft+ S3iS7OXxjtq96tCKoHr6xNYi5kxSThJhIs6IG7iy8ONKDdcOzmBzByau9iF6DryXEisA zheUJhJdUxRccqD32SUR71g/5a+Ovkdwp2frYfZKyYCd9LLybbtU+clVdZLXhfJggEXS rreQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F/33Xfm7G3pTo7qwQsfR0ao3DEDIJb5YAODd6CUYYhs=; b=s2b8Y4g61kMuJv1FbDlCahQkrvS+Lw6Qd32Yn719gPH0HfJqKyWqQinZ15TLB2fX8I RvOn4DiZc2Bs+47HLq7LhBnu3ZTHV68pZU3OwZnUkSJNaNA2qz4ZUqhQUJoekkQD2kJ1 F7dFm7nn1hqkHtpA+8as7fqRD5hIjNUbEzCi2j+djPP10CwBwQvVD7xyBumZwoLzvKVC vzcYunaFXW7vZDyOqvstGIp67+cagqw6zDprqvwNV+MEEQrktc+P4cAqx3UZYaMs16T2 PnegxVPjUiYWHXIrJxZOysTRTV9QJnUMhON4SHSqbVMJQCExNZm8QteUn2QkFBErzhto Axug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Yx0U0eJO; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs192-20020a6328c9000000b00548ff41c773si1734395pgb.393.2023.06.09.13.20.18; Fri, 09 Jun 2023 13:20:34 -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=@kernel.org header.s=k20201202 header.b=Yx0U0eJO; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231244AbjFIUSA (ORCPT + 99 others); Fri, 9 Jun 2023 16:18:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjFIUR7 (ORCPT ); Fri, 9 Jun 2023 16:17:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED4130D8; Fri, 9 Jun 2023 13:17:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A43FE65BBC; Fri, 9 Jun 2023 20:17:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DA29C433EF; Fri, 9 Jun 2023 20:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686341877; bh=wj1b0dkXJQwh8KMgUAauXapvZkooYQVM2RHawbET22c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Yx0U0eJO0CUaPux7M5d3t1fAX/XQAC6XJPEKv41+P1S5TuYz/eR7ndXpb/MA5RZQ+ dfsvWeEsSEskKTqT4ld9+HAOdG4ju7tNmcQ0efY+KW5YndCVI7T6hD8qi2pEmOD+QH 5a227Dm9DcH7zDPWw+Jy1XIq4PDChFe+n0k3ZM6ZwxNGyLchzfoXOhhU9M6zdbUEkc mePEsy73rzGSYrdibBmerLvba9AvRmvTkUcEZ6KlHo+t0O7KtlIbSVkLfL0/V4jbxE Vdg3Fg1BNVnrWvclOTfKrB7YI4GMALh6o7bOYuOtv90f1rw2JT8w8dRrh3LJWXO34c 8E+fmtTSLan7Q== Date: Fri, 9 Jun 2023 13:17:54 -0700 From: Nathan Chancellor To: Hamza Mahfooz Cc: amd-gfx@lists.freedesktop.org, Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Hawking Zhang , Le Ma , Tao Zhou , YiPeng Chai , James Zhu , Xiaojian Du , Lijo Lazar , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: Re: [PATCH] drm/amd/amdgpu: enable W=1 for amdgpu Message-ID: <20230609201754.GA3961359@dev-arch.thelio-3990X> References: <20230609164207.430377-1-hamza.mahfooz@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230609164207.430377-1-hamza.mahfooz@amd.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 + Masahiro and linux-kbuild On Fri, Jun 09, 2023 at 12:42:06PM -0400, Hamza Mahfooz wrote: > We have a clean build with W=1 as of > commit 12a15dd589ac ("drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move > SYNAPTICS_DEVICE_ID into CONFIG_DRM_AMD_DC_DCN ifdef"). So, let's enable > these checks unconditionally for the entire module to catch these errors > during development. > > Cc: Alex Deucher > Cc: Nathan Chancellor > Signed-off-by: Hamza Mahfooz I think this is fine, especially since it will help catch issues in amdgpu quickly and hopefully encourage developers to fix their problems before they make it to a tree with wider impact lika -next. However, this is now the third place that W=1 has been effectively enabled (i915 and btrfs are the other two I know of) and it would be nice if this was a little more unified, especially since it is not uncommon for the warnings under W=1 to shift around and keeping them unified will make maintainence over the longer term a little easier. I am not sure if this has been brought up in the past and I don't want to hold up this change but I suspect this sentiment of wanting to enable W=1 on a per-subsystem basis is going to continue to grow. Regardless, for clang 11.1.0 to 16.0.5, I see no warnings when building drivers/gpu/drm/amd/amdgpu/ with Arch Linux's configuration or allmodconfig. Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor > --- > drivers/gpu/drm/amd/amdgpu/Makefile | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile > index 86b833085f19..8d16f280b695 100644 > --- a/drivers/gpu/drm/amd/amdgpu/Makefile > +++ b/drivers/gpu/drm/amd/amdgpu/Makefile > @@ -40,7 +40,18 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \ > -I$(FULL_AMD_PATH)/amdkfd > > subdir-ccflags-y := -Wextra > -subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable) > +subdir-ccflags-y += -Wunused > +subdir-ccflags-y += -Wmissing-prototypes > +subdir-ccflags-y += -Wmissing-declarations > +subdir-ccflags-y += -Wmissing-include-dirs > +subdir-ccflags-y += -Wold-style-definition > +subdir-ccflags-y += -Wmissing-format-attribute > +# Need this to avoid recursive variable evaluation issues > +cond-flags := $(call cc-option, -Wunused-but-set-variable) \ > + $(call cc-option, -Wunused-const-variable) \ > + $(call cc-option, -Wstringop-truncation) \ > + $(call cc-option, -Wpacked-not-aligned) > +subdir-ccflags-y += $(cond-flags) > subdir-ccflags-y += -Wno-unused-parameter > subdir-ccflags-y += -Wno-type-limits > subdir-ccflags-y += -Wno-sign-compare > -- > 2.40.1 >