[RFC PATCH 0/2] dtc: checks: Validate interrupt-map properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



The interrupt-map properties can be quite tricky, as they are already
hard to read in their source form, and depend on at least two nodes.

The first patch is the actual check routine, to verify some features
of the map. In particular it should be able to spot missing fields or
fields using the wrong number of cells. Most of the fields cannot easily
be verified, but at the least the phandle to the interrupt controller and
the total number of cells in the property should be valid.
It actually find problems in the Linux kernel tree's .dts files.

While the first patch is quite clean, I am not so confident about the
second one, hence the RFC tags. It adds more output in case a map is
considered broken, so the issue can be found much easier. But it will
increase the amount of warnings, beyond the usual one-problem-per-line,
and lacks the usual prefixes.

Please let me know what you think.

Cheers,
Andre

Andre Przywara (2):
  checks: Validate interrupt-map properties
  checks: interrupt-map: Dump entries on error

 checks.c                    | 165 ++++++++++++++++++++++++++++++++++++++++++++
 tests/bad-interrupt-map.dts |  21 ++++++
 tests/run_tests.sh          |   2 +
 3 files changed, 188 insertions(+)
 create mode 100644 tests/bad-interrupt-map.dts

-- 
2.14.1




[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux