From patchwork Thu Mar 11 23:36:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 397573 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp732959jai; Thu, 11 Mar 2021 15:37:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwr2HWi7Wp/mTyNzc/Hj3s6yDQpsj52jPpTQoaV59I1xB4ks+NOq5/yk3L/+0Tgc8M5+7D X-Received: by 2002:aa7:d385:: with SMTP id x5mr11207635edq.289.1615505857166; Thu, 11 Mar 2021 15:37:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615505857; cv=none; d=google.com; s=arc-20160816; b=fylLDtQSBoQRXW29F9Keoeqg1TRwMjv7ta3YUhVnMyuI7KTeTDsm0/h7AVMIQeiEHg uH2ffn+vB4qU6DJnX+pHbpauCRwwtKSloYNmGvws6aV4poZ9UErkXHl74cneo1zscbY7 FGbti+Ry+3F8KthMNosIFqAblBw8Q8Ah/XI/5mIY7kfA2MXaRF7AeVgxvJMQvTH4A8h9 z4lSLMkct9GAcjd2czcDDu77nRNYskWMeXK2H+6htaUqiDwdh/gnsn6CHa/mMivyM2tA QcpCD+87rfQm6IFm0FsX+4w10KwbFX+zHKyjtwtSSkrqOK2Ko3lpwIIbMVAuYQq5C9um sNlQ== 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=TEluSVU381Ra21RcLCeHjZXwMsuJenQrl8kmmWg+LmQ=; b=AP+E3i4UMip3lGNapBsdsX1+mtgfR2N3qpreyfMk0EKmMGqsDs1NSQQOM4WmE0jw5P vs3H+/Oihx6iJ1XVHoLHUBpIP0CNe1t3qOYK3z4U0LnTwZXcs3T3nadLE8H+A5o0HfYD 6nxfBPsxT/Fjmr4ZBsFGX+0R/tfUIEw1Ve4mHBWZEvcd6HnqEwswuhPn8Y9mqq9MMxS7 iQZyQPV0p4ZdKOlQYx5/Jpqsas4uOs+uCvi4dPa62BLP88vgVhpq/8vlYJqCOYeigyKw gaPQxHwpYCCW1onAhvi2ZLmiIqLcoNdtrDmEANM4m++wpz04BXpwJf43pHm/grXWxpsH MacQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si2644595ejn.375.2021.03.11.15.37.37; Thu, 11 Mar 2021 15:37:37 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231149AbhCKXhG (ORCPT + 6 others); Thu, 11 Mar 2021 18:37:06 -0500 Received: from mail-io1-f42.google.com ([209.85.166.42]:35213 "EHLO mail-io1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbhCKXgr (ORCPT ); Thu, 11 Mar 2021 18:36:47 -0500 Received: by mail-io1-f42.google.com with SMTP id g27so23852542iox.2; Thu, 11 Mar 2021 15:36:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TEluSVU381Ra21RcLCeHjZXwMsuJenQrl8kmmWg+LmQ=; b=sSMZVSd7afeAxF56YtJIfZopwXw7mWE/1w4oUwe5hwqkrnVAh0vfOhrBVoJCuOll8F ueKU7wfgxpCWxKHME2eHIsdu8X/gJS5jHU/nJ1ee9NCKVl5mOBsU1KtdWu7VZ5AgCW57 dAGFChhLDYUXyVXmujeHDRgvhBE8ShDd/Y0e1MeQAmgFx5B2Nh04JOj2+acEkqpNpJap 92CkzA2QBuH6LXWPglw5noQMtuBz1G+REmc8F0aYL+jI6MgGQK7FYiJWAv+hdDUqO+zU T3xvdcnMR0cAamGx9XLfcyue0IYKEYuE5s6RVIwR7v9C028JgsErzuZTIwRf39PESjk8 FEew== X-Gm-Message-State: AOAM530jat5R6rtQzqZxBNeaDx0QYUrKfC2JgjnS95kjBqKh1YGvWjmr AlIyrE2amLZRUwQJB+fYYL3FuT6rzA== X-Received: by 2002:a5d:8416:: with SMTP id i22mr7909377ion.32.1615505806554; Thu, 11 Mar 2021 15:36:46 -0800 (PST) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id y9sm1901016ill.15.2021.03.11.15.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 15:36:45 -0800 (PST) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Maxime Ripard , Masahiro Yamada , Michal Marek Subject: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks Date: Thu, 11 Mar 2021 16:36:40 -0700 Message-Id: <20210311233640.1581526-2-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210311233640.1581526-1-robh@kernel.org> References: <20210311233640.1581526-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org dt-validate has an option to warn on any compatible strings which don't match any schema. The option has recently been improved to fix false positives, so let's enable the option. This is useful for tracking compatibles which are undocumented or not yet converted to DT schema. Previously, the only check of undocumented compatible strings has been an imperfect checkpatch.pl check. The option is enabled by default for 'dtbs_check'. This will add more warnings, but some platforms are down to only a handful of these warnings (good job!). There's about 100 cases in the binding examples, so the option is disabled until these are fixed. In the meantime, they can be checked with: make DT_CHECKER_FLAGS=-m dt_binding_check Cc: Maxime Ripard Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/Makefile | 3 +++ scripts/Makefile.lib | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 81f0b3294c64..bc24ee316726 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -55,6 +55,9 @@ override DTC_FLAGS := \ -Wno-graph_child_address \ -Wno-interrupt_provider +# Disable undocumented compatible checks until warning free +override DT_CHECKER_FLAGS ?= + $(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE $(call if_changed_rule,chkdt) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index eee59184de64..f11fac1a8e9b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -339,12 +339,13 @@ $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE $(call if_changed_dep,dtc) DT_CHECKER ?= dt-validate +DT_CHECKER_FLAGS ?= -m DT_BINDING_DIR := Documentation/devicetree/bindings # DT_TMP_SCHEMA may be overridden from Documentation/devicetree/bindings/Makefile DT_TMP_SCHEMA ?= $(objtree)/$(DT_BINDING_DIR)/processed-schema.json quiet_cmd_dtb_check = CHECK $@ - cmd_dtb_check = $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ + cmd_dtb_check = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ define rule_dtc $(call cmd_and_fixdep,dtc)