From patchwork Thu Sep 14 14:59:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9953301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC32B60230 for ; Thu, 14 Sep 2017 14:58:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5273288BB for ; Thu, 14 Sep 2017 14:58:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9B9429140; Thu, 14 Sep 2017 14:58:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 71D69288BB for ; Thu, 14 Sep 2017 14:58:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsVZN-0000pC-7v; Thu, 14 Sep 2017 14:56:45 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsVZM-0000p6-5S for xen-devel@lists.xen.org; Thu, 14 Sep 2017 14:56:44 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id E1/0A-03283-BA89AB95; Thu, 14 Sep 2017 14:56:43 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDIsWRWlGSWpSXmKPExsUyZ7p8oO6qGbs iDWbdsbJY8nExiwOjx9Hdv5kCGKNYM/OS8isSWDMWrd/KXrCRvWLNr2nMDYwT2LoYuTiEBCYz Sby/sZgZwvnLKHFozTkmCGcDo8Ti7y8ZIZweRol7y34AlXFysAkYSZw9Op0RxBYRkJa49vkym M0sUC6xq20bUDcHh7BApETHCw2QMIuAqsSPPdfASngFPCVOnZzJCmJLCChITHn4nhkiLihxcu YTFpBWZgF1ifXzhCAmyks0b53NDFFuLNE3q49lAiP/LCQdsxA6ZiHpWMDIvIpRozi1qCy1SNf QXC+pKDM9oyQ3MTNH19DATC83tbg4MT01JzGpWC85P3cTIzAMGYBgB+PtjQGHGCU5mJREeffq 7owU4kvKT6nMSCzOiC8qzUktPsQow8GhJMHbOH1XpJBgUWp6akVaZg4wImDSEhw8SiK836cBp XmLCxJzizPTIVKnGI05bjy8/oeJo+Pm3T9MQix5+XmpUuK8S0AmCYCUZpTmwQ2CReolRlkpYV 5GoNOEeApSi3IzS1DlXzGKczAqCfOuAZnCk5lXArfvFdApTECnnDm9A+SUkkSElFQDI4tqV9c pq8gX6ToTmxiePnkqY2QSYF8q89Vj6/lwd8cwl1XFgl/s/Ra8OSB/9ZzHB+HNn9zUrGamm+Ze jF1Sv9mJ9XFKvafAL6PrrQ57zrzUj26u+3A/MM6c59g7z7kfvXb6Fcyxvqk0R+XOyoDPX9Mk/ Wu+P/E9p++w/N6t5/qfrz0y6TUJVGIpzkg01GIuKk4EAOkHnw7PAgAA X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1505401001!116458981!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 63739 invoked from network); 14 Sep 2017 14:56:42 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-16.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Sep 2017 14:56:42 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v8EEucQX003775 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Sep 2017 14:56:39 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v8EEucfF022931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Sep 2017 14:56:38 GMT Received: from ubhmp0006.oracle.com (ubhmp0006.oracle.com [156.151.24.59]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v8EEubdC021365; Thu, 14 Sep 2017 14:56:37 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Sep 2017 14:56:37 +0000 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Thu, 14 Sep 2017 10:59:52 -0400 Message-Id: <1505401192-4663-1-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: jgross@suse.com, andrew.cooper3@citrix.com, Boris Ostrovsky , jbeulich@suse.com Subject: [Xen-devel] [PATCH] x86/mm: Initialize ol1e in create_grant_pv_mapping() for older compilers X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On gcc 4.4.4: mm.c: In function ‘create_grant_pv_mapping’: mm.c:3839: error: ‘ol1e.l1’ may be used uninitialized in this function While ol1e would not be used uninitialized (because rc needs to be properly set) we have to accommodate these older compliers. Signed-off-by: Boris Ostrovsky Reviewed-by: Jan Beulich --- xen/arch/x86/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 5208e73..8fed981 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3836,7 +3836,8 @@ int create_grant_pv_mapping(uint64_t addr, unsigned long frame, { struct vcpu *curr = current; struct domain *currd = curr->domain; - l1_pgentry_t nl1e, ol1e, *pl1e; + l1_pgentry_t nl1e, *pl1e; + l1_pgentry_t ol1e = {0}; /* older compilers may reqiure initialization */ struct page_info *page; mfn_t gl1mfn; int rc = GNTST_general_error;