From patchwork Tue Jul 17 22:09:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 142224 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp96136ljj; Tue, 17 Jul 2018 15:09:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdQ4opu07oll/UrCxU1T9Ea+5fqTzPBN4l60kNJiaPFPG4uQz8CY3+9Ndq1wc/SormPvBqo X-Received: by 2002:aa7:d385:: with SMTP id x5-v6mr4367689edq.104.1531865362147; Tue, 17 Jul 2018 15:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531865362; cv=none; d=google.com; s=arc-20160816; b=LEDgNULbFvRCe0reVN7qA5zQbFH4SdUVN9pwjoHpbUUQnDQpn6bIecMVt6crxXdsDp Nh9rmqdYD8ypc+0WIcAX9LySDhA25j1Z3Sas+N/TTpgUPvpbbipAyVbEd8ht/0QBkKG5 luWEca/uwiYiGaSREWOPq/gxX2n6UG8Puex/5occ8NMStv4V5VVCVbZOo7Zj2Lg46PKn U6RsMX5+J62eWiSoFRMjie4PuFAwZ3rVI0UhNyuOcldfn1WUxH4HIWUGYgr/0h7gXEzs rq8fFMMc/fGuli35hVbrVvpNuDTDQ/Y1udI28hr75jFAov5/6jK6ibn7NkXNs8O6lMz7 fdEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=UWXDNAa4oRq5xp5Kn2KfCVtInd7oWr9PrEjYXRVmHUQ=; b=YUY9cnqfcH3jWH6kocfMiRFGoS+N85iQ93y28wWdPnpZdYG2UQ+V9TvBZLQYbiYfHo DCXh8KiTZWUHgrFwE8L/gkMzeSj6g6Dk1xP2eYKSqkeDm/gbGk45cRYuvG10cY9/nDIB xj3G1BM43Sb1h7+uVursF9/CDQMUBnDG3bQdmoW1Kt6rklEV7NhC8de6M62IQbZD54Cb 4+GM8PmaYDRf952hBhgoBMQYEAASIFHv/jyzvoy3YldViSNRTZ0wR8pp6+3oa+u//EzP iFJRfZ9mPuFlfLD5+BTJudle4h28TtLvmqYHqEtiFpmwQJqSLkvLwO3laRsTb7l2oro4 AGUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Okce2E59; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id y8-v6si71876edk.369.2018.07.17.15.09.21; Tue, 17 Jul 2018 15:09:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Okce2E59; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id B483EC21E9F; Tue, 17 Jul 2018 22:09:19 +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_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 00DBBC21C3F; Tue, 17 Jul 2018 22:09:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C2EC5C21C27; Tue, 17 Jul 2018 22:09:15 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by lists.denx.de (Postfix) with ESMTPS id 5FA96C21BE5 for ; Tue, 17 Jul 2018 22:09:15 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id u202-v6so1958997lff.9 for ; Tue, 17 Jul 2018 15:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ko0DctIHf/QnTjptFdftBPduMVeRoDZQQNjM7btW1PE=; b=Okce2E594UokKZ49LmlYqf1L1X/vjIMq5C7GhuEK3r9ebF38avH9loDr1A5nvG+kR/ BRNGgncqJj7bQjQSnRNOGw0H9ndkxClnsPbXb3qF9Y2HJ5s7MSUmKu/jSSqBzicwfls1 2hpL4WQ1r7Ek6BxDNXJgd4SSIxuUD7Sd5GZ9Q= 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; bh=ko0DctIHf/QnTjptFdftBPduMVeRoDZQQNjM7btW1PE=; b=hhMhkKAZcYYKaql0khhKuBIQTb8fp3S24bMx10weGFvgy/3tfa4jmecVT1UmgHppZy 3Z7GGmJ9/pqaasFwbVkdF9TCwUUyiNuYIZYYRGZML41rE1Dc6ABfctgsaqN3nxKrpggx K1umj/Th8VPW/xoOVNvjGotLL4lYtjTUxRfGH1yI6FTdf/yZyTDDXyCsFyRWLzBjDmkx 2PDXSc03A6aimXsGQgKgeTL723XsERXm6aqkZbI+LWV8ePFoLl0Lh3Kk8ryQX/8HWpfw X/+3Rv3Wf4UaNNSkuYPGK+tK2QPLIRbPkPrJeT4pzvyy+sIGpUngR1WA6aF4ZaHFuaVR pOCw== X-Gm-Message-State: AOUpUlHxwgGYOwdDRXLeKo2sw6gZQ6ueIawMImMdKgJz1JvfPtaT0Lam AsGOYmMVA/TnmvaL0pmJa3NcCnoxn/4= X-Received: by 2002:a19:d98f:: with SMTP id s15-v6mr2369929lfi.103.1531865354472; Tue, 17 Jul 2018 15:09:14 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id b141-v6sm300969lfb.6.2018.07.17.15.09.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 15:09:13 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Wed, 18 Jul 2018 01:09:11 +0300 Message-Id: <20180717220912.11358-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.18.0 Cc: Tom Rini , Maxime Ripard Subject: [U-Boot] [RFC 1/2] env: Drop error messages when loading environment 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" This is just a draft to discuss ideas related to "Make U-Boot log great again" thread. With this patch we will have something like this: Loading Environment from FAT... Failed (-5) Loading Environment from MMC... OK instead of this: Loading Environment from FAT... MMC: no card present ** Bad device mmc 0 ** Failed (-5) Loading Environment from MMC... OK Signed-off-by: Sam Protsenko --- env/env.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/env/env.c b/env/env.c index 5c0842ac07..85598fa5d4 100644 --- a/env/env.c +++ b/env/env.c @@ -187,6 +187,7 @@ int env_load(void) for (prio = 0; (drv = env_driver_lookup(ENVOP_LOAD, prio)); prio++) { int ret; + unsigned long have_console = gd->have_console; if (!drv->load) continue; @@ -195,7 +196,11 @@ int env_load(void) continue; printf("Loading Environment from %s... ", drv->name); + + /* Suppress console output for drv->load() */ + gd->have_console = 0; ret = drv->load(); + gd->have_console = have_console; if (ret) printf("Failed (%d)\n", ret); else