Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/49971 )
Change subject: drivers/elog: Correct code style ......................................................................
drivers/elog: Correct code style
lint report errors
Solve the POINTER_LOCATION errors
BUG = N/A TEST = N/A
Change-Id: I65926abd6bbaff1efce39efad9ec92c4f364b533 Signed-off-by: Frans Hendriks fhendriks@eltan.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/49971 Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Arthur Heymans arthur@aheymans.xyz Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/drivers/elog/boot_count.c M src/drivers/elog/elog.c 2 files changed, 4 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, approved Arthur Heymans: Looks good to me, approved
diff --git a/src/drivers/elog/boot_count.c b/src/drivers/elog/boot_count.c index 9da6212..17d928a 100644 --- a/src/drivers/elog/boot_count.c +++ b/src/drivers/elog/boot_count.c @@ -37,7 +37,7 @@ u8 i, *p; u16 csum;
- for (p = (u8*)bc, i = 0; i < sizeof(*bc); i++, p++) + for (p = (u8 *)bc, i = 0; i < sizeof(*bc); i++, p++) *p = cmos_read(BOOT_COUNT_CMOS_OFFSET + i);
/* Verify signature */ @@ -66,7 +66,7 @@ bc->checksum = compute_ip_checksum( bc, offsetof(struct boot_count, checksum));
- for (p = (u8*)bc, i = 0; i < sizeof(*bc); i++, p++) + for (p = (u8 *)bc, i = 0; i < sizeof(*bc); i++, p++) cmos_write(*p, BOOT_COUNT_CMOS_OFFSET + i); }
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index b394d3c..82df989 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -183,7 +183,7 @@ */ static void elog_update_checksum(struct event_header *event, u8 checksum) { - u8 *event_data = (u8*)event; + u8 *event_data = (u8 *)event; event_data[event->length - 1] = checksum; }
@@ -193,7 +193,7 @@ static u8 elog_checksum_event(struct event_header *event) { u8 index, checksum = 0; - u8 *data = (u8*)event; + u8 *data = (u8 *)event;
for (index = 0; index < event->length; index++) checksum += data[index];