If the new percpu tree is combined with the perf events tree
the following new warning triggers:
kernel/hw_breakpoint.c: In function 'toggle_bp_task_slot':
kernel/hw_breakpoint.c:151: warning: 'task_bp_pinned' is used uninitialized in this function
Because it's not valid anymore to define a local variable
and a percpu variable (even if it's file scope local) with
the same name.
Rename the local variable to resolve this.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <
200911260701.nAQ71owx016356@imap1.linux-foundation.org>
[ v2: added changelog ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
int count = 0;
struct perf_event *bp;
struct perf_event_context *ctx = tsk->perf_event_ctxp;
- unsigned int *task_bp_pinned;
+ unsigned int *tsk_pinned;
struct list_head *list;
unsigned long flags;
if (WARN_ONCE(count < 0, "No breakpoint counter found in the counter list"))
return;
- task_bp_pinned = per_cpu(task_bp_pinned, cpu);
+ tsk_pinned = per_cpu(task_bp_pinned, cpu);
if (enable) {
- task_bp_pinned[count]++;
+ tsk_pinned[count]++;
if (count > 0)
- task_bp_pinned[count-1]--;
+ tsk_pinned[count-1]--;
} else {
- task_bp_pinned[count]--;
+ tsk_pinned[count]--;
if (count > 0)
- task_bp_pinned[count-1]++;
+ tsk_pinned[count-1]++;
}
}