Remove various unused functions
PATCH 1/1 Remove various unused functions
The functions tpm_backend_thread_tpm_reset() and iothread_find() are completely unused, let's remove them.
Signed-off-by Thomas Huth <[email protected]>
--- backends/tpm.c | 11 ----------- include/sysemu/iothread.h | 1 - include/sysemu/tpm_backend_int.h | 2 -- iothread.c | 12 ------------ 4 files changed, 26 deletions(-)
backends/tpm.c +0 -11
@@ -165,17 +165,6 @@ void tpm_backend_thread_end(TPMBackendThread *tbt) } } -void tpm_backend_thread_tpm_reset (TPMBackendThread *tbt, -GFunc func,gpointer user_data) -{ -if (!tbt->pool) { -tpm_backend_thread_create (tbt, func, user_data); - }else { -g_thread_pool_push (tbt->pool, (gpointer )TPM_BACKEND_CMD_TPM_RESET , -NULL ); - } -} -static const TypeInfo tpm_backend_info = { .name =TYPE_TPM_BACKEND , .parent =TYPE_OBJECT ,
include/sysemu/iothread.h +0 -1
@@ -33,7 +33,6 @@ typedef struct {#define IOTHREAD (obj) \ OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD) -IOThread *iothread_find (const char *id);char *iothread_get_id (IOThread *iothread);AioContext *iothread_get_aio_context (IOThread *iothread);
include/sysemu/tpm_backend_int.h +0 -2
@@ -32,8 +32,6 @@ void tpm_backend_thread_deliver_request(TPMBackendThread *tbt);void tpm_backend_thread_create (TPMBackendThread *tbt,GFunc func,gpointer user_data);void tpm_backend_thread_end (TPMBackendThread *tbt); -void tpm_backend_thread_tpm_reset (TPMBackendThread *tbt, -GFunc func,gpointer user_data); typedef enum TPMBackendCmd { TPM_BACKEND_CMD_INIT = 1,
iothread.c +0 -12
@@ -114,18 +114,6 @@ static void iothread_register_types(void)type_init (iothread_register_types) -IOThread *iothread_find(const char *id) -{ -Object *container =container_get (object_get_root (),IOTHREADS_PATH ); -Object *child; - - child =object_property_get_link (container, id,NULL ); -if (!child) { -return NULL ; - } -return (IOThread *)object_dynamic_cast (child,TYPE_IOTHREAD ); -} - char *iothread_get_id(IOThread *iothread) {return object_get_canonical_path_component (OBJECT (iothread));
Signature · 1 line
1.9.1
Michael Tokarev
AppliedApplied to -trivial, thank you!
/mjt
Quoted 11 lines · Thomas Huth
The functions
tpm_backend_thread_tpm_reset()andiothread_find()are completely unused, let's remove them.Signed-off-by Thomas Huth <[email protected]>--- backends/tpm.c | 11 ----------- include/sysemu/iothread.h | 1 - include/sysemu/tpm_backend_int.h | 2 -- iothread.c | 12 ------------ 4 files changed, 26 deletions(-)
Happy with iothread change, we can always bring it back later if needed.
Reviewed-by Stefan Hajnoczi <[email protected]>