[libvirt] [PATCH] src: test: remove unused variate @maxcpu in testDomainGetVcpus

Wang King posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170413021607.34444-1-king.wang@huawei.com
src/test/test_driver.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
[libvirt] [PATCH] src: test: remove unused variate @maxcpu in testDomainGetVcpus
Posted by Wang King 6 years, 11 months ago
The @maxcpu variate isn't used anymore.
---
 src/test/test_driver.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 46ebdcc..919b265 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2467,7 +2467,7 @@ static int testDomainGetVcpus(virDomainPtr domain,
     virDomainObjPtr privdom;
     virDomainDefPtr def;
     size_t i;
-    int maxcpu, hostcpus;
+    int hostcpus;
     int ret = -1;
     struct timeval tv;
     unsigned long long statbase;
@@ -2493,10 +2493,6 @@ static int testDomainGetVcpus(virDomainPtr domain,
     statbase = (tv.tv_sec * 1000UL * 1000UL) + tv.tv_usec;
 
     hostcpus = VIR_NODEINFO_MAXCPUS(privconn->nodeInfo);
-    maxcpu = maplen * 8;
-    if (maxcpu > hostcpus)
-        maxcpu = hostcpus;
-
     if (!(allcpumap = virBitmapNew(hostcpus)))
         goto cleanup;
 
-- 
2.8.3


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] src: test: remove unused variate @maxcpu in testDomainGetVcpus
Posted by John Ferlan 6 years, 11 months ago

On 04/12/2017 10:16 PM, Wang King wrote:
> The @maxcpu variate isn't used anymore.
> ---
>  src/test/test_driver.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 

ACK (and will push shortly)

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list