Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-26 Thread Yan, Zheng
On 09/25/2012 06:44 PM, Stephane Eranian wrote: > Hi, > > I don't understand why the local variable box needs to > be declared static here: > > static struct intel_uncore_box * > uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) > { > static struct intel_uncore_box *box; > >

Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-26 Thread Yan, Zheng
On 09/25/2012 06:44 PM, Stephane Eranian wrote: Hi, I don't understand why the local variable box needs to be declared static here: static struct intel_uncore_box * uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) { static struct intel_uncore_box *box; box =

Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-25 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Tue, 2012-09-25 at 12:44 +0200, Stephane Eranian wrote: > > Hi, > > > > I don't understand why the local variable box needs to > > be declared static here: > > > > static struct intel_uncore_box * > > uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) > > {

Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-25 Thread Peter Zijlstra
On Tue, 2012-09-25 at 12:44 +0200, Stephane Eranian wrote: > Hi, > > I don't understand why the local variable box needs to > be declared static here: > > static struct intel_uncore_box * > uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) > { > static struct intel_uncore_box

[BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-25 Thread Stephane Eranian
Hi, I don't understand why the local variable box needs to be declared static here: static struct intel_uncore_box * uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) { static struct intel_uncore_box *box; box = *per_cpu_ptr(pmu->box, cpu); if (box)

[BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-25 Thread Stephane Eranian
Hi, I don't understand why the local variable box needs to be declared static here: static struct intel_uncore_box * uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) { static struct intel_uncore_box *box; box = *per_cpu_ptr(pmu-box, cpu); if (box)

Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-25 Thread Peter Zijlstra
On Tue, 2012-09-25 at 12:44 +0200, Stephane Eranian wrote: Hi, I don't understand why the local variable box needs to be declared static here: static struct intel_uncore_box * uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu) { static struct intel_uncore_box *box;

Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo

2012-09-25 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Tue, 2012-09-25 at 12:44 +0200, Stephane Eranian wrote: Hi, I don't understand why the local variable box needs to be declared static here: static struct intel_uncore_box * uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu)