]> git.baikalelectronics.ru Git - kernel.git/commit
of: unittest: Use bigger address cells to catch parser regressions
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Mon, 3 Aug 2020 14:25:47 +0000 (16:25 +0200)
committerRob Herring <robh@kernel.org>
Mon, 3 Aug 2020 22:24:49 +0000 (16:24 -0600)
commitaa1db9546576d8ff654e9443290147af14b1d58d
tree409996641797fe64e8d9097ecf1c80fccf234456
parentb6fc9a090e42140ed3955a345d1b5b147b9add48
of: unittest: Use bigger address cells to catch parser regressions

Getting address and size cells for dma-ranges/ranges parsing is tricky
and shouldn't rely on the node's count_cells() method. The function
starts looking for cells on the parent node, as its supposed to work
with device nodes, which doesn't work when input with bus nodes, as
generally done when parsing ranges.

Add test to catch regressions on that specific quirk as developers will
be tempted to edit it out in favor of the default method.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/9200970a917a9cabdc5b17483b5a8725111eb9d0.camel@suse.de
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/unittest-data/tests-address.dtsi
drivers/of/unittest.c