]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qed: Remove GenericCB
authorKevin Wolf <kwolf@redhat.com>
Fri, 18 Nov 2016 16:16:24 +0000 (17:16 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:14 +0000 (14:51 +0200)
The GenericCB infrastructure isn't used any more. Remove it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
block/Makefile.objs
block/qed-gencb.c [deleted file]
block/qed.h

index ea955302c837abd5ef88bbb6b84bf1efcadd2429..f9368b52b8035419236dc4fe68d58f8e439e7c11 100644 (file)
@@ -1,6 +1,6 @@
 block-obj-y += raw-format.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o dmg.o
 block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
-block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
+block-obj-y += qed.o qed-l2-cache.o qed-table.o qed-cluster.o
 block-obj-y += qed-check.o
 block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o
 block-obj-y += quorum.o
diff --git a/block/qed-gencb.c b/block/qed-gencb.c
deleted file mode 100644 (file)
index faf8ecc..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * QEMU Enhanced Disk Format
- *
- * Copyright IBM, Corp. 2010
- *
- * Authors:
- *  Stefan Hajnoczi   <stefanha@linux.vnet.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#include "qemu/osdep.h"
-#include "qed.h"
-
-void *gencb_alloc(size_t len, BlockCompletionFunc *cb, void *opaque)
-{
-    GenericCB *gencb = g_malloc(len);
-    gencb->cb = cb;
-    gencb->opaque = opaque;
-    return gencb;
-}
-
-void gencb_complete(void *opaque, int ret)
-{
-    GenericCB *gencb = opaque;
-    BlockCompletionFunc *cb = gencb->cb;
-    void *user_opaque = gencb->opaque;
-
-    g_free(gencb);
-    cb(user_opaque, ret);
-}
index 6ab57025e1a54d6199c7de25d89a8c11c40b7936..46843c463b151d7ee710ee903ff0bdfbdb715cfb 100644 (file)
@@ -201,17 +201,6 @@ typedef void QEDFindClusterFunc(void *opaque, int ret, uint64_t offset, size_t l
 void qed_acquire(BDRVQEDState *s);
 void qed_release(BDRVQEDState *s);
 
-/**
- * Generic callback for chaining async callbacks
- */
-typedef struct {
-    BlockCompletionFunc *cb;
-    void *opaque;
-} GenericCB;
-
-void *gencb_alloc(size_t len, BlockCompletionFunc *cb, void *opaque);
-void gencb_complete(void *opaque, int ret);
-
 /**
  * Header functions
  */