# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1305880433 -3600
# Node ID ff35161fe9ed6abd3d8b1ae197787474d1dc999d
# Parent fb0cfaf001568ae0168545e5c76c4021ddaedfd8
xen: Remove some initialised but otherwise unused variables.
Fixes the build under gcc-4.6 -Werror=unused-but-set-variable
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/cpu/amd.c Fri May 20 09:33:53 2011 +0100
@@ -329,7 +329,6 @@
static void __devinit init_amd(struct cpuinfo_x86 *c)
{
u32 l, h;
- int r;
#ifdef CONFIG_SMP
unsigned long long value;
@@ -375,8 +374,6 @@
}
#endif
- r = get_model_name(c);
-
switch(c->x86)
{
case 6: /* An Athlon/Duron */
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/cpu/intel.c
--- a/xen/arch/x86/cpu/intel.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/cpu/intel.c Fri May 20 09:33:53 2011 +0100
@@ -33,8 +33,6 @@
*/
static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
{
- const char *extra = "";
-
if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &
opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx))
return;
@@ -51,7 +49,6 @@
opt_cpuid_mask_edx);
if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx))
return;
- extra = "extended ";
break;
/*
* CPU supports this feature if the processor signature meets the following:
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c Fri May 20 09:33:53 2011 +0100
@@ -162,19 +162,19 @@
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 @@
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 @@
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 @@
*/
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 @@
{
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();
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/microcode_amd.c
--- a/xen/arch/x86/microcode_amd.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/microcode_amd.c Fri May 20 09:33:53 2011 +0100
@@ -164,7 +164,6 @@
static int get_next_ucode_from_buffer_amd(void *mc, const void *buf,
size_t size, unsigned long *offset)
{
- struct microcode_header_amd *mc_header;
size_t total_size;
const uint8_t *bufp = buf;
unsigned long off;
@@ -182,8 +181,6 @@
return -EINVAL;
}
- mc_header = (struct microcode_header_amd *)(&bufp[off+8]);
-
total_size = (unsigned long) (bufp[off+4] + (bufp[off+5] << 8));
printk(KERN_INFO "microcode: size %lu, total_size %lu, offset %ld\n",
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/mm/mem_sharing.c Fri May 20 09:33:53 2011 +0100
@@ -376,10 +376,8 @@
{
p2m_type_t p2mt;
mfn_t mfn;
- struct page_info *page;
mfn = gfn_to_mfn(p2m_get_hostp2m(d), gfn, &p2mt);
- page = mfn_to_page(mfn);
printk("Debug for domain=%d, gfn=%lx, ",
d->domain_id,
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/msi.c Fri May 20 09:33:53 2011 +0100
@@ -745,17 +745,8 @@
static void __pci_disable_msi(struct msi_desc *entry)
{
struct pci_dev *dev;
- int pos;
- u16 control;
- u8 bus, slot, func;
dev = entry->dev;
- bus = dev->bus;
- slot = PCI_SLOT(dev->devfn);
- func = PCI_FUNC(dev->devfn);
-
- pos = pci_find_cap_offset(bus, slot, func, PCI_CAP_ID_MSI);
- control = pci_conf_read16(bus, slot, func, msi_control_reg(pos));
msi_set_enable(dev, 0);
BUG_ON(list_empty(&dev->msi_list));
diff -r fb0cfaf00156 -r ff35161fe9ed xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/arch/x86/x86_64/mm.c Fri May 20 09:33:53 2011 +0100
@@ -437,7 +437,7 @@
static int setup_compat_m2p_table(struct mem_hotadd_info *info)
{
unsigned long i, va, smap, emap, rwva, epfn = info->epfn;
- unsigned int n, memflags;
+ unsigned int n;
l3_pgentry_t *l3_ro_mpt = NULL;
l2_pgentry_t *l2_ro_mpt = NULL;
struct page_info *l1_pg;
@@ -489,8 +489,6 @@
if ( n == CNT )
continue;
- memflags = MEMF_node(phys_to_nid(i << PAGE_SHIFT));
-
l1_pg = mfn_to_page(alloc_hotadd_mfn(info));
err = map_pages_to_xen(rwva, page_to_mfn(l1_pg),
1UL << PAGETABLE_ORDER,
diff -r fb0cfaf00156 -r ff35161fe9ed xen/common/grant_table.c
--- a/xen/common/grant_table.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/common/grant_table.c Fri May 20 09:33:53 2011 +0100
@@ -765,7 +765,6 @@
struct domain *ld, *rd;
struct active_grant_entry *act;
s16 rc = 0;
- u32 old_pin;
ld = current->domain;
@@ -811,7 +810,6 @@
spin_lock(&rd->grant_table->lock);
act = &active_entry(rd->grant_table, op->map->ref);
- old_pin = act->pin;
if ( op->frame == 0 )
{
diff -r fb0cfaf00156 -r ff35161fe9ed xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/common/sched_credit2.c Fri May 20 09:33:53 2011 +0100
@@ -1880,7 +1880,7 @@
static void init_pcpu(const struct scheduler *ops, int cpu)
{
- int rqi, old_rqi, flags;
+ int rqi, flags;
struct csched_private *prv = CSCHED_PRIV(ops);
struct csched_runqueue_data *rqd;
spinlock_t *old_lock;
@@ -1894,8 +1894,6 @@
return;
}
- old_rqi = prv->runq_map[cpu];
-
/* Figure out which runqueue to put it in */
rqi = 0;
diff -r fb0cfaf00156 -r ff35161fe9ed xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c Fri May 20 09:18:17 2011 +0100
+++ b/xen/drivers/passthrough/vtd/intremap.c Fri May 20 09:33:53 2011 +0100
@@ -367,7 +367,6 @@
unsigned int ioapic_pin = (reg - 0x10) / 2;
int index;
struct IO_xAPIC_route_entry old_rte = { 0 };
- struct IO_APIC_route_remap_entry *remap_rte;
int rte_upper = (reg & 1) ? 1 : 0;
struct iommu *iommu = ioapic_to_iommu(IO_APIC_ID(apic));
struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu);
@@ -389,8 +388,6 @@
*IO_APIC_BASE(apic) = reg + 1;
*(((u32 *)&old_rte) + 1) = *(IO_APIC_BASE(apic)+4);
- remap_rte = (struct IO_APIC_route_remap_entry *) &old_rte;
-
if ( remap_entry_to_ioapic_rte(iommu, index, &old_rte) )
{
*IO_APIC_BASE(apic) = rte_upper ? (reg + 1) : reg;
@@ -850,10 +847,7 @@
for_each_drhd_unit ( drhd )
{
- struct qi_ctrl *qi_ctrl = NULL;
-
iommu = drhd->iommu;
- qi_ctrl = iommu_qi_ctrl(iommu);
/* Clear previous faults */
clear_fault_bits(iommu);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|