diff mbox series

[v2,4/4] include/sysemu/blockdev.h: remove drive_get_max_devs

Message ID 20211130094633.277982-5-eesposit@redhat.com
State New
Headers show
Series block: minor refactoring in preparation to the block layer API split | expand

Commit Message

Emanuele Giuseppe Esposito Nov. 30, 2021, 9:46 a.m. UTC
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>
---
 blockdev.c                | 17 -----------------
 include/sysemu/blockdev.h |  1 -
 2 files changed, 18 deletions(-)

Comments

Stefan Hajnoczi Dec. 13, 2021, 3:41 p.m. UTC | #1
On Tue, Nov 30, 2021 at 04:46:33AM -0500, Emanuele Giuseppe Esposito wrote:
> 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>
> ---
>  blockdev.c                | 17 -----------------
>  include/sysemu/blockdev.h |  1 -
>  2 files changed, 18 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox series

Patch

diff --git a/blockdev.c b/blockdev.c
index e5cb3eb95f..0112f488a4 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -173,23 +173,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];
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index 21ae0b994a..430abdbdb8 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -49,7 +49,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);
 DriveInfo *drive_get_next(BlockInterfaceType type);
 
 DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type,