Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2876903pxb; Mon, 18 Oct 2021 03:56:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6pLUw9wfoTa1G1XOGAGWciMcYj9TlAR1wfXnmksgRO+EngrmTGR28olWSFYzzsELGAD/S X-Received: by 2002:a05:6a00:24c1:b0:44d:3047:4229 with SMTP id d1-20020a056a0024c100b0044d30474229mr28037241pfv.70.1634554567986; Mon, 18 Oct 2021 03:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634554567; cv=none; d=google.com; s=arc-20160816; b=IozhmXWOg8JaYj09ZQcGDdG+hCqiWyqMuhvKllqABFMcHcVvwhtybH12LxgrXLgF9x Y+5Zu1HvsQ96qondJVSorSlls6YbmeObUECofrg/TjikVH2WKioFOAK8VVpQxE144Zjj EwhIIzu/uiYK6gJ6tpHXUuLH3t4h3O4iWjC0z4NqOhY4/2tMSmqvooTlyUYGL5hwv6bM ESywGzxZ1o3p4IB6aVvrryvtNEQRWaGTQIrrT9uMqJ5xsOBsXI9oM/jpFE2D+UBc5LvY UGH7nQTUtQfuT2ej+t5etjRochl3QLspKJtD4DqjHVJcblmBiCONuEZ7f7T3oFTYOTvF Rrfw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SI8OZCrXQk+kS85/aGAguDgusegnsG6x4tZSqLboMwc=; b=WCtpRFpRnonatixcXkqmILR74wXL/KqoeAa5rka4ip4M59TvrM7jKKerqFsGeIgH4s i66tY73U0cL37A38pu/osQN3Ai1jqBIhyOdjlkW6seBDuIJiQyNsAzPRCyVbiIkae/69 kmQUfWZEmb6zNN9reg9rxNRnx52x2AQqbaMo6VXzPVAjchaCDP4yXH/d8PnosimFQU+Q o9xTiFMhtPgvb2g6h/a8kK4Sadx7qMXFosOXs0JKgLwZy/qDwBLZLzE8LD3lmH4aGiOV AKBOF3TVMgdgvfgc8t3AOt32Sj0esqsAT/pEjkkUlXNBZj05m6k0UORu5M0H1san7If1 r/9Q== 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 w124si14246239pfw.314.2021.10.18.03.55.55; Mon, 18 Oct 2021 03:56:07 -0700 (PDT) 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 S230512AbhJRK5F (ORCPT + 99 others); Mon, 18 Oct 2021 06:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbhJRK5E (ORCPT ); Mon, 18 Oct 2021 06:57:04 -0400 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 72A07C06161C for ; Mon, 18 Oct 2021 03:54:53 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:e87a:7c37:aec5:5884]) by baptiste.telenet-ops.be with bizsmtp id 7Nur2600122VXnz01Nur1Y; Mon, 18 Oct 2021 12:54:51 +0200 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 1mcQI6-005sWT-PI; Mon, 18 Oct 2021 12:54:50 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mcQI6-00DbGk-7p; Mon, 18 Oct 2021 12:54:50 +0200 From: Geert Uytterhoeven To: Rob Herring Cc: Stephen Boyd , Joey Gouly , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/2] dt-bindings: Consider DT_SCHEMA_FILES when finding all json-schema Date: Mon, 18 Oct 2021 12:54:48 +0200 Message-Id: <174ab1d791b7bc65f3b0f11b72be13af1748c731.1634551582.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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 not only takes time, but also outputs warnings for other binding files the developer is not interested in. Fix this by renaming "find_cmd" to "find_all_cmd", introducing a new "find_cmd" to only return the files specified by DT_SCHEMA_FILES (if present), and using the latter for yamllint. Signed-off-by: Geert Uytterhoeven --- v2: - Introduce find_all_cmd, - Only use the restricted set for yamllint. --- Documentation/devicetree/bindings/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 6305cfa9495ed676..1a8c3ab9a538837a 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -22,23 +22,29 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE # Use full schemas when checking %.example.dts DT_TMP_SCHEMA := $(obj)/processed-schema-examples.json -find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ +find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ -name 'processed-schema*' ! \ -name '*.example.dt.yaml' \) +ifeq ($(DT_SCHEMA_FILES),) +find_cmd = $(find_all_cmd) +else +find_cmd = echo $(addprefix $(srctree)/, $(DT_SCHEMA_FILES)) +endif + quiet_cmd_yamllint = LINT $(src) cmd_yamllint = ($(find_cmd) | \ xargs -n200 -P$$(nproc) $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint >&2) || true quiet_cmd_chk_bindings = CHKDT $@ - cmd_chk_bindings = ($(find_cmd) | \ + cmd_chk_bindings = ($(find_all_cmd) | \ xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)) || true quiet_cmd_mk_schema = SCHEMA $@ cmd_mk_schema = f=$$(mktemp) ; \ $(if $(DT_MK_SCHEMA_FLAGS), \ printf '%s\n' $(real-prereqs), \ - $(find_cmd)) > $$f ; \ + $(find_all_cmd)) > $$f ; \ $(DT_MK_SCHEMA) -j $(DT_MK_SCHEMA_FLAGS) @$$f > $@ ; \ rm -f $$f @@ -48,7 +54,7 @@ define rule_chkdt $(call cmd,mk_schema) endef -DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_cmd))) +DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd))) override DTC_FLAGS := \ -Wno-avoid_unnecessary_addr_size \ -- 2.25.1