From c0a6a0efc4be6c09c2181528d34af1deeda81817 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 12 Jul 2021 22:21:36 +0200 Subject: soc/amd/picasso,stoneyridge/mca: mark num_banks as constant Change-Id: I23aa4d36d4e6d4c7ed66800c2e7963c4ed03c393 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/56236 Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/picasso/mca.c | 4 +--- src/soc/amd/stoneyridge/mca.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c index 65b1916112..3c5dd10c2c 100644 --- a/src/soc/amd/picasso/mca.c +++ b/src/soc/amd/picasso/mca.c @@ -154,9 +154,7 @@ void check_mca(void) { int i; struct mca_bank mci; - unsigned int num_banks; - - num_banks = mca_get_bank_count(); + const unsigned int num_banks = mca_get_bank_count(); for (i = 0 ; i < num_banks ; i++) { mci.sts = rdmsr(MCAX_STATUS_MSR(i)); diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c index c2ec402bd3..6432ff433e 100644 --- a/src/soc/amd/stoneyridge/mca.c +++ b/src/soc/amd/stoneyridge/mca.c @@ -153,9 +153,7 @@ void check_mca(void) { int i; struct mca_bank mci; - unsigned int num_banks; - - num_banks = mca_get_bank_count(); + const unsigned int num_banks = mca_get_bank_count(); if (is_warm_reset()) { for (i = 0 ; i < num_banks ; i++) { -- cgit v1.2.3