[U-Boot] [PATCH 25/57] x86: Don't show an error when the MRC cache is up to date
Simon Glass
sjg at chromium.org
Tue Dec 8 04:38:44 CET 2015
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 <sjg at chromium.org>
---
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)
--
2.6.0.rc2.230.g3dd15c0
More information about the U-Boot
mailing list