From nobody Sat Feb 7 08:54:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568913269; cv=none; d=zoho.com; s=zohoarc; b=iZb1fLtJxUo3Fu6VLtuk1m9Qf8iaV/7eCtvX59VYUSKWutHE414UwIM1m5JkhOiy7sBHtKXv4ZQQbTam9EQ6H0EuP4gjUvvMDT9kBYmrfmdAywnQ5echh+djv4oU0pvazC++4+XIDru/Ur+3iE2Y0CV1mlGbjxoY3sI0JD1Pq3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568913269; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/MgELH4IkF82fACd0UFaK79p4tEyDb3zfJc7w1lVqes=; b=itrMG45yQwjF65BTjdQqkJxzPhTshKxELzpEXsL98mKf4zJi/mQ2l2Si2FVTTtNEpsvjzL/p0M0SeYeQt2sIcUCfThAojCaeDcGe36SB9nE9VaPYYThTvHD673OvYmy0OSRRpwA7bJHFU+k4FyvLS//ftuBXIQZZQhq2qX5JWqE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1568913269089385.3713860877209; Thu, 19 Sep 2019 10:14:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71AB38A1CAC; Thu, 19 Sep 2019 17:14:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4CAF65D70D; Thu, 19 Sep 2019 17:14:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0EDC9180BAA3; Thu, 19 Sep 2019 17:14:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8JHDqEO004768 for ; Thu, 19 Sep 2019 13:13:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id E315060C5E; Thu, 19 Sep 2019 17:13:52 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BEEC60C80 for ; Thu, 19 Sep 2019 17:13:50 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 19 Sep 2019 19:13:19 +0200 Message-Id: <9ca744f29d2195bf4d0c760fbebf079a8417cdd2.1568911535.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 16/22] qemu: driver: Remove QEMU_ADD_BLOCK_PARAM_LL macro X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Thu, 19 Sep 2019 17:14:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Use QEMU_ADD_BLOCK_PARAM_ULL instead since all parameters are now unsigned. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 98ada96fe7..9c24e435e9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -21488,20 +21488,6 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr drive= r ATTRIBUTE_UNUSED, goto cleanup; \ } while (0) -/* expects a LL, but typed parameter must be ULL */ -#define QEMU_ADD_BLOCK_PARAM_LL(record, maxparams, num, name, value) \ -do { \ - char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \ - snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, \ - "block.%zu.%s", num, name); \ - if (virTypedParamsAddULLong(&(record)->params, \ - &(record)->nparams, \ - maxparams, \ - param_name, \ - value) < 0) \ - goto cleanup; \ -} while (0) - #define QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, num, name, value) \ do { \ char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \ @@ -21680,14 +21666,14 @@ qemuDomainGetStatsBlockExportFrontend(const char = *frontendname, goto cleanup; } - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "rd.reqs", entry-= >rd_req); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "rd.bytes", entry= ->rd_bytes); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "rd.times", entry= ->rd_total_times); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "wr.reqs", entry-= >wr_req); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "wr.bytes", entry= ->wr_bytes); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "wr.times", entry= ->wr_total_times); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "fl.reqs", entry-= >flush_req); - QEMU_ADD_BLOCK_PARAM_LL(records, nrecords, recordnr, "fl.times", entry= ->flush_total_times); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "rd.reqs", entry= ->rd_req); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "rd.bytes", entr= y->rd_bytes); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "rd.times", entr= y->rd_total_times); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "wr.reqs", entry= ->wr_req); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "wr.bytes", entr= y->wr_bytes); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "wr.times", entr= y->wr_total_times); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "fl.reqs", entry= ->flush_req); + QEMU_ADD_BLOCK_PARAM_ULL(records, nrecords, recordnr, "fl.times", entr= y->flush_total_times); ret =3D 0; cleanup: @@ -21882,8 +21868,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver, return ret; } -#undef QEMU_ADD_BLOCK_PARAM_LL - #undef QEMU_ADD_BLOCK_PARAM_ULL #undef QEMU_ADD_NAME_PARAM --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list