From cf2db84b03c85039b7c179976eed0e7e6a4ce9b9 Mon Sep 17 00:00:00 2001 From: Tang Yizhou Date: Sat, 30 Oct 2021 11:09:38 +0800 Subject: [PATCH] share_pool: Fix warning missing braces around initializer ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA ------------------------------------------------- Fix warnings: missing braces around initializer Signed-off-by: Tang Yizhou Reviewed-by: Ding Tianhong Reviewed-by: Kefeng Wang Signed-off-by: Yang Yingliang Reviewed-by: Weilong Chen Signed-off-by: Yang Yingliang --- mm/share_pool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/share_pool.c b/mm/share_pool.c index dd90f5d1742d..f186efadd3e6 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -89,7 +89,7 @@ static DEFINE_IDR(sp_stat_idr); static DECLARE_RWSEM(sp_stat_sem); /* for kthread buff_module_guard_work */ -static struct sp_proc_stat kthread_stat = {0}; +static struct sp_proc_stat kthread_stat; /* The caller must hold sp_stat_sem */ static struct sp_proc_stat *sp_get_proc_stat_locked(int tgid) @@ -203,7 +203,7 @@ struct sp_spa_stat { unsigned long dvpp_va_size; }; -static struct sp_spa_stat spa_stat = {0}; +static struct sp_spa_stat spa_stat; /* statistics of all sp group born from sp_alloc and k2u(spg) */ struct sp_spg_stat { @@ -211,7 +211,7 @@ struct sp_spg_stat { atomic64_t spa_total_size; }; -static struct sp_spg_stat spg_stat = {0}; +static struct sp_spg_stat spg_stat; /*** Global share pool VA allocator ***/ -- GitLab