]> Git Repo - linux.git/commitdiff
sched/cpuacct: Rename parameter in cpuusage_write() for readability
authorDongsheng Yang <[email protected]>
Mon, 21 Dec 2015 11:14:42 +0000 (19:14 +0800)
committerIngo Molnar <[email protected]>
Mon, 21 Mar 2016 09:59:29 +0000 (10:59 +0100)
The name of the 'reset' parameter to cpuusage_write() is quite confusing,
because the only valid value we allow is '0', so !reset is actually the
case that resets ...

Rename it to 'val' and explain it in a comment that we only allow 0.

Signed-off-by: Dongsheng Yang <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/cpuacct.c

index dd7cbb55bbf2c98591dd31603790676136eafd82..9c2bbf7efa1aae00599ac7b338e87aad004f1961 100644 (file)
@@ -145,13 +145,16 @@ static u64 cpuusage_read(struct cgroup_subsys_state *css, struct cftype *cft)
 }
 
 static int cpuusage_write(struct cgroup_subsys_state *css, struct cftype *cft,
-                         u64 reset)
+                         u64 val)
 {
        struct cpuacct *ca = css_ca(css);
        int err = 0;
        int i;
 
-       if (reset) {
+       /*
+        * Only allow '0' here to do a reset.
+        */
+       if (val) {
                err = -EINVAL;
                goto out;
        }
This page took 0.062133 seconds and 4 git commands to generate.