From patchwork Tue Nov 1 22:03:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13913 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3233521wru; Tue, 1 Nov 2022 15:04:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TBVC/h6i3to1l95hf+jezxaI7vk7I8yJqrO9I4PU6Rv55+QbjPbf3Y7Dyt7/OF/YR9aFO X-Received: by 2002:a17:907:a07a:b0:7ad:88f8:7ed9 with SMTP id ia26-20020a170907a07a00b007ad88f87ed9mr19676923ejc.579.1667340244912; Tue, 01 Nov 2022 15:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667340244; cv=none; d=google.com; s=arc-20160816; b=OTEs8rJ3NAVPnmy7mlRb3eNnyODKwAS6yhUMTPK2ThWNFUnqt8GlAv64tJCpO1l/+p ZGoPxSnqOvetsbio29J0dSsXCACDsbdGv+5AaknQtxZipot1Y/uya8O7lL7hZCQiYqFw v2RgZtO8FL341iFYoGi55pI7wtrsop84rQCjH073WElB8I4Sa1kp074MjzRnhFbHbNUK VSEkGVxqhPGHxxbqjRyxldxTMGO/NVOZWofMa/o+PExjxRE2++TbpbKHyEyt1YBUl7Bn GiUm1HYziTWHH941lxtcvuV9Nj/hSDGUvp+CJs2xrtk34Pk6R6ZKkbVm6ggJtI7M958D 9QzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WQKmZwmRwxOn+HnD1KFV5jlF5xh+33dSq3nC9o1DTzk=; b=vMT7nLvzkBfRYZVwDiR/lNSx00WB5zjzIHFXl7CUtWJhJDNQ0aZpcai/NYHyv9KBW7 vPH/rK1uRpd6Rzl0nbdyB0ygUH/g9MmHmaKuDRb+xmx39CiL/VDYotNnUELQDKf+j3Hp cEnPfLRSUqgy20Sh8vJgTPBN1buyZf+XM1/VRoeMSZRcd0kl7L9Q9naJRgfnQvua8xzR wTGAYQySm3EvgjXPhS0D/fkkH9svyxuvmADir96pQaditBKAIJqOaNMghkK4gYgPj2jU jrnWjFBYQi8Jf4e2U6Mh4EzZ5hrh+G6vyE+/l2b0Ybw2+80/Q7ODdlSptBhnZaEYzhFz xD9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="j+ei/IQG"; 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=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a1709061dd200b0077ef3eeca17si9946404ejh.155.2022.11.01.15.03.39; Tue, 01 Nov 2022 15:04:04 -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=@collabora.com header.s=mail header.b="j+ei/IQG"; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230503AbiKAWDM (ORCPT + 99 others); Tue, 1 Nov 2022 18:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230357AbiKAWDK (ORCPT ); Tue, 1 Nov 2022 18:03:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B0163894; Tue, 1 Nov 2022 15:03:10 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 33F8F660284F; Tue, 1 Nov 2022 22:03:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1667340188; bh=yMp4w9RoWXCGng4R5gRPNg63j86qA6FnSxUKrRZ65bs=; h=From:To:Cc:Subject:Date:From; b=j+ei/IQG//damy7N0vcrtAagkDLsrP4ZOsk52t5QV64cHuYQQBW58N91q6uAmEQzo 5Zh7RRckssF/ZPC1kHvZymv8aB4O9ocAzfWN6QULCBkX3NTPJikOLE2A4giFsFLtJz HPEbSPCP1UVpf4vcqCYag3kgn3oZ8HN9MZKdR0L5J1Vg/eoAk9aFnh6VZgb+ahnC7D p+VO7ciIXExKioAmxgyth17Z8pOiozefhqs7gQPMpoi8SdUXSLKK/Syn4IFXLo0JNL majVSvEOYMtQHT7H2k6Fzo1ng8cfLGPQETsuk85neh3FM3vVXlHt5VTg3Sq56rQuaz nOQoa4+tBaUDA== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Rob Herring Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Masahiro Yamada , Matthias Brugger , Michal Marek , Nick Desaulniers , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH] kbuild: Add DTB_FILES variable for dtbs_check Date: Tue, 1 Nov 2022 18:03:03 -0400 Message-Id: <20221101220304.65715-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748332964483534785?= X-GMAIL-MSGID: =?utf-8?q?1748332964483534785?= Currently running dtbs_check compiles and runs the DT checker on all enabled devicetrees against all dt-bindings. This can take a long time, and is an unnecessary burden when just validating a new devicetree or changes in an existing one, with the dt-bindings unchanged. Similarly to DT_SCHEMA_FILES for dt_binding_check, add a DTB_FILES variable that can be passed to the dtbs_check make command to restrict which devicetrees are validated. Signed-off-by: NĂ­colas F. R. A. Prado Tested-by: AngeloGioacchino Del Regno --- Usage example: make dtbs_check DTB_FILES='arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dtb arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dtb' scripts/Makefile.lib | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ec391c6a2641..f3ac6d3632a2 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -418,9 +418,16 @@ 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 +ifeq ($(DTB_FILES),) quiet_cmd_dtb = DTC_CHK $@ cmd_dtb = $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true else +SHOULD_CHECK_DTB = $(filter $@,$(DTB_FILES)) + +quiet_cmd_dtb = $(if $(SHOULD_CHECK_DTB),DTC_CHK,DTC) $@ + cmd_dtb = $(if $(SHOULD_CHECK_DTB), $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true , $(cmd_dtc)) +endif +else quiet_cmd_dtb = $(quiet_cmd_dtc) cmd_dtb = $(cmd_dtc) endif