From patchwork Fri Nov 17 14:45:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 119156 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp606545qgn; Fri, 17 Nov 2017 06:45:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMb5qDF2q6hfEZZ1BKECob83RddagGBjSK3+EHehMuXCmUfAGFi6tn519w4Iuak53qhmB1lP X-Received: by 10.99.139.199 with SMTP id j190mr5276088pge.375.1510929923363; Fri, 17 Nov 2017 06:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510929923; cv=none; d=google.com; s=arc-20160816; b=gwhfR1sEXyzOeseJRZxGzdIJstYpnKK1up+dq0nLz6BQcSbzsnG0pnbkRUoGQ5UtzD xhDgIG+KrKVd4vWOTG4ApQ4BdJJL4mORBXE1zGL3vmkr0GknRHoOGNkUObhvNpts/jGO jnJ78UL6OBIrXRgMy27WmpOHzoRJ21F3LXB7BDIikgjusXtn92SKauS/Jp8DAHqxjrVu NfvFJEpCE407FLtSJpsopuWX7TTsX0jPupCwYVvnmkd+K7/daSEXt1s8MvD3VRx9Dy3R xfb/mildBJq+3HR4d6QBgRS+DdEpFzmaK5DVyNljGjSwDAFVUv/aes+u0YvfrzzdyIdu EJ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=0IoiKrU1GCUACG9VVtGQE0RbxPb8QKPbWgli5kkSqDc=; b=izgZq6qnqfkBVzYymD7IS29w97aNQYWLRCQApsaaLhxZ98ix964UeC7rP1onkVeHsn Idwqx0gudbO7pXfArpLtJxzzfi71vQ3QRIGK1QLrzIV8d/9gmefZdfoMGMrm1lfbi/GO vb1JzJY/5u9dDeosmxyyhaRYfxFsq7NGy2VRTHxeTkpxt5aCQ594Czyq/BJAaSexyOh4 K5DJrqy0jmRcwEZYIBGg/mDLlrMpoeYwAnsJZASrRV4wKt+WhwEPC25a31HYNXxEN6VV PrsnG++1GfJ1icCSP/WUO20JhP0hh//HeH11pbdJl7AuBLqwWbzRpTlOE95DwqzU5BCG FvRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si3129534pfa.310.2017.11.17.06.45.23; Fri, 17 Nov 2017 06:45:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964979AbdKQOpV (ORCPT + 6 others); Fri, 17 Nov 2017 09:45:21 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:44774 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964972AbdKQOpU (ORCPT ); Fri, 17 Nov 2017 09:45:20 -0500 Received: by mail-ot0-f193.google.com with SMTP id d27so2162687ote.11; Fri, 17 Nov 2017 06:45:19 -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; bh=nqtTVvf29hOzAipWZmVg5dsI2U54uDMy6Jl7EXnuOW0=; b=K3j3XgA5zovhygO0DcBc+hbCYoGBZZ6PfMNuPgrwqNA/KV+HX9w2zUgbg1rs2Vk/wm j/JE512fAT2pUkzRhtsvmW5tljA1vTNa++Bfm1RebnF+GAMwuGCgcvvTB1hKfb87nqh2 /RhUI/45cgJUnRi1ryAbmHjbK/TRBxpMaaVQK8wgQOqbUlCHH4zs57AcixwelEMkzcEZ wG0StUtmjOlAlEQcLueuV7+7kMkbX5YNwlB09llZujRMNoBPZgzZaLtTEI2kj0I3FmUp QnQlvTS25u6gf1iynfbuxGvDagtejpRkSYlmXq+xLY2xTqjLIK9qWM16JiHClAFUwEa3 7fuw== X-Gm-Message-State: AJaThX7RksPdOB53zL/Vm/lqozv/Avsok1qczSsMIhKdJfAZEjW8yjaL BMN8Rt0HXj8nsxopIEoNyq+uxBU= X-Received: by 10.157.21.99 with SMTP id z32mr1553169otz.351.1510929919146; Fri, 17 Nov 2017 06:45:19 -0800 (PST) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id i6sm1529906oiy.37.2017.11.17.06.45.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 06:45:18 -0800 (PST) From: Rob Herring To: devicetree-compiler@vger.kernel.org Cc: devicetree@vger.kernel.org Subject: [PATCH 3/5] checks: add string list check for *-names properties Date: Fri, 17 Nov 2017 08:45:13 -0600 Message-Id: <20171117144515.10870-4-robh@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171117144515.10870-1-robh@kernel.org> References: <20171117144515.10870-1-robh@kernel.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a string list check for common properties ending in "-names" such as reg-names or interrupt-names. Signed-off-by: Rob Herring --- checks.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/checks.c b/checks.c index 4e23f29486bb..346b0256f9cb 100644 --- a/checks.c +++ b/checks.c @@ -622,6 +622,21 @@ WARNING_IF_NOT_STRING(stdout_path_is_string, "stdout-path"); WARNING_IF_NOT_STRING_LIST(compatible_is_string_list, "compatible"); +static void check_names_is_string_list(struct check *c, struct dt_info *dti, + struct node *node) +{ + struct property *prop; + + for_each_property(node, prop) { + if (!strstr(prop->name, "-names")) + continue; + + c->data = prop->name; + check_is_string_list(c, dti, node); + } +} +WARNING(names_is_string_list, check_names_is_string_list, NULL); + static void fixup_addr_size_cells(struct check *c, struct dt_info *dti, struct node *node) { @@ -1273,7 +1288,7 @@ static struct check *check_table[] = { &device_type_is_string, &model_is_string, &status_is_string, &label_is_string, &bootargs_is_string, &stdout_path_is_string, - &compatible_is_string_list, + &compatible_is_string_list, &names_is_string_list, &property_name_chars_strict, &node_name_chars_strict,