]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Remove redundant lines in src/qemu/qemu_driver.c
authorTang Chen <tangchen@cn.fujitsu.com>
Fri, 21 Sep 2012 09:50:10 +0000 (17:50 +0800)
committerEric Blake <eblake@redhat.com>
Fri, 21 Sep 2012 18:49:47 +0000 (12:49 -0600)
maxcpu and hostcpus are defined and calculated in qemudDomainPinVcpuFlags()
and qemudDomainPinEmulator(), but never used. So remove them including nodeinfo.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
src/qemu/qemu_driver.c

index 500ba75cba84c70e20a281263b4a21ba5ab1c171..684892452ad07ebd63bf1a41046fc5a88933eec3 100644 (file)
@@ -3712,8 +3712,6 @@ qemudDomainPinVcpuFlags(virDomainPtr dom,
     virDomainDefPtr persistentDef = NULL;
     virCgroupPtr cgroup_dom = NULL;
     virCgroupPtr cgroup_vcpu = NULL;
-    int maxcpu, hostcpus;
-    virNodeInfo nodeinfo;
     int ret = -1;
     qemuDomainObjPrivatePtr priv;
     bool doReset = false;
@@ -3749,13 +3747,6 @@ qemudDomainPinVcpuFlags(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (nodeGetInfo(dom->conn, &nodeinfo) < 0)
-        goto cleanup;
-    hostcpus = VIR_NODEINFO_MAXCPUS(nodeinfo);
-    maxcpu = maplen * 8;
-    if (maxcpu > hostcpus)
-        maxcpu = hostcpus;
-
     pcpumap = virBitmapNewData(cpumap, maplen);
     if (!pcpumap)
         goto cleanup;
@@ -3995,8 +3986,6 @@ qemudDomainPinEmulator(virDomainPtr dom,
     virCgroupPtr cgroup_emulator = NULL;
     pid_t pid;
     virDomainDefPtr persistentDef = NULL;
-    int maxcpu, hostcpus;
-    virNodeInfo nodeinfo;
     int ret = -1;
     qemuDomainObjPrivatePtr priv;
     bool doReset = false;
@@ -4025,13 +4014,6 @@ qemudDomainPinEmulator(virDomainPtr dom,
 
     priv = vm->privateData;
 
-    if (nodeGetInfo(dom->conn, &nodeinfo) < 0)
-        goto cleanup;
-    hostcpus = VIR_NODEINFO_MAXCPUS(nodeinfo);
-    maxcpu = maplen * 8;
-    if (maxcpu > hostcpus)
-        maxcpu = hostcpus;
-
     pcpumap = virBitmapNewData(cpumap, maplen);
     if (!pcpumap)
         goto cleanup;