WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 31 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/mchec

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 31 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/mcheck/mce.c
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 19 May 2011 21:05:50 +0200
Delivery-date: Thu, 19 May 2011 12:37:39 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1305832234; l=2394; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=AoS8rcd3wMZry1DQU/bkEG/4q44=; b=Jbs8ImXcxhrsV12A3T+1ki8SGE65duICjlIA7KQFm07GrNPcg0RyQWCz2kyF/2iKBDc K/jwpl5Cl1ltho2FmtuBfZzL259s7B0yS0H0r8B5hOvfelB7fZmpkb+msavQK4LJk0odh ApWIs5EhHX8Db5rJFyhuYM4qQ8Kr58tOL1w=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1305831919@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1305831919@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1305824417 -7200
# Node ID c3b532f1954b6c36e14f41481a2ba4fa5052f6ae
# Parent  284f38a196bfdb82c9a2b8b7f0b748269ce95126
gcc-4.6 compile fix: xen/arch/x86/cpu/mcheck/mce.c

mce.c: In function 'mcheck_mca_logout':
mce.c:300:29: error: variable 'mib' set but not used 
[-Werror=unused-but-set-variable]
mce.c: In function 'x86_mc_msrinject':
mce.c:1229:25: error: variable 'c' set but not used 
[-Werror=unused-but-set-variable]

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 284f38a196bf -r c3b532f1954b xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c     Thu May 19 19:00:16 2011 +0200
+++ b/xen/arch/x86/cpu/mcheck/mce.c     Thu May 19 19:00:17 2011 +0200
@@ -162,19 +162,19 @@ void mce_need_clearbank_register(mce_nee
     mc_need_clearbank_scan = cbfunc;
 }
 
-static struct mcinfo_bank *mca_init_bank(enum mca_source who,
+static void mca_init_bank(enum mca_source who,
                                          struct mc_info *mi, int bank)
 {
     struct mcinfo_bank *mib;
 
     if (!mi)
-        return NULL;
+        return;
 
     mib = x86_mcinfo_reserve(mi, sizeof(struct mcinfo_bank));
     if (!mib)
     {
         mi->flags |= MCINFO_FLAGS_UNCOMPLETE;
-        return NULL;
+        return;
     }
 
     memset(mib, 0, sizeof (struct mcinfo_bank));
@@ -207,8 +207,6 @@ static struct mcinfo_bank *mca_init_bank
         mib->mc_ctrl2 = mca_rdmsr(MSR_IA32_MC0_CTL2 + bank);
         rdtscll(mib->mc_tsc);
     }
-
-    return mib;
 }
 
 static int mca_init_global(uint32_t flags, struct mcinfo_global *mig)
@@ -297,8 +295,6 @@ mctelem_cookie_t mcheck_mca_logout(enum 
     recover = (mc_recoverable_scan)? 1: 0;
 
     for (i = 0; i < nr_mce_banks; i++) {
-        struct mcinfo_bank *mib;  /* on stack */
-
         /* Skip bank if corresponding bit in bankmask is clear */
         if (!mcabanks_test(i, bankmask))
             continue;
@@ -353,7 +349,7 @@ mctelem_cookie_t mcheck_mca_logout(enum 
              */
             recover = mc_recoverable_scan(status);
 
-        mib = mca_init_bank(who, mci, i);
+        mca_init_bank(who, mci, i);
 
         if (mc_callback_bank_extended)
             mc_callback_bank_extended(mci, i, status);
@@ -1226,13 +1222,10 @@ static void x86_mc_msrinject(void *data)
 {
     struct xen_mc_msrinject *mci = data;
     struct mcinfo_msr *msr;
-    struct cpuinfo_x86 *c;
     uint64_t hwcr = 0;
     int intpose;
     int i;
 
-    c = &cpu_data[smp_processor_id()];
-
     if (mci->mcinj_flags & _MC_MSRINJ_F_REQ_HWCR_WREN)
         hwcr = x86_mc_hwcr_wren();
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>