mbox series

[v2,0/4] dtc unit-address and character set checks

Message ID 20170210164717.1234-1-robh@kernel.org
Headers show
Series dtc unit-address and character set checks | expand

Message

Rob Herring Feb. 10, 2017, 4:47 p.m. UTC
This is a series of checks designed to check problems commonly found in
binding reviews. The first 2 patches implement a stricter character set
for property and node names. The 3rd patch checks unit address formatting.
The 4th patch adds checks for PCI buses including more specific checks on
unit address formatting.

In patches 1 and 2, I've turned the checks off by default. In patch 3,
the leading '0x' or 0s check was moved to its own check. In patch 4, most
of the bus struct was removed with only the type and the checks are called
directly.

Rob


Rob Herring (4):
  checks: Add Warning for stricter property name character checking
  checks: Add Warning for stricter node name character checking
  checks: Warn on node name unit-addresses with '0x' or leading 0s
  checks: Add bus checks for PCI buses

 checks.c                       | 151 +++++++++++++++++++++++++++++++++++++++++
 dtc.h                          |   7 ++
 tests/run_tests.sh             |   2 +
 tests/unit-addr-leading-0s.dts |  10 +++
 tests/unit-addr-leading-0x.dts |  10 +++
 5 files changed, 180 insertions(+)
 create mode 100644 tests/unit-addr-leading-0s.dts
 create mode 100644 tests/unit-addr-leading-0x.dts

--
2.10.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

Comments

David Gibson Feb. 13, 2017, 5:04 a.m. UTC | #1
On Fri, Feb 10, 2017 at 10:47:13AM -0600, Rob Herring wrote:
> This is a series of checks designed to check problems commonly found in

> binding reviews. The first 2 patches implement a stricter character set

> for property and node names. The 3rd patch checks unit address formatting.

> The 4th patch adds checks for PCI buses including more specific checks on

> unit address formatting.

> 

> In patches 1 and 2, I've turned the checks off by default. In patch 3,

> the leading '0x' or 0s check was moved to its own check. In patch 4, most

> of the bus struct was removed with only the type and the checks are called

> directly.


I'm still a touch uncomfortable about the tests in 1 & 2, but since
they're off by default, I've merged them.

3 & 4 have further comments.

> 

> Rob

> 

> 

> Rob Herring (4):

>   checks: Add Warning for stricter property name character checking

>   checks: Add Warning for stricter node name character checking

>   checks: Warn on node name unit-addresses with '0x' or leading 0s

>   checks: Add bus checks for PCI buses

> 

>  checks.c                       | 151 +++++++++++++++++++++++++++++++++++++++++

>  dtc.h                          |   7 ++

>  tests/run_tests.sh             |   2 +

>  tests/unit-addr-leading-0s.dts |  10 +++

>  tests/unit-addr-leading-0x.dts |  10 +++

>  5 files changed, 180 insertions(+)

>  create mode 100644 tests/unit-addr-leading-0s.dts

>  create mode 100644 tests/unit-addr-leading-0x.dts

> 


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson