From patchwork Thu Mar 5 06:21:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 1249424 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=uA0s7gDP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Y0yj517pz9sQt for ; Thu, 5 Mar 2020 17:22:05 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CE7081269; Thu, 5 Mar 2020 07:21:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1583389303; bh=V4SnMMYjWlyGVKLWj/bQ854doAr7WRHPokwhqkzA2xc=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uA0s7gDPeJMHtMzmq9cxkQPyNW7Kfr1iegVhAnzi6AWdCWLKR9lf6XkbnAqmSxcGM 5Z5tFUt4ADwN3oWDB/sUPug7/V7w8POFnFDDgvJ7jOckM4mn1oKgGKM3Pt+5vWwqgm h+TNVHcM0/EbNkNeY6pESracRYxn4yD0v9ug3PYGK80nAaebxys/Lp3cV+3rd5Mjs1 E/43DTUDqbz5zwlNqNX8tYp0WIWPMzAZOj8jNvMmle3itzPqXLoUvGdebvSNKZOJ6F VrhN0ZuvL0gy7ri0e2HoLd9nQodlrnwlmcbTEFhqlDWYezvlfOmNh7Sqd0shuP/Tjd kTiGFdeOJM+sg== Received: by phobos.denx.de (Postfix, from userid 109) id F315580396; Thu, 5 Mar 2020 07:21:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 19AE180386 for ; Thu, 5 Mar 2020 07:21:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 09E4FA5A6C for ; Thu, 5 Mar 2020 07:21:36 +0100 (CET) Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id nRhhdGBfjt7B for ; Thu, 5 Mar 2020 07:21:33 +0100 (CET) From: Stefan Roese To: u-boot@lists.denx.de Subject: [PATCH 3/4] cmd: mem: Use IS_ENABLED instead of alt_test variable Date: Thu, 5 Mar 2020 07:21:31 +0100 Message-Id: <20200305062132.22932-3-sr@denx.de> In-Reply-To: <20200305062132.22932-1-sr@denx.de> References: <20200305062132.22932-1-sr@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This patch uses the IS_ENABLED() macro to check, which mtest variant is enabled. Signed-off-by: Stefan Roese --- cmd/mem.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/mem.c b/cmd/mem.c index f519adaee2..2ccc7032ad 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -875,11 +875,6 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, ulong errs = 0; /* number of errors, or -1 if interrupted */ ulong pattern = 0; int iteration; -#if defined(CONFIG_SYS_ALT_MEMTEST) - const int alt_test = 1; -#else - const int alt_test = 0; -#endif start = CONFIG_SYS_MEMTEST_START; end = CONFIG_SYS_MEMTEST_END; @@ -921,7 +916,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, printf("Iteration: %6d\r", iteration + 1); debug("\n"); - if (alt_test) { + if (IS_ENABLED(CONFIG_SYS_ALT_MEMTEST)) { errs = mem_test_alt(buf, start, end, dummy); } else { errs = mem_test_quick(buf, start, end, pattern,