From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbbCKI0Q (ORCPT ); Wed, 11 Mar 2015 04:26:16 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:32859 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbbCKI0L (ORCPT ); Wed, 11 Mar 2015 04:26:11 -0400 From: Wang Long To: , , , , CC: , , , , , , , Subject: [PATCH v2 2/5] of/unittest: Fix the wrong expected value in of_selftest_property_string Date: Wed, 11 Mar 2015 08:36:51 +0000 Message-ID: <1426063014-211712-3-git-send-email-long.wanglong@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1426063014-211712-1-git-send-email-long.wanglong@huawei.com> References: <1426063014-211712-1-git-send-email-long.wanglong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.54FFFC11.0017,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 04e6b385558ad2a598a7b14ea35e95b9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fix the wrong expected value of of_property_match_string in of_selftest_property_string. Signed-off-by: Wang Long --- 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