提交 25b368f4 编写于 作者: Y Ye Weihua 提交者: Zheng Zengkai

livepatch: Fix compile warnning

hulk inclusion
category: bugfix
bugzilla: 181325 https://gitee.com/openeuler/kernel/issues/I4DDEL

--------------------------------

An error is reported during version building: error: ISO C90 forbids mixed
declarations and code.

Fix it by moving the variable definition forward.
Signed-off-by: NYe Weihua <yeweihua4@huawei.com>
Reviewed-by: NYang Jihong <yangjihong1@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b84a2bb4
......@@ -298,15 +298,14 @@ int klp_check_calltrace(struct klp_patch *patch, int enable)
int ret = 0;
struct klp_func_list *nojump_funcs = NULL;
struct klp_func_list *other_funcs = NULL;
struct walk_stackframe_args args = {
.ret = 0
};
ret = klp_check_activeness_func(patch, enable, &nojump_funcs, &other_funcs);
if (ret)
goto out;
struct walk_stackframe_args args = {
.other_funcs = other_funcs,
.ret = 0
};
args.other_funcs = other_funcs;
for_each_process_thread(g, t) {
if (t == current) {
......
......@@ -291,17 +291,16 @@ int klp_check_calltrace(struct klp_patch *patch, int enable)
int ret = 0;
struct klp_func_list *nojump_funcs = NULL;
struct klp_func_list *other_funcs = NULL;
ret = klp_check_activeness_func(patch, enable, &nojump_funcs, &other_funcs);
if (ret)
goto out;
struct walk_stackframe_args args = {
.enable = enable,
.other_funcs = other_funcs,
.ret = 0
};
ret = klp_check_activeness_func(patch, enable, &nojump_funcs, &other_funcs);
if (ret)
goto out;
args.other_funcs = other_funcs;
for_each_process_thread(g, t) {
/*
* Handle the current carefully on each CPUs, we shouldn't
......
......@@ -316,15 +316,14 @@ int klp_check_calltrace(struct klp_patch *patch, int enable)
int ret = 0;
struct klp_func_list *nojump_funcs = NULL;
struct klp_func_list *other_funcs = NULL;
struct walk_stackframe_args args = {
.ret = 0
};
ret = klp_check_activeness_func(patch, enable, &nojump_funcs, &other_funcs);
if (ret)
goto out;
struct walk_stackframe_args args = {
.other_funcs = other_funcs,
.ret = 0
};
args.other_funcs = other_funcs;
for_each_process_thread(g, t) {
if (t == current) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册