include/cpu/x86/msr.h: Update return types from int -> bool
For all functions which check flags, return a bool type instead of an int type. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I39f0e2f392ec999f7622ed28c5755dd4d0eecf42 Reviewed-on: https://review.coreboot.org/c/coreboot/+/90776 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
d5fb4becd5
commit
cacc11de4f
1 changed files with 15 additions and 15 deletions
|
|
@ -142,77 +142,77 @@ static inline void mca_clear_status(void)
|
|||
|
||||
/* Helpers for interpreting MC[i]_STATUS */
|
||||
|
||||
static inline int mca_valid(msr_t msr)
|
||||
static inline bool mca_valid(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_VAL);
|
||||
}
|
||||
|
||||
static inline int mca_over(msr_t msr)
|
||||
static inline bool mca_over(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_OVERFLOW);
|
||||
}
|
||||
|
||||
static inline int mca_uc(msr_t msr)
|
||||
static inline bool mca_uc(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_UC);
|
||||
}
|
||||
|
||||
static inline int mca_en(msr_t msr)
|
||||
static inline bool mca_en(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_EN);
|
||||
}
|
||||
|
||||
static inline int mca_miscv(msr_t msr)
|
||||
static inline bool mca_miscv(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_MISCV);
|
||||
}
|
||||
|
||||
static inline int mca_addrv(msr_t msr)
|
||||
static inline bool mca_addrv(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_ADDRV);
|
||||
}
|
||||
|
||||
static inline int mca_pcc(msr_t msr)
|
||||
static inline bool mca_pcc(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_PCC);
|
||||
}
|
||||
|
||||
static inline int mca_tcc(msr_t msr)
|
||||
static inline bool mca_tcc(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_TCC);
|
||||
}
|
||||
|
||||
static inline int mca_syndv(msr_t msr)
|
||||
static inline bool mca_syndv(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_SYNDV);
|
||||
}
|
||||
|
||||
static inline int mca_idv(msr_t msr)
|
||||
static inline bool mca_idv(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_COREID_VAL);
|
||||
}
|
||||
|
||||
static inline int mca_cecc(msr_t msr)
|
||||
static inline bool mca_cecc(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_CECC);
|
||||
}
|
||||
|
||||
static inline int mca_uecc(msr_t msr)
|
||||
static inline bool mca_uecc(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_UECC);
|
||||
}
|
||||
|
||||
static inline int mca_defd(msr_t msr)
|
||||
static inline bool mca_defd(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_DEFERRED);
|
||||
}
|
||||
|
||||
static inline int mca_poison(msr_t msr)
|
||||
static inline bool mca_poison(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_POISON);
|
||||
}
|
||||
|
||||
static inline int mca_sublink(msr_t msr)
|
||||
static inline bool mca_sublink(msr_t msr)
|
||||
{
|
||||
return !!(msr.hi & MCA_STATUS_HI_SUBLINK);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue