[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/16] include/sysemu/blockdev.h: remove drive_get_max_devs
From: |
Kevin Wolf |
Subject: |
[PULL 03/16] include/sysemu/blockdev.h: remove drive_get_max_devs |
Date: |
Fri, 14 Jan 2022 14:52:13 +0100 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Remove drive_get_max_devs, as it is not used by anyone.
Last use was removed in commit 8f2d75e81d5
("hw: Drop superfluous special checks for orphaned -drive").
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20211215121140.456939-4-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/sysemu/blockdev.h | 1 -
blockdev.c | 17 -----------------
2 files changed, 18 deletions(-)
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index ea35c42f5c..f9fb54d437 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -48,7 +48,6 @@ DriveInfo *drive_get(BlockInterfaceType type, int bus, int
unit);
void drive_check_orphaned(void);
DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
int drive_get_max_bus(BlockInterfaceType type);
-int drive_get_max_devs(BlockInterfaceType type);
QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
const char *optstr);
diff --git a/blockdev.c b/blockdev.c
index 25b3b202e7..8197165bb5 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -168,23 +168,6 @@ void blockdev_auto_del(BlockBackend *blk)
}
}
-/**
- * Returns the current mapping of how many units per bus
- * a particular interface can support.
- *
- * A positive integer indicates n units per bus.
- * 0 implies the mapping has not been established.
- * -1 indicates an invalid BlockInterfaceType was given.
- */
-int drive_get_max_devs(BlockInterfaceType type)
-{
- if (type >= IF_IDE && type < IF_COUNT) {
- return if_max_devs[type];
- }
-
- return -1;
-}
-
static int drive_index_to_bus_id(BlockInterfaceType type, int index)
{
int max_devs = if_max_devs[type];
--
2.31.1
- [PULL 00/16] Block layer patches, Kevin Wolf, 2022/01/14
- [PULL 02/16] include/sysemu/blockdev.h: remove drive_mark_claimed_by_board and inline drive_def, Kevin Wolf, 2022/01/14
- [PULL 01/16] block_int: make bdrv_backing_overridden static, Kevin Wolf, 2022/01/14
- [PULL 04/16] softmmu: fix device deletion events with -device JSON syntax, Kevin Wolf, 2022/01/14
- [PULL 03/16] include/sysemu/blockdev.h: remove drive_get_max_devs,
Kevin Wolf <=
- [PULL 06/16] qemu-storage-daemon: Add vhost-user-blk help, Kevin Wolf, 2022/01/14
- [PULL 05/16] docs: Correct 'vhost-user-blk' spelling, Kevin Wolf, 2022/01/14
- [PULL 08/16] block-backend: prevent dangling BDS pointers across aio_poll(), Kevin Wolf, 2022/01/14
- [PULL 07/16] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER, Kevin Wolf, 2022/01/14
- [PULL 10/16] iotests/308: Fix for CAP_DAC_OVERRIDE, Kevin Wolf, 2022/01/14
- [PULL 12/16] vvfat: Fix vvfat_write() for writes before the root directory, Kevin Wolf, 2022/01/14
- [PULL 11/16] vvfat: Fix size of temporary qcow file, Kevin Wolf, 2022/01/14
- [PULL 16/16] iotests/testrunner.py: refactor test_field_width, Kevin Wolf, 2022/01/14
- [PULL 09/16] iotests/stream-error-on-reset: New test, Kevin Wolf, 2022/01/14