[Devel] [PATCH RHEL7 COMMIT] ve/sched: Make functions parameters differ from global variable name
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jul 10 11:57:26 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.2
------>
commit 582ae7b0060eb660d06ef1068ffb99e82021fb87
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon Jul 10 12:57:26 2017 +0400
ve/sched: Make functions parameters differ from global variable name
We already have avenrun global varibale, and the function
parameters and local variable with the same names confuse
reader. Rename them in sane way.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
kernel/sched/core.c | 8 ++++----
kernel/ve/ve.c | 6 +++---
kernel/ve/vecalls.c | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 61cc04f..0c35ee9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -10080,16 +10080,16 @@ int cpu_cgroup_get_stat(struct cgroup *cgrp, struct kernel_cpustat *kstat)
return 0;
}
-int cpu_cgroup_get_avenrun(struct cgroup *cgrp, unsigned long *avenrun)
+int cpu_cgroup_get_avenrun(struct cgroup *cgrp, unsigned long *avnrun)
{
struct task_group *tg = cgroup_tg(cgrp);
if (tg == &root_task_group)
return -ENOSYS;
- avenrun[0] = tg->avenrun[0];
- avenrun[1] = tg->avenrun[1];
- avenrun[2] = tg->avenrun[2];
+ avnrun[0] = tg->avenrun[0];
+ avnrun[1] = tg->avenrun[1];
+ avnrun[2] = tg->avenrun[2];
return 0;
}
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 0533d79..df2c3d9 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -1550,15 +1550,15 @@ int ve_show_loadavg(struct ve_struct *ve, struct seq_file *p)
return err;
}
-int cpu_cgroup_get_avenrun(struct cgroup *cgrp, unsigned long *avenrun);
+int cpu_cgroup_get_avenrun(struct cgroup *cgrp, unsigned long *avnrun);
-int ve_get_cpu_avenrun(struct ve_struct *ve, unsigned long *avenrun)
+int ve_get_cpu_avenrun(struct ve_struct *ve, unsigned long *avnrun)
{
struct cgroup_subsys_state *css;
int err;
css = ve_get_init_css(ve, cpu_cgroup_subsys_id);
- err = cpu_cgroup_get_avenrun(css->cgroup, avenrun);
+ err = cpu_cgroup_get_avenrun(css->cgroup, avnrun);
css_put(css);
return err;
}
diff --git a/kernel/ve/vecalls.c b/kernel/ve/vecalls.c
index 5ce3e29..346541e 100644
--- a/kernel/ve/vecalls.c
+++ b/kernel/ve/vecalls.c
@@ -50,7 +50,7 @@ static int fill_cpu_stat(envid_t veid, struct vz_cpu_stat __user *buf)
int retval;
int i;
unsigned long tmp;
- unsigned long avenrun[3];
+ unsigned long avnrun[3];
struct kernel_cpustat kstat;
if (!ve_is_super(get_exec_env()) && (veid != get_exec_env()->veid))
@@ -68,7 +68,7 @@ static int fill_cpu_stat(envid_t veid, struct vz_cpu_stat __user *buf)
if (retval)
goto out_free;
- retval = ve_get_cpu_avenrun(ve, avenrun);
+ retval = ve_get_cpu_avenrun(ve, avnrun);
if (retval)
goto out_free;
More information about the Devel
mailing list