driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IDBQ74 ---------------------------------------------------------------------- The type of mnt_type is incorrectly forced changed to unsigned int, which adds the implication that size of unsigned int has be the same as enum. Remove this complication by change the type of local variable mnt_type. Fixes: e6ecc3b028b8 ("soc cache: Add framework driver for HiSilicon SoC cache") Signed-off-by: Yushan Wang <wangyushan12@huawei.com> Signed-off-by: Hongye Lin <linhongye@h-partners.com> --- drivers/soc/hisilicon/hisi_soc_cache_framework.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/soc/hisilicon/hisi_soc_cache_framework.c b/drivers/soc/hisilicon/hisi_soc_cache_framework.c index 4f9514944ec8..67b3b306664d 100644 --- a/drivers/soc/hisilicon/hisi_soc_cache_framework.c +++ b/drivers/soc/hisilicon/hisi_soc_cache_framework.c @@ -154,9 +154,11 @@ static int hisi_soc_cache_maint_pte_entry(pte_t *pte, unsigned long addr, unsigned long next, struct mm_walk *walk) { #ifdef HISI_SOC_CACHE_LLT - unsigned int mnt_type = *((unsigned int *)walk->priv); + enum hisi_soc_cache_maint_type mnt_type = + *((enum hisi_soc_cache_maint_type *)walk->priv); #else - unsigned int mnt_type = *((unsigned int *)walk->private); + enum hisi_soc_cache_maint_type mnt_type = + *((enum hisi_soc_cache_maint_type *)walk->private); #endif size_t size = next - addr; phys_addr_t paddr; -- 2.33.0