*** BLURB HERE ***
Chen Ridong (1): misc: fix compiling waring
kernel/cgroup/misc.c | 5 +++++ 1 file changed, 5 insertions(+)
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9061M
----------------------------------------------------------------------
Compiling warning showed as below are caused by reserving kabi for misc. Fix warning by reserving "misc_res_name".
kernel/cgroup/misc.c:328:4: warning: array subscript i is outside array bounds of ‘const char * const[0]’ [-Warray-bounds] 328 | seq_printf(sf, "%s %llu\n", misc_res_name[i], cap);
Fixes: c9c3c6a65afb ("cgroup/misc: reserve kabi for future misc ") Signed-off-by: Chen Ridong chenridong@huawei.com --- kernel/cgroup/misc.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kernel/cgroup/misc.c b/kernel/cgroup/misc.c index 79a3717a5803..867f4c43727d 100644 --- a/kernel/cgroup/misc.c +++ b/kernel/cgroup/misc.c @@ -24,6 +24,11 @@ static const char *const misc_res_name[] = { /* AMD SEV-ES ASIDs resource */ "sev_es", #endif + "misc_reserve1", + "misc_reserve2", + "misc_reserve3", + "misc_reserve4", + "misc_reserve5", };
/* Root misc cgroup */