Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp81959rdb; Wed, 20 Dec 2023 06:56:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGb7L/ldb1855qj+Mug4MRc/k2ftrqU2O8kVaVcS19DeoxjD3Z2eoaaF22r2E4z6SVwFCWg X-Received: by 2002:a05:6512:33c7:b0:50e:1ed9:cb41 with SMTP id d7-20020a05651233c700b0050e1ed9cb41mr4845537lfg.35.1703084161742; Wed, 20 Dec 2023 06:56:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703084161; cv=none; d=google.com; s=arc-20160816; b=DAqnMKkYnO5CnXVUesVJg93sV//ePR9gikBysqbo+OwYh5yywvnSUVENNZ4Xpr6mUT 91kOUy761+nnkwSViwDhB4/PPzftM0CpyGLfWt1zI4qubtsHYyVq2xq0qrStsl+H50wG QEqJQbDdRaRyyspR0mA0J2CYj+Cq0dVVndLKMNL6y6WkbDNr9LocaTW7eurDHR7JDgot 0Zq46KYITdz978L5Qt+/GF4ZxxQPXrkrfCUH5hplDANzzRtzrPE0f80JjcDhbl1Ra+F5 jW+UvwrzxclfhVsw82X/L7CZm9969yNQsxXu2l9pPbcWmqOPZz/W5HoqGAwlaKe0u8Ot oh1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=CkImlzYfE+JGucnDuYdZCwAqWDnn1ZRuOvIb2guMhPs=; fh=jxLziTpnmmF8pV0bnuYJsmv4DXeJ7nJZDXhvmS+RTAs=; b=m2QJVeLvOideOdz0AOXE7RsZLrpezpko63NatVLxIXFCgBhigZn3dtfwa0MUdpKtQ1 tyc5aJO+v7lA4DEFpyaoj44ZhQziTfCdSixxeg6K8LCDJGdkcSjsCEgMqWdg0w0bY+Ct J8YwbombgYKbwCh/Og3UOtM7YrKM0WZLn9XaqK5oKphAveqqE5KPgrpjHZgO0hxgCz0f 1GrdbqdYpkraxEC3kmbf6GPL3c/NPyeM8nWHsJ3YA9gdpF5QUArg6lljDsZmDTjywsGq zySDiwlLWZpSEGs43g89I9sTeZYeflkh4dCnlzCcnKIM53/rPEZKLJ+hdE0I40X/53yL mzEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wTEIP8Gk; spf=pass (google.com: domain of linux-kernel+bounces-7093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7093-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c39-20020a509faa000000b005530123b2f2si4016695edf.624.2023.12.20.06.56.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 06:56:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wTEIP8Gk; spf=pass (google.com: domain of linux-kernel+bounces-7093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7093-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D6EF71F236CD for ; Wed, 20 Dec 2023 14:55:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C12753D989; Wed, 20 Dec 2023 14:55:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wTEIP8Gk" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6404C3D97F for ; Wed, 20 Dec 2023 14:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-54c79968ffbso6521346a12.3 for ; Wed, 20 Dec 2023 06:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703084139; x=1703688939; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CkImlzYfE+JGucnDuYdZCwAqWDnn1ZRuOvIb2guMhPs=; b=wTEIP8GkRyeS6BThqr3qMMYRaUyri+NCJfJc0Boq4iLZ6NunyuEY8kr5+olN7oaJPt RDcHYK8PbvtHcPsXDPwzPLsjO4P1/RBqxC3/kYfT9a8tdXaK4x0BQ+WzfPr1zDQD1Ibn ZKZA8f9F3GRUoUwQ7TjjWBpRJEjBooc/WbwXZNObyyUkLCf6aAlIKniJYWKy8zn707Y+ 0ZRrb9Gk72YtAj6VHLGTN+SUVy/vRPtUhoyQOWaDbgBVJhqfqC5NVchmRI+2xjKopIsr kcVgIrExYvEgn0Ar34NZensAwfd2FgHkmCFsH6id1MGceHA/53QPppLja5qK1bVWf3Cg xUIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703084139; x=1703688939; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CkImlzYfE+JGucnDuYdZCwAqWDnn1ZRuOvIb2guMhPs=; b=fyT1KKym7Nt2K+8HBDA0cXCLidW7UcanR/2+PiCOT+CnPn7WNo4XCQGXTbMZFGSmWv dj6ceGebfK/kDStVxCQm1e9PlohwDDQEQbn3NJtmbHxyBSIk67VP53gxD8k/IlkZxK/S wyX622CUsGZGcNoYGsORGoiaeBzAbu2WzbEp++vuODk0b8TlBIdpx5iZrQKpeyqnf1fq LrUQHj6BPuy6KY55htkIxGctGfRUOyNmvuvHu2Q0725SZyy7Ddl/dpuXYjyZ24jVkpzP VLaLZ4ZjB07qKJJ2WcZHmSCoDPaAp5vexxesThws0HBpKkdSZmulZRakd45QOePaSTxg qXHw== X-Gm-Message-State: AOJu0Yy5pdOXSlx1BVqB7sBupNHcBsW94p4r7eqF0utM7MJdK8m9ySIe F5b2nhyBD8KEjZS3qE+96NcHZ6vMroTtmG4OqPAP62bW X-Received: by 2002:a17:907:ea5:b0:a26:854b:22ae with SMTP id ho37-20020a1709070ea500b00a26854b22aemr1777099ejc.64.1703084139470; Wed, 20 Dec 2023 06:55:39 -0800 (PST) Received: from puffmais.c.googlers.com.com (61.134.90.34.bc.googleusercontent.com. [34.90.134.61]) by smtp.gmail.com with ESMTPSA id ay10-20020a170907900a00b00a2699127f98sm437926ejc.87.2023.12.20.06.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 06:55:39 -0800 (PST) From: =?UTF-8?q?Andr=C3=A9=20Draszik?= To: linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , devicetree@vger.kernel.org Cc: Masahiro Yamada Subject: [PATCH] dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES Date: Wed, 20 Dec 2023 14:55:37 +0000 Message-ID: <20231220145537.2163811-1-andre.draszik@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the location of the kernel sources contains the string that we're filtering for using DT_SCHEMA_FILES, then all schemas will currently be matched, returned and checked, not just the ones we actually expected. As an example, if the kernel sources happen to be below a directory 'google', and DT_SCHEMA_FILES=google, everything is checked. More common examples might be having the sources below people's home directories that contain the string st or arm and then searching for those. The list is endless. Fix this by only matching for schemas below the kernel source's bindings directory. Note that I opted for the implementation here so as to not having to deal with escaping DT_SCHEMA_FILES, which would have been the alternative if the grep match itself had been updated. Cc: Masahiro Yamada Signed-off-by: André Draszik --- Documentation/devicetree/bindings/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 3e886194b043..2323fd5b7cda 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -28,7 +28,7 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ -name 'processed-schema*' \) -find_cmd = $(find_all_cmd) | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" +find_cmd = $(find_all_cmd) | sed 's|^$(srctree)/$(src)/||' | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | sed 's|^|$(srctree)/$(src)/|' CHK_DT_DOCS := $(shell $(find_cmd)) quiet_cmd_yamllint = LINT $(src) -- 2.43.0.472.g3155946c3a-goog