* [PATCH] of/unittest: Fix the wrong expected value in of_selftest_property_string
@ 2015-03-03 3:50 Wang Long
2015-03-13 15:28 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Wang Long @ 2015-03-03 3:50 UTC (permalink / raw)
To: grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
long.wanglong-hv44wF8Li93QT0dZR+AlfA,
peifeiyue-hv44wF8Li93QT0dZR+AlfA
This patch fix the wrong expected value of of_property_match_string
in of_selftest_property_string.
Signed-off-by: Wang Long <long.wanglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/of/unittest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 199fb23..00ddce7 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -378,9 +378,9 @@ static void __init of_selftest_property_string(void)
rc = of_property_match_string(np, "phandle-list-names", "first");
selftest(rc == 0, "first expected:0 got:%i\n", rc);
rc = of_property_match_string(np, "phandle-list-names", "second");
- selftest(rc == 1, "second expected:0 got:%i\n", rc);
+ selftest(rc == 1, "second expected:1 got:%i\n", rc);
rc = of_property_match_string(np, "phandle-list-names", "third");
- selftest(rc == 2, "third expected:0 got:%i\n", rc);
+ selftest(rc == 2, "third expected:2 got:%i\n", rc);
rc = of_property_match_string(np, "phandle-list-names", "fourth");
selftest(rc == -ENODATA, "unmatched string; rc=%i\n", rc);
rc = of_property_match_string(np, "missing-property", "blah");
--
1.8.3.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] of/unittest: Fix the wrong expected value in of_selftest_property_string
2015-03-03 3:50 [PATCH] of/unittest: Fix the wrong expected value in of_selftest_property_string Wang Long
@ 2015-03-13 15:28 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2015-03-13 15:28 UTC (permalink / raw)
To: Wang Long
Cc: Grant Likely, Rob Herring, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, peifeiyue
On Mon, Mar 2, 2015 at 9:50 PM, Wang Long <long.wanglong@huawei.com> wrote:
> This patch fix the wrong expected value of of_property_match_string
> in of_selftest_property_string.
>
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
Applied for 4.0. Thanks.
Rob
> ---
> drivers/of/unittest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
> index 199fb23..00ddce7 100644
> --- a/drivers/of/unittest.c
> +++ b/drivers/of/unittest.c
> @@ -378,9 +378,9 @@ static void __init of_selftest_property_string(void)
> rc = of_property_match_string(np, "phandle-list-names", "first");
> selftest(rc == 0, "first expected:0 got:%i\n", rc);
> rc = of_property_match_string(np, "phandle-list-names", "second");
> - selftest(rc == 1, "second expected:0 got:%i\n", rc);
> + selftest(rc == 1, "second expected:1 got:%i\n", rc);
> rc = of_property_match_string(np, "phandle-list-names", "third");
> - selftest(rc == 2, "third expected:0 got:%i\n", rc);
> + selftest(rc == 2, "third expected:2 got:%i\n", rc);
> rc = of_property_match_string(np, "phandle-list-names", "fourth");
> selftest(rc == -ENODATA, "unmatched string; rc=%i\n", rc);
> rc = of_property_match_string(np, "missing-property", "blah");
> --
> 1.8.3.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-13 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 3:50 [PATCH] of/unittest: Fix the wrong expected value in of_selftest_property_string Wang Long
2015-03-13 15:28 ` Rob Herring
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).