[coreboot-gerrit] Change in coreboot[master]: soc/dmp/vortex86: Fix CMOS read
Martin Roth (Code Review)
gerrit at coreboot.org
Sun Jul 23 02:04:16 CEST 2017
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/20700
Change subject: soc/dmp/vortex86: Fix CMOS read
......................................................................
soc/dmp/vortex86: Fix CMOS read
The array of CMOS values that was passed into the read routine was
never getting updated. GCC 7.1 gives a warning on this:
error: may be used uninitialized in this function
Change-Id: I2f7c9b6455761a38598467b001efb0603fd14c32
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/soc/dmp/vortex86ex/southbridge.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/20700/1
diff --git a/src/soc/dmp/vortex86ex/southbridge.c b/src/soc/dmp/vortex86ex/southbridge.c
index 451aea6..9306034 100644
--- a/src/soc/dmp/vortex86ex/southbridge.c
+++ b/src/soc/dmp/vortex86ex/southbridge.c
@@ -457,14 +457,14 @@
{
/* Read RTC twice and check update-in-progress flag, to make
* sure RTC is correct */
- u8 rtc_old[7], rtc_new[7];
+ rtc_new[7];
while (get_rtc_update_in_progress()) ;
unsafe_read_cmos_rtc(rtc_new);
do {
- memcpy(rtc_old, rtc_new, 7);
+ memcpy(rtc, rtc_new, 7);
while (get_rtc_update_in_progress()) ;
unsafe_read_cmos_rtc(rtc_new);
- } while (memcmp(rtc_new, rtc_old, 7) != 0);
+ } while (memcmp(rtc_new, rtc, 7) != 0);
}
/*
--
To view, visit https://review.coreboot.org/20700
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f7c9b6455761a38598467b001efb0603fd14c32
Gerrit-Change-Number: 20700
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170723/ac2aca9b/attachment.html>
More information about the coreboot-gerrit
mailing list