From: Paul Jackson Date: Tue, 29 Apr 2008 07:59:55 +0000 (-0700) Subject: cgroup: fix sparse warning of shadow symbol in cgroup.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fe91d518e4958af7edebbeb112a3272b2be232d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git cgroup: fix sparse warning of shadow symbol in cgroup.c Fix a code warning: symbol 'p' shadows an earlier one This is a reincarnation of Harvey Harrison's patch: cpuset: sparse warnings in cpuset.c Independently, Cliff Wickman moved the affected code, from kernel/cpuset.c to kernel/cgroup.c, in his patch: cpusets: update_cpumask revision Signed-off-by: Paul Jackson Cc: Harvey Harrison Cc: Cliff Wickman Acked-by: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e7da66efc9fc..068f58da855a 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1913,14 +1913,14 @@ int cgroup_scan_tasks(struct cgroup_scanner *scan) if (heap->size) { for (i = 0; i < heap->size; i++) { - struct task_struct *p = heap->ptrs[i]; + struct task_struct *q = heap->ptrs[i]; if (i == 0) { - latest_time = p->start_time; - latest_task = p; + latest_time = q->start_time; + latest_task = q; } /* Process the task per the caller's callback */ - scan->process_task(p, scan); - put_task_struct(p); + scan->process_task(q, scan); + put_task_struct(q); } /* * If we had to process any tasks at all, scan again