From nobody Sat Feb 7 06:49:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517841710280289.75322179673583; Mon, 5 Feb 2018 06:41:50 -0800 (PST) Received: from localhost ([::1]:50544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eihxt-00006z-DZ for importer@patchew.org; Mon, 05 Feb 2018 09:41:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eihrI-0002Al-6R for qemu-devel@nongnu.org; Mon, 05 Feb 2018 09:35:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eihrD-0006CB-5a for qemu-devel@nongnu.org; Mon, 05 Feb 2018 09:35:00 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:48300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eihrC-0005dT-Km; Mon, 05 Feb 2018 09:34:55 -0500 Received: from [194.100.51.2] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1eihqZ-0001s1-Af; Mon, 05 Feb 2018 15:34:15 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1eihqJ-0008OA-5g; Mon, 05 Feb 2018 16:33:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=References:In-Reply-To:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=9wvihqhyiUtsXHND8hGZNOAygdBZpzAeZ4gjSfncQKg=; b=grReKtM2zlAXBwKv5cKsbekyF0fDGrANDVvV98UpKCOz7RUSNDReRTa3d1tmQKSAEWaNexSaVEzYTSEHTWpgS1GG4FJuIs4D8UoHDA/Xo0qYpIxgpkzxmWUl4/GPx2uyQ64J6IBRrWCTVtQrQRm8i7P0SVQt9JXG2d7H+ByjhalyY2xtDGWwh9oC7jXKTmhCLwn1i8B/bQxxVRlljQSUWKYSVEXwGePEtvTVYrCjeWh7rQVhxMBjREEFbePalwIpUDE84mvOk5lkDAQLhmRMle6jgNIgeUQimJux/feRrIRkarclPwlJHob/D95NuJTsqdGGmL+Q8pZ8mImSPCAn3Q==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Mon, 5 Feb 2018 16:33:08 +0200 Message-Id: <49c74fe8b3aead9056e61a85b145ce787d06262b.1517840876.git.berto@igalia.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH v4 08/39] qcow2: Remove BDS parameter from qcow2_cache_destroy() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Anton Nefedov , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , "Denis V . Lunev" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This function was never using the BlockDriverState parameter so it can be safely removed. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- block/qcow2-cache.c | 2 +- block/qcow2.c | 16 ++++++++-------- block/qcow2.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 3b55f39afb..6f17a28635 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -142,7 +142,7 @@ Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, in= t num_tables) return c; } =20 -int qcow2_cache_destroy(BlockDriverState *bs, Qcow2Cache *c) +int qcow2_cache_destroy(Qcow2Cache *c) { int i; =20 diff --git a/block/qcow2.c b/block/qcow2.c index 1f80961e1b..8e64c12605 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1042,10 +1042,10 @@ static void qcow2_update_options_commit(BlockDriver= State *bs, int i; =20 if (s->l2_table_cache) { - qcow2_cache_destroy(bs, s->l2_table_cache); + qcow2_cache_destroy(s->l2_table_cache); } if (s->refcount_block_cache) { - qcow2_cache_destroy(bs, s->refcount_block_cache); + qcow2_cache_destroy(s->refcount_block_cache); } s->l2_table_cache =3D r->l2_table_cache; s->refcount_block_cache =3D r->refcount_block_cache; @@ -1071,10 +1071,10 @@ static void qcow2_update_options_abort(BlockDriverS= tate *bs, Qcow2ReopenState *r) { if (r->l2_table_cache) { - qcow2_cache_destroy(bs, r->l2_table_cache); + qcow2_cache_destroy(r->l2_table_cache); } if (r->refcount_block_cache) { - qcow2_cache_destroy(bs, r->refcount_block_cache); + qcow2_cache_destroy(r->refcount_block_cache); } qapi_free_QCryptoBlockOpenOptions(r->crypto_opts); } @@ -1512,10 +1512,10 @@ static int qcow2_do_open(BlockDriverState *bs, QDic= t *options, int flags, s->l1_table =3D NULL; cache_clean_timer_del(bs); if (s->l2_table_cache) { - qcow2_cache_destroy(bs, s->l2_table_cache); + qcow2_cache_destroy(s->l2_table_cache); } if (s->refcount_block_cache) { - qcow2_cache_destroy(bs, s->refcount_block_cache); + qcow2_cache_destroy(s->refcount_block_cache); } qcrypto_block_free(s->crypto); qapi_free_QCryptoBlockOpenOptions(s->crypto_opts); @@ -2063,8 +2063,8 @@ static void qcow2_close(BlockDriverState *bs) } =20 cache_clean_timer_del(bs); - qcow2_cache_destroy(bs, s->l2_table_cache); - qcow2_cache_destroy(bs, s->refcount_block_cache); + qcow2_cache_destroy(s->l2_table_cache); + qcow2_cache_destroy(s->refcount_block_cache); =20 qcrypto_block_free(s->crypto); s->crypto =3D NULL; diff --git a/block/qcow2.h b/block/qcow2.h index 96626d151f..e0c429aef2 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -637,7 +637,7 @@ int qcow2_read_snapshots(BlockDriverState *bs); =20 /* qcow2-cache.c functions */ Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables); -int qcow2_cache_destroy(BlockDriverState* bs, Qcow2Cache *c); +int qcow2_cache_destroy(Qcow2Cache *c); =20 void qcow2_cache_entry_mark_dirty(Qcow2Cache *c, void *table); int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c); --=20 2.11.0