From patchwork Tue Dec 8 03:38:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 553724 X-Patchwork-Delegate: bmeng.cn@gmail.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 4A7BC14029C for ; Tue, 8 Dec 2015 14:50:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=XjvLnDdF; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D6C0B4B703; Tue, 8 Dec 2015 04:50:01 +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 MrIQqFCTchFJ; Tue, 8 Dec 2015 04:50:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92AE34B71E; Tue, 8 Dec 2015 04:49:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6A0A74B701 for ; Tue, 8 Dec 2015 04:49:20 +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 CrD1IMGNEKrm for ; Tue, 8 Dec 2015 04:49:20 +0100 (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 mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by theia.denx.de (Postfix) with ESMTPS id 0B3604B6F6 for ; Tue, 8 Dec 2015 04:49:16 +0100 (CET) Received: by oiww189 with SMTP id w189so3963740oiw.3 for ; Mon, 07 Dec 2015 19:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tio7Jlv1NhgxwGbqm93u0EceVrUz8YlYV63tnJSzkoM=; b=XjvLnDdFZSreLKxTiAV053kXa+km7VZ5p3SsYzR+vXb09nddZzUCkVpbtwr+dpOrrs 0ZZt331HdQqmPIX/vISGEwNoxdZy4/b0fxIq63BzBF6n2d8UK3lDgAvQzkBILb9z7Nll K7K/p83iklelmxyBCik/6UYPLvNFfoBDe5msN4kECieIhn7t1Y+ZZgjtjV4SZsKB6X+x FvkJkbh5Gxt3AtPWoMIg+xqkOjYL9+ClVkTDb6BYTFAKl3xUrzXFRkNcuqhF+qCWhSu/ WV2FN117v7eGdHUTV+yQ3jxOR+vq8h5QLeRi00pmNoJUWIAKnx4Nc7qW0DAD8XhO1RY6 oq2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Tio7Jlv1NhgxwGbqm93u0EceVrUz8YlYV63tnJSzkoM=; b=gGeB68OpygvzKnjeweAUl2Q5XKcPb6jXDPOqQo86yL5+0SUgS42LBk/7sMJ4cJyj8l w2G1Pawx8zpRq9ccXR6WriViBAvDa8xQvr6fXdyp0aa6LcrLW0Evb+/PfJrddOHbh2Ev INzp81SA/iDV8X+Yp/R722y8ZxsYd/3DA4M8s7Ptw2m2HXZwTQeOZ7+Fy5iRYm9b1K1y +/JYsqd2pvhe8uzoexDp9vBYnWiWj+UbnKnktXmrUvKzG6qvtpyM26e+2hwtzugerCXl TvC7vBT/l0LUWlWwkV5ux0aWUaEj/2JEbWeivHP8ouiMzgLp2coq7xjTUHOhGHtC0OOV 7rBA== X-Gm-Message-State: ALoCoQk7l6/aG19k+mVCk2OYH+xnUMd6IOqI76G9bW/UGllVs9xBn3FiOyI5cOl3RmKI3V/BBB4ofRjwfIdc4nxDWA1oYRw4VQ== X-Received: by 10.202.56.3 with SMTP id f3mr866672oia.65.1449546555116; Mon, 07 Dec 2015 19:49:15 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id z190sm580762oig.25.2015.12.07.19.49.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 19:49:14 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 7232B221A26; Mon, 7 Dec 2015 20:39:21 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 7 Dec 2015 20:38:44 -0700 Message-Id: <1449545956-2772-26-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1449545956-2772-1-git-send-email-sjg@chromium.org> References: <1449545956-2772-1-git-send-email-sjg@chromium.org> Cc: Graeme Russ Subject: [U-Boot] [PATCH 25/57] x86: Don't show an error when the MRC cache is up to date 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When the final MRC cache record is the same as the one we want to write, we skip writing since there is no point. This is normal behaviour. Avoiding printing an error when this happens. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/mrccache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c index 53a1259..67bace4 100644 --- a/arch/x86/lib/mrccache.c +++ b/arch/x86/lib/mrccache.c @@ -243,8 +243,12 @@ int mrccache_save(void) goto err_entry; data = (struct mrc_data_container *)gd->arch.mrc_output; ret = mrccache_update(sf, &entry, data); - if (!ret) + if (!ret) { debug("Saved MRC data with checksum %04x\n", data->checksum); + } else if (ret == -EEXIST) { + debug("MRC data is the same as last time, skipping save\n"); + ret = 0; + } err_entry: if (ret)