summaryrefslogtreecommitdiff
path: root/drivers/of/unittest.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-08-27 17:05:06 +0300
committerRob Herring <robh@kernel.org>2018-09-04 18:00:01 +0300
commit6901378c799d2358a2e4eff9818266df73c3b216 (patch)
tree2a632ddc44d2075c83269e2b3f1374179090f9a4 /drivers/of/unittest.c
parentb610e2ff4622794f4472b7b0e899b3320671d909 (diff)
downloadlinux-6901378c799d2358a2e4eff9818266df73c3b216.tar.xz
of/unittest: add printf tests for node name
Add some printf test for printing the node name (without the unit-address). Reviewed-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r--drivers/of/unittest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 7d0073b640bd..204432bf791c 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -299,6 +299,10 @@ static void __init of_unittest_printf(void)
of_unittest_printf_one(np, "%pOF", full_name);
of_unittest_printf_one(np, "%pOFf", full_name);
+ of_unittest_printf_one(np, "%pOFn", "dev");
+ of_unittest_printf_one(np, "%2pOFn", "dev");
+ of_unittest_printf_one(np, "%5pOFn", " dev");
+ of_unittest_printf_one(np, "%pOFnc", "dev:test-sub-device");
of_unittest_printf_one(np, "%pOFp", phandle_str);
of_unittest_printf_one(np, "%pOFP", "dev@100");
of_unittest_printf_one(np, "ABC %pOFP ABC", "ABC dev@100 ABC");