From patchwork Fri Nov 17 14:45:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 119154 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp606483qgn; Fri, 17 Nov 2017 06:45:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMaeRRZCIQoVQJ7SqKbcuxmtO8h946yygPtI+LcvSmy+araFj8CqVmZPkhwe+holi0e/cSGB X-Received: by 10.99.124.73 with SMTP id l9mr5342558pgn.330.1510929920777; Fri, 17 Nov 2017 06:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510929920; cv=none; d=google.com; s=arc-20160816; b=BaRe9YDyfvY11dozlp0ugR7i05Wj73Q1JQEZWVGPQR+L+yS27uEiDPfYt0UFv3Msa0 yhEcOL5Xr4lIe6InDnMnbc7zDXbtmEft7ElVXoHOQxeaJrqIgNivl+bIAG46458hyyOf izEUYqm4VxrnEAWDYeSgEeV0SuKgzDfVg9soAQH/tfKD/uk6T1rosf6StUZdTvReSdxQ ilV+bc0NX1n/vz8mcijG+vkMvFUly2We5qJUsDrC/M1Kx7wEH5qFSW8vOFoZodxCkNtJ iF+zwH2oTYIpun5BTR5Q2SQCfGd/lM+2gMLg823BRkY/ijjVPrDL/P5jGs0TGP48QJYm poIA== 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=7VbzLwcQ9SAS0GrpwiWmv+Z1jcO6dFleXsdCRtOjG0E=; b=FzkJRPaS23cYS8SHcUTUnaNtRIJUyjMKcXBFwADqpanjMXM9PDtIu0dK9pQ8V6I5Qa DisPI6zIg6CxNFFW5nQoA3OZuTOW8iXyMGDEfPI0WaaHuHo/Jz5q5WTzESwZy6XI1lHC HG+4Wo/C2ybi/94gD8n/DbrmR6TpFlD6F5gp0N2GOm668Txh6Ol3qCh3ds2o/TD53E+T 6SJW1INA7td6U0Vf2Zn3Q89yqot6OyJpX11GEzRAsfUU4Tp/TD8jAodqbuoU849cdR8Z 0ztcJnPlYhBvUGkEMnVs99DEQB5tUbIOqG8atjdB+g9BeARkkSti8/K9tv3cTsHIQpaD Aldg== 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.20; Fri, 17 Nov 2017 06:45:20 -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 S964952AbdKQOpT (ORCPT + 6 others); Fri, 17 Nov 2017 09:45:19 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:43034 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030298AbdKQOpS (ORCPT ); Fri, 17 Nov 2017 09:45:18 -0500 Received: by mail-ot0-f195.google.com with SMTP id 105so2170477oth.10; Fri, 17 Nov 2017 06:45:17 -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=zZxMbg03bS0/8uHy9jUz4INwgGzJJ2OqDEkBnsdAt8I=; b=V5aKkF9ErM6LmM57e6HYWOU8ZusebI+bAly4uCd4K/0tkE4lFXmsHok3JJM9rvMvLg UHwopn/Rj4CkBZwbvnzyu/R5teJknY/YfkYy1d08XnkcudrjAc4fjgh0ZbHqPoGWQYlm +BGZWXl/FBPYkfcGiiqQwWBAqPMIshGOFNyKJ113NWb8U8QlnrBvGRB3jdwD1bVKwD0u Hm/LsQYfEJoVolTR3MZ/BMrAfhZ2sCtDwMr5NFDIxdU23aPchQHF5m67bJDMMhjF1daS zV7wHZi/WXFkRs6HT+dFbmLKTdMPl0zeYsnXN0+p23sPMzbGsUIafHDqHzXS1oTF8F8H YHBQ== X-Gm-Message-State: AJaThX6DUrqEa5oZ9fXPaoOJZjP1NKSYVHRGRQAVTshcELWgntejltDn b967EP7QRuv9Eya92Urm7tUbGUc= X-Received: by 10.157.83.38 with SMTP id g38mr1734431oth.340.1510929917314; Fri, 17 Nov 2017 06:45:17 -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.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 06:45:16 -0800 (PST) From: Rob Herring To: devicetree-compiler@vger.kernel.org Cc: devicetree@vger.kernel.org Subject: [PATCH 1/5] checks: add a string checks for label, bootargs and stdout-path Date: Fri, 17 Nov 2017 08:45:11 -0600 Message-Id: <20171117144515.10870-2-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 more string property checks for label, bootargs, and stdout-path. Signed-off-by: Rob Herring --- checks.c | 4 ++++ tests/bad-string-props.dts | 3 +++ tests/run_tests.sh | 2 +- 3 files changed, 8 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 f5bf5f97a3ad..a4a9d37ca19b 100644 --- a/checks.c +++ b/checks.c @@ -586,6 +586,9 @@ WARNING_IF_NOT_CELL(interrupt_cells_is_cell, "#interrupt-cells"); WARNING_IF_NOT_STRING(device_type_is_string, "device_type"); WARNING_IF_NOT_STRING(model_is_string, "model"); WARNING_IF_NOT_STRING(status_is_string, "status"); +WARNING_IF_NOT_STRING(label_is_string, "label"); +WARNING_IF_NOT_STRING(bootargs_is_string, "bootargs"); +WARNING_IF_NOT_STRING(stdout_path_is_string, "stdout-path"); static void fixup_addr_size_cells(struct check *c, struct dt_info *dti, struct node *node) @@ -1236,6 +1239,7 @@ static struct check *check_table[] = { &address_cells_is_cell, &size_cells_is_cell, &interrupt_cells_is_cell, &device_type_is_string, &model_is_string, &status_is_string, + &label_is_string, &bootargs_is_string, &stdout_path_is_string, &property_name_chars_strict, &node_name_chars_strict, diff --git a/tests/bad-string-props.dts b/tests/bad-string-props.dts index 396f82069cf7..9b5a7a1736ee 100644 --- a/tests/bad-string-props.dts +++ b/tests/bad-string-props.dts @@ -4,4 +4,7 @@ device_type = <0xdeadbeef>; model = <0xdeadbeef>; status = <0xdeadbeef>; + bootargs = <0xdeadbeef>; + stdout-path = <0xdeadbeef>; + label = <0xdeadbeef>; }; diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 850bc165e757..c610aaeb053e 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -546,7 +546,7 @@ dtc_tests () { check_tests bad-name-property.dts name_properties check_tests bad-ncells.dts address_cells_is_cell size_cells_is_cell interrupt_cells_is_cell - check_tests bad-string-props.dts device_type_is_string model_is_string status_is_string + check_tests bad-string-props.dts device_type_is_string model_is_string status_is_string bootargs_is_string stdout_path_is_string label_is_string check_tests bad-reg-ranges.dts reg_format ranges_format check_tests bad-empty-ranges.dts ranges_format check_tests reg-ranges-root.dts reg_format ranges_format