From patchwork Thu Jan 7 10:36:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 564239 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1CE5C1402E2 for ; Thu, 7 Jan 2016 22:17:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b=tizTsOOZ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42C244B937; Thu, 7 Jan 2016 12:17:54 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hjRk4e4GYJFZ; Thu, 7 Jan 2016 12:17:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A5244B93E; Thu, 7 Jan 2016 12:17:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5D4014B8F4 for ; Thu, 7 Jan 2016 11:49:39 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hBkIWg224RmW for ; Thu, 7 Jan 2016 11:49:39 +0100 (CET) X-Greylist: delayed 786 seconds by postgrey-1.34 at theia; Thu, 07 Jan 2016 11:49:36 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by theia.denx.de (Postfix) with ESMTPS id 0C07D4B8E2 for ; Thu, 7 Jan 2016 11:49:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=940; q=dns/txt; s=ironport2; t=1452163779; x=1483699779; h=from:to:cc:subject:date:message-id:mime-version; bh=ebFE9B1YefzCU8UzzVxr6wXrZmdPsm2G9rKzuhZ818o=; b=tizTsOOZ8LkntOmgjo9O+B6YDcbVGaRUp3GFbLP96ZEEQlqMkOOnk4Ld jDkQiT4shge8AlAjJfA2tW/dtBtwfcq5NnFUslpLrQNOQmZH5gQQYTtaB AB/ggcrzG4kJq01vIRkinA/cpK/FOg4+x7tcut+TDVqfAYG8TP+E+RbUE Y=; X-IronPort-AV: E=Sophos;i="5.20,532,1444687200"; d="scan'208";a="176441" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES256-SHA; 07 Jan 2016 11:36:09 +0100 Received: from prevas-ravi.prevas.se (172.16.11.27) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 7 Jan 2016 11:36:09 +0100 From: Rasmus Villemoes To: Date: Thu, 7 Jan 2016 11:36:04 +0100 Message-ID: <1452162964-8706-1-git-send-email-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-Originating-IP: [172.16.11.27] X-Mailman-Approved-At: Thu, 07 Jan 2016 12:17:45 +0100 Cc: Rasmus Villemoes Subject: [U-Boot] [PATCH] fix always succesful memory test X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since 51209b1f42cb ("Use common mtest iteration counting"), do_mem_mtest has always reported 0 errors and hence returned 0, even if errors were detected. Fix the helpers mem_test_alt() and mem_test_quick() to return the number of errors found. Signed-off-by: Rasmus Villemoes --- common/cmd_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 9fb2584..efa3929 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -931,7 +931,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, addr[offset] = 0; } - return 0; + return errs; } static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr, @@ -990,7 +990,7 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr, val += incr; } - return 0; + return errs; } /*