devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/6] checks: add a string check for 'label' property
@ 2017-12-12 22:46 Rob Herring
       [not found] ` <20171212224629.28738-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2017-12-12 22:46 UTC (permalink / raw)
  To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA

Add a string property check for 'label' property. 'label' is a human
readable string typically used to identify connectors or ports on devices.

Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
v2:
- Move chosen node checks to patch 6.
- Add tests.

 checks.c                   | 2 ++
 tests/bad-string-props.dts | 1 +
 tests/run_tests.sh         | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/checks.c b/checks.c
index 334c2a4a0527..8d52d78c1dca 100644
--- a/checks.c
+++ b/checks.c
@@ -586,6 +586,7 @@ 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");
 
 static void fixup_addr_size_cells(struct check *c, struct dt_info *dti,
 				  struct node *node)
@@ -1236,6 +1237,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,
 
 	&property_name_chars_strict,
 	&node_name_chars_strict,
diff --git a/tests/bad-string-props.dts b/tests/bad-string-props.dts
index 396f82069cf7..04194da50636 100644
--- a/tests/bad-string-props.dts
+++ b/tests/bad-string-props.dts
@@ -4,4 +4,5 @@
 	device_type = <0xdeadbeef>;
 	model = <0xdeadbeef>;
 	status = <0xdeadbeef>;
+	label = <0xdeadbeef>;
 };
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 850bc165e757..e7505255043d 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 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
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-12-13 10:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-12 22:46 [PATCH v2 1/6] checks: add a string check for 'label' property Rob Herring
     [not found] ` <20171212224629.28738-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-12-12 22:46   ` [PATCH v2 2/6] checks: add string list check Rob Herring
     [not found]     ` <20171212224629.28738-2-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-12-13  9:24       ` David Gibson
2017-12-12 22:46   ` [PATCH v2 3/6] checks: add string list check for *-names properties Rob Herring
     [not found]     ` <20171212224629.28738-3-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-12-13  9:28       ` David Gibson
2017-12-12 22:46   ` [PATCH v2 4/6] checks: check for #{size,address}-cells without child nodes Rob Herring
     [not found]     ` <20171212224629.28738-4-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-12-13 10:06       ` David Gibson
2017-12-12 22:46   ` [PATCH v2 5/6] checks: add aliases node checks Rob Herring
2017-12-12 22:46   ` [PATCH v2 6/6] checks: add a chosen node check Rob Herring
     [not found]     ` <20171212224629.28738-6-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-12-13 10:39       ` David Gibson
2017-12-13  9:20   ` [PATCH v2 1/6] checks: add a string check for 'label' property David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).