From 10e5d70787b0bcb8c4449ee2fa6a0154d4138186 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 3 Feb 2023 16:21:40 +0100 Subject: [PATCH] block: Make bdrv_can_set_read_only() static It is never called outside of block.c. Signed-off-by: Kevin Wolf Message-Id: <20230203152202.49054-2-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- block.c | 4 ++-- include/block/block-io.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 0c807d15cd..31f13092cb 100644 --- a/block.c +++ b/block.c @@ -277,8 +277,8 @@ bool bdrv_is_read_only(BlockDriverState *bs) return !(bs->open_flags & BDRV_O_RDWR); } -int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only, - bool ignore_allow_rdw, Error **errp) +static int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only, + bool ignore_allow_rdw, Error **errp) { IO_CODE(); diff --git a/include/block/block-io.h b/include/block/block-io.h index 614cbd7eda..f9fa88204d 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -134,8 +134,6 @@ int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base, int coroutine_fn bdrv_co_is_zero_fast(BlockDriverState *bs, int64_t offset, int64_t bytes); -int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only, - bool ignore_allow_rdw, Error **errp); int bdrv_apply_auto_read_only(BlockDriverState *bs, const char *errmsg, Error **errp); bool bdrv_is_read_only(BlockDriverState *bs); -- 2.30.2