From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>,
LKML <linux-kernel@vger.kernel.org>,
"Yan, Zheng" <zheng.z.yan@intel.com>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"mingo@elte.hu" <mingo@elte.hu>
Subject: Re: [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo
Date: Tue, 25 Sep 2012 13:57:11 +0200 [thread overview]
Message-ID: <20120925115711.GB25264@gmail.com> (raw)
In-Reply-To: <1348572025.3881.17.camel@twins>
* Peter Zijlstra <peterz@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)
> > {
> > static struct intel_uncore_box *box;
> >
> > box = *per_cpu_ptr(pmu->box, cpu);
> > if (box)
> > return box;
> > ....
> > }
>
> Uhmm.. me neither.. that looks like a bug indeed.
the compiler (or Sparse) should refuse function local statics
really.
Thanks,
Ingo
next prev parent reply other threads:[~2012-09-25 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 10:44 [BUG] perf/x86: Intel uncore_pmu_to_box() local variable typo Stephane Eranian
2012-09-25 11:20 ` Peter Zijlstra
2012-09-25 11:57 ` Ingo Molnar [this message]
2012-09-27 1:33 ` Yan, Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120925115711.GB25264@gmail.com \
--to=mingo@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=zheng.z.yan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox