From nobody Wed Dec 17 21:48:38 2025 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; 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534338329955829.9701509617628; Wed, 15 Aug 2018 06:05:29 -0700 (PDT) Received: from localhost ([::1]:49517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpvUO-0007ba-PT for importer@patchew.org; Wed, 15 Aug 2018 09:05:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpvLe-0004fp-UU for qemu-devel@nongnu.org; Wed, 15 Aug 2018 08:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpvLc-0001HN-6R for qemu-devel@nongnu.org; Wed, 15 Aug 2018 08:56:25 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51936 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpvLS-0000bi-Mk; Wed, 15 Aug 2018 08:56:14 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBCE5406E974; Wed, 15 Aug 2018 12:55:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-3.ams2.redhat.com [10.36.117.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0430E7C52; Wed, 15 Aug 2018 12:55:56 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 15 Aug 2018 14:55:31 +0200 Message-Id: <20180815125537.10651-16-kwolf@redhat.com> In-Reply-To: <20180815125537.10651-1-kwolf@redhat.com> References: <20180815125537.10651-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 15 Aug 2018 12:55:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 15 Aug 2018 12:55:57 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 15/21] block: drop empty .bdrv_close handlers 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: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy .bdrv_close handler is optional after previous commit, no needs to keep empty functions more. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- block/blkreplay.c | 5 ----- block/commit.c | 5 ----- block/copy-on-read.c | 6 ------ block/mirror.c | 5 ----- block/null.c | 6 ------ block/raw-format.c | 5 ----- 6 files changed, 32 deletions(-) diff --git a/block/blkreplay.c b/block/blkreplay.c index 766150ade6..b5d9efdeca 100755 --- a/block/blkreplay.c +++ b/block/blkreplay.c @@ -43,10 +43,6 @@ fail: return ret; } =20 -static void blkreplay_close(BlockDriverState *bs) -{ -} - static int64_t blkreplay_getlength(BlockDriverState *bs) { return bdrv_getlength(bs->file->bs); @@ -135,7 +131,6 @@ static BlockDriver bdrv_blkreplay =3D { .instance_size =3D 0, =20 .bdrv_open =3D blkreplay_open, - .bdrv_close =3D blkreplay_close, .bdrv_child_perm =3D bdrv_filter_default_perms, .bdrv_getlength =3D blkreplay_getlength, =20 diff --git a/block/commit.c b/block/commit.c index e1814d9693..eb414579bd 100644 --- a/block/commit.c +++ b/block/commit.c @@ -239,10 +239,6 @@ static void bdrv_commit_top_refresh_filename(BlockDriv= erState *bs, QDict *opts) bs->backing->bs->filename); } =20 -static void bdrv_commit_top_close(BlockDriverState *bs) -{ -} - static void bdrv_commit_top_child_perm(BlockDriverState *bs, BdrvChild *c, const BdrvChildRole *role, BlockReopenQueue *reopen_queue, @@ -260,7 +256,6 @@ static BlockDriver bdrv_commit_top =3D { .bdrv_co_preadv =3D bdrv_commit_top_preadv, .bdrv_co_block_status =3D bdrv_co_block_status_from_backing, .bdrv_refresh_filename =3D bdrv_commit_top_refresh_filename, - .bdrv_close =3D bdrv_commit_top_close, .bdrv_child_perm =3D bdrv_commit_top_child_perm, }; =20 diff --git a/block/copy-on-read.c b/block/copy-on-read.c index a19164f9eb..64dcc424b5 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-read.c @@ -45,11 +45,6 @@ static int cor_open(BlockDriverState *bs, QDict *options= , int flags, } =20 =20 -static void cor_close(BlockDriverState *bs) -{ -} - - #define PERM_PASSTHROUGH (BLK_PERM_CONSISTENT_READ \ | BLK_PERM_WRITE \ | BLK_PERM_RESIZE) @@ -143,7 +138,6 @@ BlockDriver bdrv_copy_on_read =3D { .format_name =3D "copy-on-read", =20 .bdrv_open =3D cor_open, - .bdrv_close =3D cor_close, .bdrv_child_perm =3D cor_child_perm, =20 .bdrv_getlength =3D cor_getlength, diff --git a/block/mirror.c b/block/mirror.c index dd5ca02b09..6cc10df5c9 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1426,10 +1426,6 @@ static void bdrv_mirror_top_refresh_filename(BlockDr= iverState *bs, QDict *opts) bs->backing->bs->filename); } =20 -static void bdrv_mirror_top_close(BlockDriverState *bs) -{ -} - static void bdrv_mirror_top_child_perm(BlockDriverState *bs, BdrvChild *c, const BdrvChildRole *role, BlockReopenQueue *reopen_queue, @@ -1456,7 +1452,6 @@ static BlockDriver bdrv_mirror_top =3D { .bdrv_co_flush =3D bdrv_mirror_top_flush, .bdrv_co_block_status =3D bdrv_co_block_status_from_backing, .bdrv_refresh_filename =3D bdrv_mirror_top_refresh_filename, - .bdrv_close =3D bdrv_mirror_top_close, .bdrv_child_perm =3D bdrv_mirror_top_child_perm, }; =20 diff --git a/block/null.c b/block/null.c index 5d610fdfba..d442d3e901 100644 --- a/block/null.c +++ b/block/null.c @@ -97,10 +97,6 @@ static int null_file_open(BlockDriverState *bs, QDict *o= ptions, int flags, return ret; } =20 -static void null_close(BlockDriverState *bs) -{ -} - static int64_t null_getlength(BlockDriverState *bs) { BDRVNullState *s =3D bs->opaque; @@ -263,7 +259,6 @@ static BlockDriver bdrv_null_co =3D { =20 .bdrv_file_open =3D null_file_open, .bdrv_parse_filename =3D null_co_parse_filename, - .bdrv_close =3D null_close, .bdrv_getlength =3D null_getlength, =20 .bdrv_co_preadv =3D null_co_preadv, @@ -283,7 +278,6 @@ static BlockDriver bdrv_null_aio =3D { =20 .bdrv_file_open =3D null_file_open, .bdrv_parse_filename =3D null_aio_parse_filename, - .bdrv_close =3D null_close, .bdrv_getlength =3D null_getlength, =20 .bdrv_aio_preadv =3D null_aio_preadv, diff --git a/block/raw-format.c b/block/raw-format.c index 2fd69cdb08..6f6dc99b2c 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -459,10 +459,6 @@ static int raw_open(BlockDriverState *bs, QDict *optio= ns, int flags, return 0; } =20 -static void raw_close(BlockDriverState *bs) -{ -} - static int raw_probe(const uint8_t *buf, int buf_size, const char *filenam= e) { /* smallest possible positive score so that raw is used if and only if= no @@ -543,7 +539,6 @@ BlockDriver bdrv_raw =3D { .bdrv_reopen_commit =3D &raw_reopen_commit, .bdrv_reopen_abort =3D &raw_reopen_abort, .bdrv_open =3D &raw_open, - .bdrv_close =3D &raw_close, .bdrv_child_perm =3D bdrv_filter_default_perms, .bdrv_co_create_opts =3D &raw_co_create_opts, .bdrv_co_preadv =3D &raw_co_preadv, --=20 2.13.6