From patchwork Mon Sep 4 20:12:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 809827 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="PGrgWpuk"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xmLjr5wVHz9t2R for ; Tue, 5 Sep 2017 06:17:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 849FBC21E52; Mon, 4 Sep 2017 20:15:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C2CD0C21F29; Mon, 4 Sep 2017 20:15:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 78A79C21F65; Mon, 4 Sep 2017 20:13:19 +0000 (UTC) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by lists.denx.de (Postfix) with ESMTPS id B0715C21F49 for ; Mon, 4 Sep 2017 20:13:15 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id v2so10140886wmf.0 for ; Mon, 04 Sep 2017 13:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xMaf5W9z64A3BFJPJxWqTCqrzLsdYru8oIdZWrxaLvM=; b=PGrgWpukFyXh/RQazaD6ymLoNG0PkxBA4he50nJ4bh+HS67LAlus0cHGKPtgVwN0bN g6NrH7abOgWGuIQi2DwIZV1oI8lI72KFD7zEz+TMbs3ZBxneKn4V6eBEDJDuHc6TLCSV tVy5fcyUkCzf3+QwryvXDtfEBg0vlYgr0x3+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xMaf5W9z64A3BFJPJxWqTCqrzLsdYru8oIdZWrxaLvM=; b=AwRMZX1CjqbQZvluh7OJhljhqyJsYMKUayPVGjwSXH7JiD010ccAd1Kk2aNKxDcWyn 7yQWlcX2LR+exJsaoU5Bk8G9b+y4FB/2JrXorrLeZ3WBMY7kMkyj31LPJ3ODrR81LyIu Vh3677NNKx8CdRM6387Pqib06or2motC52v+aEk/GCQxC/8GVGRuuY7RfbSodZhHsNJd rOKVl/jJycYHfR0pbUarL5VXlxTnngS5/1yiYcYyreu69b3toopLhC5fv/m07CTbQfA7 PYIH3tuY3IiEhCyWblxqsS+aRR5DmTmLQIvSExtWul2BxCyI3PFRYSGlRz4wACCO0ZMY tlzQ== X-Gm-Message-State: AHPjjUjXWg/kNdKHyN/HLZCfSwlPVXeEdDh67MVYmWu9TBFRZ9dQyy+4 vffEySdtQaZybCzr X-Google-Smtp-Source: ADKCNb5Bc4kGXFq8oHuZzvmU4PilENcvjczSTlf2odlHzzx2s6rJlMHiXpCD+DACdBjGADR1xJYVjQ== X-Received: by 10.28.63.139 with SMTP id m133mr831329wma.140.1504555995403; Mon, 04 Sep 2017 13:13:15 -0700 (PDT) Received: from localhost.localdomain ([195.97.110.117]) by smtp.gmail.com with ESMTPSA id u8sm3720435wrc.92.2017.09.04.13.13.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 13:13:14 -0700 (PDT) From: Pantelis Antoniou To: Tom Rini Date: Mon, 4 Sep 2017 23:12:22 +0300 Message-Id: <1504555943-12893-14-git-send-email-pantelis.antoniou@konsulko.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com> References: <1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com> Cc: Marek Vasut , Pantelis Antoniou , Tero Kristo , u-boot@lists.denx.de, Maxime Ripard , Stefan Roese , Alan Ott Subject: [U-Boot] [PATCH v3 13/14] ut: fix fdt_getprop_u32() change X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" fdt_getprop_u32 is not exported and it's different than what the unit test uses. Rename u32 prop access methods to something that's unit test specific. Signed-off-by: Pantelis Antoniou Acked-by: Simon Glass Acked-by: Simon Glass --- test/overlay/cmd_ut_overlay.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c index cbef720..7106f42 100644 --- a/test/overlay/cmd_ut_overlay.c +++ b/test/overlay/cmd_ut_overlay.c @@ -21,7 +21,7 @@ extern u32 __dtb_test_fdt_base_begin; extern u32 __dtb_test_fdt_overlay_begin; -static int fdt_getprop_u32_by_index(void *fdt, const char *path, +static int ut_fdt_getprop_u32_by_index(void *fdt, const char *path, const char *name, int index, u32 *out) { @@ -42,10 +42,10 @@ static int fdt_getprop_u32_by_index(void *fdt, const char *path, return 0; } -static int fdt_getprop_u32(void *fdt, const char *path, const char *name, +static int ut_fdt_getprop_u32(void *fdt, const char *path, const char *name, u32 *out) { - return fdt_getprop_u32_by_index(fdt, path, name, 0, out); + return ut_fdt_getprop_u32_by_index(fdt, path, name, 0, out); } static int fdt_getprop_str(void *fdt, const char *path, const char *name, @@ -68,7 +68,7 @@ static int fdt_overlay_change_int_property(struct unit_test_state *uts) void *fdt = uts->priv; u32 val = 0; - ut_assertok(fdt_getprop_u32(fdt, "/test-node", "test-int-property", + ut_assertok(ut_fdt_getprop_u32(fdt, "/test-node", "test-int-property", &val)); ut_asserteq(43, val); @@ -158,11 +158,11 @@ static int fdt_overlay_local_phandle(struct unit_test_state *uts) local_phandle = fdt_get_phandle(fdt, off); ut_assert(local_phandle); - ut_assertok(fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle", + ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle", 0, &val)); ut_asserteq(local_phandle, val); - ut_assertok(fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle", + ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle", 1, &val)); ut_asserteq(local_phandle, val); @@ -189,11 +189,11 @@ static int fdt_overlay_local_phandles(struct unit_test_state *uts) test_phandle = fdt_get_phandle(fdt, off); ut_assert(test_phandle); - ut_assertok(fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 0, + ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 0, &val)); ut_asserteq(test_phandle, val); - ut_assertok(fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 1, + ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 1, &val)); ut_asserteq(local_phandle, val);