From: Ingo Molnar <mingo@elte.hu>
To: Jaswinder Singh <jaswinder@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] apic, x86: Need to set offset before using it
Date: Mon, 25 Oct 2010 08:50:41 +0200 [thread overview]
Message-ID: <20101025065041.GB4040@elte.hu> (raw)
In-Reply-To: <1287986288.2940.6.camel@netbook.satnam>
* Jaswinder Singh <jaswinder@infradead.org> wrote:
> Fix the issue pointed by Stephen.
>
> Stephen Rothwell wrote :
> In building Linus' tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> arch/x86/oprofile/op_model_amd.c: In function 'ibs_eilvt_valid':
> arch/x86/oprofile/op_model_amd.c:289: warning: 'offset' may be used uninitialized in this function
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Robert Richter <robert.richter@amd.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> ---
> arch/x86/oprofile/op_model_amd.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
> index 42fb46f..c65a924 100644
> --- a/arch/x86/oprofile/op_model_amd.c
> +++ b/arch/x86/oprofile/op_model_amd.c
> @@ -285,6 +285,7 @@ static inline int ibs_eilvt_valid(void)
> int offset;
>
> rdmsrl(MSR_AMD64_IBSCTL, val);
> + offset = val & IBSCTL_LVT_OFFSET_MASK;
> if (!(val & IBSCTL_LVT_OFFSET_VALID)) {
> pr_err(FW_BUG "cpu %d, invalid IBS "
> "interrupt offset %d (MSR%08X=0x%016llx)",
> @@ -293,8 +294,6 @@ static inline int ibs_eilvt_valid(void)
> return 0;
> }
>
> - offset = val & IBSCTL_LVT_OFFSET_MASK;
> -
> if (eilvt_is_available(offset))
> return !0;
I queued up a different fix, one which also address some of the structural details
in this function.
Thanks,
Ingo
prev parent reply other threads:[~2010-10-25 6:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 5:46 [PATCH] " Jaswinder Singh
2010-10-25 5:58 ` [PATCH v2] " Jaswinder Singh
2010-10-25 6:50 ` Ingo Molnar [this message]
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=20101025065041.GB4040@elte.hu \
--to=mingo@elte.hu \
--cc=jaswinder@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.richter@amd.com \
--cc=sfr@canb.auug.org.au \
/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
all inboxes | Powered by JetHome®