From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BB92C19F2B for ; Fri, 29 Jul 2022 06:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235081AbiG2GxJ (ORCPT ); Fri, 29 Jul 2022 02:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234751AbiG2Gw6 (ORCPT ); Fri, 29 Jul 2022 02:52:58 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6088050C for ; Thu, 28 Jul 2022 23:52:56 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id e5so2740880qts.1 for ; Thu, 28 Jul 2022 23:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B9NJPMCqsZZzif8NOi6LqBERuaw3Qi0GLNSjXaKH72E=; b=ouhZLlcvdbHtvTf8YiOPEo07AwaL3uSKyKjAL/0/JobC+hqJYFj2hPitySQnXMVmXr jX6Vj8FadMnkc9GRr+1qhzOjhORahTchrfixJIj93dV669SrEQNR/NYkeBnpX9XCDKrD EjuCOGzLj3ynVi0ctabQWqVkPDbPd2Ig6ob8oT4bMqPeiiV0pQaRf8KZSEl9n6KNLinf 3GuoC/3SaicfSNEPRZpHzpFr/uSBf4MFNIdKJWjH3Wa3b6Ln/wBd32CagEzMmi8daPFs xu4o2NbjuLbjWvnAuwsi4guqdXJXAAkf1Ot94cP4ACDhDg5aBIDVeqPoEMatRMlmFHI1 qiXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B9NJPMCqsZZzif8NOi6LqBERuaw3Qi0GLNSjXaKH72E=; b=LwVI3pQMQ0pw6hpN1g6ruTbeDhKY78bqgs4Ey3lhAjKIeMhDWLmU0gz67IF2uzEeG/ ZTDlBTFGygMI1cqlDY/GjHeIFEflF2fnPHLea3RSLBxplq8sTWe/bpkatQUp5/Kih4uX XFNNU3gxMs48rb+igJ/P6utlzBGJe3CzSGKbS4Tm3IXg62KhbMpOusOQVlPwv/ZqBXHs g4LWF4GWix7HaflAbXK9TkkG4i4C1p9wBrzSKzcZ0MFewPjruVUXAEZXuN+9w1t6F+Mg 8gO3lmLG8BvdSWOr9KKaUKurM9daelHj24lRNcimbMAG+KEL0CfE60g0HmnDvXBHwOY7 Qg3g== X-Gm-Message-State: AJIora8SsxqTiGSvg6/wP5dzFaLdVGlfOFl6G5api2yzLNWSU9nSHor6 A8tdL3aJHENKuFFhmOlvApeHfq6G3ylyflaQdBHdNw== X-Google-Smtp-Source: AGRyM1ulXYs5LWVIFJXKUv4+yuTHZrksYcFCAawy5yUnHHithMuDKkcC43SQczJ+AibEVdQ6zRlR2WiS6vf9kyrleIc= X-Received: by 2002:ac8:5942:0:b0:31f:39f6:aba7 with SMTP id 2-20020ac85942000000b0031f39f6aba7mr2122937qtz.295.1659077575797; Thu, 28 Jul 2022 23:52:55 -0700 (PDT) MIME-Version: 1.0 References: <20220727100615.638072-1-dmitry.baryshkov@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 29 Jul 2022 09:52:44 +0300 Message-ID: Subject: Re: [PATCH] kbuild: take into account DT_SCHEMA_FILES changes while checking dtbs To: Masahiro Yamada Cc: Rob Herring , Michal Marek , Nick Desaulniers , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , Krzysztof Kozlowski , Bjorn Andersson , linux-arm-msm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Fri, 29 Jul 2022 at 08:55, Masahiro Yamada wrote: > > On Thu, Jul 28, 2022 at 2:36 AM Rob Herring wrote: > > > > On Wed, Jul 27, 2022 at 4:06 AM Dmitry Baryshkov > > wrote: > > > > > > It is useful to be able to recheck dtbs files against a limited set of > > > DT schema files. This can be accomplished by using differnt > > > DT_SCHEMA_FILES argument values while rerunning make dtbs_check. However > > > for some reason if_changed_rule doesn't pick up the rule_dtc changes > > > (and doesn't retrigger the build). > > > > > > Fix this by changing if_changed_rule to if_changed_dep and squashing DTC > > > and dt-validate into a single new command. Then if_changed_dep triggers > > > on DT_SCHEMA_FILES changes and reruns the build/check. > > > > > > Signed-off-by: Dmitry Baryshkov > > > --- > > > scripts/Makefile.lib | 14 ++++++-------- > > > 1 file changed, 6 insertions(+), 8 deletions(-) > > > > > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > > > index c88b98b5dc44..3df470289382 100644 > > > --- a/scripts/Makefile.lib > > > +++ b/scripts/Makefile.lib > > > @@ -383,17 +383,15 @@ DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m) > > > DT_BINDING_DIR := Documentation/devicetree/bindings > > > DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json > > > > > > -quiet_cmd_dtb_check = CHECK $@ > > > - cmd_dtb_check = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true > > > +quiet_cmd_dtb = DTC/CHECK $@ > > > > This is supposed to be 7 chars or less. DTCCHK or DTC_CHK perhaps. Or > > always do just 'DTC'. I can fixup when applying. > > > > I'll give it a few days for other comments. > > > > When you change DT_SCHEMA_FILES, re-running dt-validate should be enough. > You do not need to re-run dtc. > > I guess the strangeness comes from the fact that you are trying to do the > two different things in a single rule. The issue is that with the current rules the dt-validate isn't re-executed on DT_SCHEMA_FILES changes. Thus comes my proposal. -- With best wishes Dmitry