lib/hardwaremain: change type of "complete" element in boot_state struct
A signed bitfield with a length of 1 bit can only have the values 0 and -1. Assigning a 1 ends up behaving as expected, but it's not the semantically correct thing to do there. Changing the type of the element to an unsigned bitfield with a length of 1 would fix that, but since this is used as a boolean value, just change it to bool type. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I230804335e7a15a8a9489859b20846988ba6c5cd Reviewed-on: https://review.coreboot.org/c/coreboot/+/58076 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
f10776781d
commit
56da0b79ad
|
@ -56,7 +56,7 @@ struct boot_state {
|
|||
boot_state_t (*run_state)(void *arg);
|
||||
void *arg;
|
||||
int num_samples;
|
||||
int complete : 1;
|
||||
bool complete;
|
||||
};
|
||||
|
||||
#define BS_INIT(state_, run_func_) \
|
||||
|
@ -67,7 +67,7 @@ struct boot_state {
|
|||
.phases = { { NULL, 0 }, { NULL, 0 } }, \
|
||||
.run_state = run_func_, \
|
||||
.arg = NULL, \
|
||||
.complete = 0, \
|
||||
.complete = false, \
|
||||
}
|
||||
#define BS_INIT_ENTRY(state_, run_func_) \
|
||||
[state_] = BS_INIT(state_, run_func_)
|
||||
|
@ -367,7 +367,7 @@ static void bs_walk_state_machine(void)
|
|||
|
||||
bs_sample_time(state);
|
||||
|
||||
state->complete = 1;
|
||||
state->complete = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue