summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2022-01-27 14:33:08 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-01-28 17:56:10 +0000
commit4bffbb661c328ced1e7928b74e1fe58fec2741f8 (patch)
treeb7f91fefd61243f1f2b13078c398e429365c3a20 /src/lib
parentfa99982b71fd73e0654a499c92965a4bfc8805dd (diff)
lib/spd_cache.c: Drop comparison to {true, false}
Change-Id: I0ef8c0159c99606aad537fd5e14d3c74e32651d8 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61423 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/spd_cache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/spd_cache.c b/src/lib/spd_cache.c
index be36141e26..44830a8537 100644
--- a/src/lib/spd_cache.c
+++ b/src/lib/spd_cache.c
@@ -154,21 +154,21 @@ bool check_if_dimm_changed(u8 *spd_cache, struct spd_block *blk)
bool dimm_present_in_cache;
bool dimm_changed = false;
/* Check if the dimm is the same with last system boot. */
- for (i = 0; i < SC_SPD_NUMS && dimm_changed == false; i++) {
+ for (i = 0; i < SC_SPD_NUMS && !dimm_changed; i++) {
/* Return true if any error happened here. */
if (get_spd_sn(blk->addr_map[i], &sn) == CB_ERR)
return true;
dimm_present_in_cache = get_cached_dimm_present(spd_cache, i);
/* Dimm is not present now. */
if (sn == 0xffffffff) {
- if (dimm_present_in_cache == false)
+ if (!dimm_present_in_cache)
printk(BIOS_NOTICE, "SPD_CACHE: DIMM%d is not present\n", i);
else {
printk(BIOS_NOTICE, "SPD_CACHE: DIMM%d lost\n", i);
dimm_changed = true;
}
} else { /* Dimm is present now. */
- if (dimm_present_in_cache == true) {
+ if (dimm_present_in_cache) {
if (memcmp(&sn, spd_cache + SC_SPD_OFFSET(i) + DDR4_SPD_SN_OFF,
SPD_SN_LEN) == 0)
printk(BIOS_NOTICE, "SPD_CACHE: DIMM%d is the same\n",
@@ -195,7 +195,7 @@ enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk)
/* Find the first present SPD */
for (i = 0; i < SC_SPD_NUMS; i++)
- if (get_cached_dimm_present(spd_cache, i) == true)
+ if (get_cached_dimm_present(spd_cache, i))
break;
if (i == SC_SPD_NUMS) {
@@ -211,7 +211,7 @@ enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk)
blk->len = SPD_PAGE_LEN;
for (i = 0; i < SC_SPD_NUMS; i++)
- if (get_cached_dimm_present(spd_cache, i) == true)
+ if (get_cached_dimm_present(spd_cache, i))
blk->spd_array[i] = spd_cache + SC_SPD_OFFSET(i);
else
blk->spd_array[i] = NULL;