Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14621
-gerrit
commit cb38491eae5cadcf6af515c01baed0ec3894d958
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Wed May 4 17:52:56 2016 -0700
lib/reg_script: Fix braces
In If0d4d61ed8ef48ec20082b327f358fd1987e3fb9 the code
was changed from one to two lines in the body of an if()
statement, without adding braces.
Change-Id: Ibbbdf240157adae95151fb2ce0135948caa60108
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/lib/reg_script.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/reg_script.c b/src/lib/reg_script.c
index ace9325..16efa36 100644
--- a/src/lib/reg_script.c
+++ b/src/lib/reg_script.c
@@ -478,9 +478,10 @@ static uint64_t reg_script_read(struct reg_script_context *ctx)
/* Read from the platform specific bus */
bus = find_bus(step);
- if (NULL != bus)
+ if (NULL != bus) {
value = bus->reg_script_read(ctx);
break;
+ }
}
printk(BIOS_ERR,
"Unsupported read type (0x%x) for this device!\n",
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14616
-gerrit
commit f21a411d795af8e24873aa65861fe817ae1da417
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Wed May 4 16:16:47 2016 -0700
rtc: Do checksum check for all bytes
Due to missing braces (that went undetected because of the
indentation), I584189d9fcf7c9b831d9c020ee7ed59bb5ae08e8 only
takes the last changed byte into regard when determining whether
the checksum needs to be updated.
This bug went undetected for 5 years.
Change-Id: I47cedc801a60959386dfdcda3a13b8e3162a7ecb
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/drivers/pc80/rtc/mc146818rtc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c
index 35dad32..5fb9cf6 100644
--- a/src/drivers/pc80/rtc/mc146818rtc.c
+++ b/src/drivers/pc80/rtc/mc146818rtc.c
@@ -198,7 +198,7 @@ static enum cb_err get_cmos_value(unsigned long bit, unsigned long length,
uchar >>= byte_bit; /* shift the bits to byte align */
/* clear unspecified bits */
ret[0] = uchar & ((1 << length) - 1);
- } else { /* more that one byte so transfer the whole bytes */
+ } else { /* more than one byte so transfer the whole bytes */
for (i = 0; length; i++, length -= 8, byte++) {
/* load the byte */
ret[i] = cmos_read(byte);
@@ -284,11 +284,12 @@ static enum cb_err set_cmos_value(unsigned long bit, unsigned long length,
if (byte_bit || length % 8)
return CB_ERR_ARG;
- for (i = 0; length; i++, length -= 8, byte++)
+ for (i = 0; length; i++, length -= 8, byte++) {
cmos_write(ret[i], byte);
if (byte >= LB_CKS_RANGE_START &&
byte <= LB_CKS_RANGE_END)
chksum_update_needed = 1;
+ }
}
if (chksum_update_needed) {