From patchwork Thu May 28 08:28:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 477480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bilbo.ozlabs.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.1 X-Original-To: jk@ozlabs.org Delivered-To: jk@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BBBC2140129 for ; Thu, 28 May 2015 18:49:02 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 9A01F1A1262 for ; Thu, 28 May 2015 18:49:02 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 1209 seconds by postgrey-1.35 at bilbo; Thu, 28 May 2015 18:48:38 AEST Received: from mail.emea.novell.com (mail.emea.novell.com [130.57.118.101]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 717841A119C for ; Thu, 28 May 2015 18:48:37 +1000 (AEST) Received: from EMEA1-MTA by mail.emea.novell.com with Novell_GroupWise; Thu, 28 May 2015 09:28:23 +0100 Message-Id: <5566EDC6020000780007E67F@mail.emea.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Thu, 28 May 2015 09:28:22 +0100 From: "Jan Beulich" To: Subject: [PATCH] hvc_xen: avoid uninitialized variable warning Mime-Version: 1.0 Content-Disposition: inline X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Boris Ostrovsky , David Vrabel , Konrad Rzeszutek Wilk Errors-To: linuxppc-dev-bounces+jk=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- 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);