From: "Jan Beulich" <JBeulich@suse.com>
To: <linuxppc-dev@lists.ozlabs.org>
Cc: "David Vrabel" <david.vrabel@citrix.com>,
"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] hvc_xen: avoid uninitialized variable warning
Date: Thu, 28 May 2015 09:28:22 +0100 [thread overview]
Message-ID: <5566EDC6020000780007E67F@mail.emea.novell.com> (raw)
Older compilers don't recognize that "v" can't be used uninitialized;
other code using hvm_get_parameter() zeros the value too, so follow
suit here.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/tty/hvc/hvc_xen.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- 4.1-rc5/drivers/tty/hvc/hvc_xen.c
+++ 4.1-rc5-xen-unint-warnings/drivers/tty/hvc/hvc_xen.c
@@ -302,7 +302,7 @@ static int xen_initial_domain_console_in
static void xen_console_update_evtchn(struct xencons_info *info)
{
if (xen_hvm_domain()) {
- uint64_t v;
+ uint64_t v = 0;
int err;
err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
next reply other threads:[~2015-05-28 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 8:28 Jan Beulich [this message]
2015-05-28 10:38 ` David Vrabel
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=5566EDC6020000780007E67F@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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®