Skip to content
Commit 7e777069 authored by Dong Du's avatar Dong Du Committed by Anup Patel
Browse files

lib: sbi: Resolve the uninitialized complaint in sbi_pmu



A recent commit (b28f0700) turns to read from CSR_MCOUNTINHIBIT after
checking the SBI_HART_HAS_MCOUNTINHIBIT HART feature, which leaves the
mctr_inhbt uninitialized in pmu_ctr_find_hw().
As a result, compiler will complain:
error: 'mctr_inhbt' may be used uninitialized in this function.

This commit resolves the issue by assigning an initial value to mctr_inhbt.

Signed-off-by: default avatarDong Du <Dd_nirvana@sjtu.edu.cn>
Reviewed-by: default avatarXiang W <wxjstz@126.com>
Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
parent 7a22c780
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment