Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4183787rdh; Tue, 28 Nov 2023 14:26:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+/9NZPZRBsGSV9ObSQPCeSu2i9NC/cOB8+sKyJLC8dsamsdkk9WzVZ/iQ6JHhrelktJ0G X-Received: by 2002:a05:6a20:e30b:b0:187:152d:c1e2 with SMTP id nb11-20020a056a20e30b00b00187152dc1e2mr17304456pzb.46.1701210370837; Tue, 28 Nov 2023 14:26:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701210370; cv=none; d=google.com; s=arc-20160816; b=kqBT2Fj7QWV4u0UlYhnUdfDPtEgEVUBqyjzIcYTEpIEPcviyDAH6LhFQjDCVqum+H+ fjmvdhpHvUdcqQ6QnCBN77gGwHjAnIkPIHUqBA6g6EESAhsMyo0QXUvpWGudLelZiDaW LZW1c5AvScRmh0srEGrMpbqrS3uAprl6LlOWRzU5IdfUblklAlSDCyEl9XQ69UMx0uK6 DVQkUrgezR2S6V3ynF+IztRfAJbxXZkYByNj/tpUj/rA6EkgsHDcBs1ucuUGjyJp497m G5J83+LV14vDR7cLdXWs1YWWzm+QFhbK+t2uK9yzh7zgXKVFiZD3gw9h8nBQZY+qYq4D 9qSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kYwv2u7zH08U005CchgZQamyfkdG1eHEvRTvgB0wFd0=; fh=8gjw9r+fntR6EyAHD3jmXk5fvin/5WrbZyy5+pamKG4=; b=pzlCeRw2hVBvgmz3uv8arLhnFw+qaxX+fiOUeOMsZQ7gz0Ep2L5nk291zzoSbEkU7n dsIEaTTscMLjOga9D94GOXZfeBNyzAQTUfGy0g81YkvFm6JPz2POpp5C07MbFTenUV5e FuyG7PwfxwahT4M3IYIoJA27tePVkRnhb7d9S7S26vDyPmXHuk2sQWG5yW+5Z3fGEFxs 4VIPZQmWJVJQDDBg87juedc/0HT+7MMR17yv/aZfQ10GzM3an7CTbdLn4yRMddjmqWYG Z+9uAH/3m9lhFWOusMAirIrL/drFVwpV+h8e6s0WxYUrbERLC4wAIe97JMCWD2cxB8sR Wtcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jm81GYhQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h14-20020a056a00230e00b006cb88a284dfsi13113494pfh.164.2023.11.28.14.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 14:26:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jm81GYhQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E4FB181F843A; Tue, 28 Nov 2023 14:26:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234782AbjK1WZu (ORCPT + 99 others); Tue, 28 Nov 2023 17:25:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376623AbjK1WZj (ORCPT ); Tue, 28 Nov 2023 17:25:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1819F1BF for ; Tue, 28 Nov 2023 14:25:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0965C433AD; Tue, 28 Nov 2023 22:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701210344; bh=xw0jvipvintPrN+TgSa50fPhSr/OQ4+PLz58lH+HcbQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jm81GYhQKdtghqZzcibJps70VcRXNVXYv83wu50oGnscBqTrRc/YtqxTp7E7cuE/6 NRtc0GGIDU1bI0MyNKDuFDCKQ3kZsEU6iskMiWTMYb47Sas28ml6p2C7WuDCa7ELxO hvOBXHoJDFIrncf8lWiN0ssSqT3s1B6AdpdM02wtvE8DiCCElHXjSIBepJ+06NwGMf H+Cy8uxOmMfNP5eSAoB87/JM0Refr5wwxVmXtgsVTtanzxTxI/alFcRPXGLRtNomUG UVg2asGdOH/+adDowrri+E8+XK4W0HhI5LNyHdJAwEuWNo8vXHLOxRRRqxHGIJlBmn 0cz0ceMXh2McA== Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-50bc21821a1so872212e87.0; Tue, 28 Nov 2023 14:25:44 -0800 (PST) X-Gm-Message-State: AOJu0YzNf2XAPPoZin4D+iCchkZVXyHSYb3SCl+RpjcbSc7+AFTAhrZu dWkLVu3Aw+p3qjeS9ULRnX1mE/CkliPLawJg9A== X-Received: by 2002:a05:6512:4d1:b0:50b:a806:966b with SMTP id w17-20020a05651204d100b0050ba806966bmr7526326lfq.23.1701210342779; Tue, 28 Nov 2023 14:25:42 -0800 (PST) MIME-Version: 1.0 References: <20231122-dtc-warnings-v2-0-bd4087325392@kernel.org> In-Reply-To: From: Rob Herring Date: Tue, 28 Nov 2023 16:25:30 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/4] kbuild: Per arch/platform dtc warning levels To: Masahiro Yamada Cc: Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Krzysztof Kozlowski , Alim Akhtar , Conor Dooley , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 14:26:08 -0800 (PST) On Tue, Nov 28, 2023 at 6:03=E2=80=AFAM Masahiro Yamada wrote: > > On Mon, Nov 27, 2023 at 11:03=E2=80=AFPM Rob Herring wr= ote: > > > > On Thu, Nov 23, 2023 at 1:39=E2=80=AFAM Masahiro Yamada wrote: > > > > > > On Thu, Nov 23, 2023 at 7:12=E2=80=AFAM Rob Herring = wrote: > > > > > > > > This series adds support to set the dtc extra warning level on a pe= r > > > > arch or per platform (directory really) basis. > > > > > > > > The first version of this was just a simple per directory override = for > > > > Samsung platforms, but Conor asked to be able to do this for all of > > > > riscv. > > > > > > > > For merging, either I can take the whole thing or the riscv and sam= sung > > > > patches can go via their normal trees. The added variable will have= no > > > > effect until merged with patch 2. > > > > > > > > v1: > > > > - https://lore.kernel.org/all/20231116211739.3228239-1-robh@kernel= .org/ > > > > > > > > Signed-off-by: Rob Herring > > > > --- > > > > > > > > > There were some attempts in the past to enable W=3D1 in particular su= bsystems, > > > so here is a similar comment. > > > > > > Adding a new warning flag to W=3D1 is always safe without doing any c= ompile test. > > > > > > With this series, it would not be true any more because a new warning= in W=3D1 > > > would potentially break riscv/samsung platforms. > > > > The difference here is the people potentially adding warnings are also > > the ones ensuring no warnings. > > > > > Linus requires a clean build (i.e. zero warning) when W=3D option is = not given. > > > > Linus doesn't build any of this AFAICT. We are not always warning free > > for W=3D0 with dtbs. > > > > Does it mean, you can enable all warnings by default? No, Linus might not care, but others (me) do. The whole point of not allowing warnings is the same. Get to zero warnings so any new warnings stand out. We now have some subset of platforms which are warning free and want warnings enabled by default to keep them that way. How do you suggest we do that? I understand your point on W=3D1 in general, but I think it just doesn't apply in this case. In general, someone may be testing a new compiler and there's some new warning to enable, so they add it to W=3D1. They are working independently of any subsystem (and Linus) and introducing new warnings would be a burden to fix and a problem to leave. For DT, it is a bit different as adding new warnings, updating dtc version, and selecting warnings to enable are pretty much all done together. Plus, schema warnings have pretty much superseded dtc warnings. If we do add new warnings which can't be fixed up front, then we could still only enable the warning for W=3D1 from the command line. Something like this on top of this series: diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 53a74e53e0ca..41307c6e1fee 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -341,6 +341,10 @@ quiet_cmd_gzip =3D GZIP $@ # ------------------------------------------------------------------------= --- DTC ?=3D $(objtree)/scripts/dtc/dtc +ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) +DTC_FLAGS +=3D -Wno-some_new_warning_we_need_off_globally +endif + KBUILD_EXTRA_WARN_DTC +=3D $(KBUILD_EXTRA_WARN) # Disable noisy checks by default