linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Frank Rowand <frowand.list@gmail.com>, devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] of/unittest: add printf tests for node name
Date: Tue, 28 Aug 2018 10:52:52 -0500	[thread overview]
Message-ID: <20180828155254.10709-3-robh@kernel.org> (raw)
In-Reply-To: <20180828155254.10709-1-robh@kernel.org>

Add some printf test for printing the node name (without the
unit-address).

Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/unittest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 69a522e48970..9def7be9c111 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");
-- 
2.17.1


  parent reply	other threads:[~2018-08-28 15:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 15:52 [PATCH 0/4] of: Convert to using %pOFn for node name printf Rob Herring
2018-08-28 15:52 ` [PATCH 1/4] of/unittest: remove use of node name pointer in overlay high level test Rob Herring
2018-08-28 15:52 ` Rob Herring [this message]
2018-08-28 15:52 ` [PATCH 3/4] of: Convert to using %pOFn instead of device_node.name Rob Herring
2018-09-07 12:29   ` Thierry Reding
2018-09-07 14:58     ` Rob Herring
2018-09-08  0:30     ` Joe Perches
2018-09-10  9:06       ` Thierry Reding
2018-08-28 15:52 ` [PATCH 4/4] vsprintf: print OF node name using full_name Rob Herring
2018-08-31 23:51 ` [PATCH 0/4] of: Convert to using %pOFn for node name printf Frank Rowand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180828155254.10709-3-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).