Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2469067pxb; Tue, 9 Mar 2021 03:23:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSuYy97kVNh5Rb2w1ZruvGgesOP3FVuDcsFdsbeKNWEXBVAcupF2o/LYF3hlneHzjXFbtB X-Received: by 2002:a17:906:da0e:: with SMTP id fi14mr20412079ejb.188.1615289026406; Tue, 09 Mar 2021 03:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615289026; cv=none; d=google.com; s=arc-20160816; b=Yz4YzT2GX1W63446ZcUoGWgkYet2bFkhMtX0ZQLNGScXgoKeKkm8ClTYZ/qz+N6x4n 00CUp1MStR3tdr9PVyxT54SSaETgmLN6y11vkOB/vkLFesZxgHKixuCVXXoG/FUWqUe3 d1/Vbz5Qa2je4bClyiZ43iivErulN66KJpXq51j4i2etaLjjvGp4S2Kz+Pv1urxfSROW VFLLo23dpiRzHiiFzXO6DMBhfZSTQxRNPDDsDwv4huWyhkZ/lKN1DbcNMTK4lQQP8HMJ lJvtb5eiql3K8nIo9CYWjZPFlpvQN4ddeFvj1HOOuJgQwInW3XfDEY3uxQujdWylG2kq p62w== 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; bh=/U1CtZpdV7piINZfFVyWCUeYouqNuMI1ZxMFPEi73ME=; b=aRmMy+YuvWtlmjXsQ0U2W7bRYAv5k8zxNzaeVqCq/UoaukvAPF4ENPXFJYeUETJ0PV eVD/mTybMkfNNAbUZXiMSSQNFjfr0djxreIVsMQxjz36hoLMPERxQ/0io/ghXHKEh6cy oZMHMVwv88tRNJNZCpI/AOLu35DdhK3vW5M3GfsBsqilto2EdVQLMke+n3dwKL5I2jFZ cf42EUsSHCXk4+2NjUeV+P1JUMUb2jenXFjy9FpuWraCLvayeyqG5Lgjcb4g2CwE+NEQ zmZx2kM7U7mzFpN+iaygkmxkUmipyu4FgQPLg/1oAd6iMXBDR/FGlv5lWnVpjxPbb0AX Oixg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn25si5116822ejb.250.2021.03.09.03.23.23; Tue, 09 Mar 2021 03:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229520AbhCILWX (ORCPT + 99 others); Tue, 9 Mar 2021 06:22:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhCILV4 (ORCPT ); Tue, 9 Mar 2021 06:21:56 -0500 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 461EAC06175F for ; Tue, 9 Mar 2021 03:21:53 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:cc57:dd66:c63b:c8e4]) by baptiste.telenet-ops.be with bizsmtp id eBMr2400e1C546401BMs41; Tue, 09 Mar 2021 12:21:52 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lJaQx-006Gg4-J8; Tue, 09 Mar 2021 12:21:51 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lJaQx-009giZ-50; Tue, 09 Mar 2021 12:21:51 +0100 From: Geert Uytterhoeven To: Rob Herring Cc: Masahiro Yamada , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] [RFC] dt-bindings: Consider DT_SCHEMA_FILES when finding all json-schema Date: Tue, 9 Mar 2021 12:21:48 +0100 Message-Id: <20210309112148.2309116-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Setting DT_SCHEMA_FILES allows the user to restrict the "dt_binding_check" make target to a specified set of DT binding files. However, yamllint is still run on all available files, which can take quite some time. Fix this by changing "find_cmd" to only return the specified files. Note that this also affects the "cmd_chk_bindings" and "cmd_mk_schema" rules. This reduces the execution time of make dt_binding_check DT_SCHEMA_FILES=/path/to/json/schema/file from ca. 22 to less than 2 seconds on an i7-8700K. Signed-off-by: Geert Uytterhoeven --- Should this be restricted to cmd_yamllint? I'm not sure which users of find_cmd do and do not need all files. --- Documentation/devicetree/bindings/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 780e5618ec0ae2fc..60ac03bade2da0ad 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -22,10 +22,18 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE # Use full schemas when checking %.example.dts DT_TMP_SCHEMA := $(obj)/processed-schema-examples.json +ifeq ($(DT_SCHEMA_FILES),) + find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ -name 'processed-schema*' ! \ -name '*.example.dt.yaml' \) +else + +find_cmd = echo $(addprefix $(srctree)/, $(DT_SCHEMA_FILES)) + +endif + quiet_cmd_yamllint = LINT $(src) cmd_yamllint = ($(find_cmd) | \ xargs $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint) || true -- 2.25.1