HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33805
Change subject: drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length ......................................................................
drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length
Change-Id: I877e19c014759e33b9cc48ff9ee27e898737aece Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/drivers/pc80/rtc/mc146818rtc_boot.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/33805/1
diff --git a/src/drivers/pc80/rtc/mc146818rtc_boot.c b/src/drivers/pc80/rtc/mc146818rtc_boot.c index 26bcac5..0ac06b3 100644 --- a/src/drivers/pc80/rtc/mc146818rtc_boot.c +++ b/src/drivers/pc80/rtc/mc146818rtc_boot.c @@ -67,7 +67,7 @@ CBFS_COMPONENT_CMOS_DEFAULT, &length); #endif if (cmos_default) { - int i; + size_t i; cmos_disable_rtc(); for (i = 14; i < MIN(128, length); i++) cmos_write_inner(cmos_default[i], i);
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33805 )
Change subject: drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/33805/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/33805/1//COMMIT_MSG@7 PS1, Line 7: size_t why? what is wrong with int?
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33805 )
Change subject: drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/33805/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/33805/1//COMMIT_MSG@7 PS1, Line 7: size_t
why? what is wrong with int?
nothing wrong with `int` src/drivers/pc80/rtc/mc146818rtc_boot.c line #61 length is a size_t, so let compare same thing: `size_t` to `size_t`
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33805 )
Change subject: drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length ......................................................................
Patch Set 1: Code-Review+2
It seems to result in slightly more compact code.
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33805 )
Change subject: drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length ......................................................................
drivers/pc80/rtc/mc146818rtc_boot: Use size_t for length
Change-Id: I877e19c014759e33b9cc48ff9ee27e898737aece Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33805 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M src/drivers/pc80/rtc/mc146818rtc_boot.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved
diff --git a/src/drivers/pc80/rtc/mc146818rtc_boot.c b/src/drivers/pc80/rtc/mc146818rtc_boot.c index 26bcac5..0ac06b3 100644 --- a/src/drivers/pc80/rtc/mc146818rtc_boot.c +++ b/src/drivers/pc80/rtc/mc146818rtc_boot.c @@ -67,7 +67,7 @@ CBFS_COMPONENT_CMOS_DEFAULT, &length); #endif if (cmos_default) { - int i; + size_t i; cmos_disable_rtc(); for (i = 14; i < MIN(128, length); i++) cmos_write_inner(cmos_default[i], i);