mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
misc: vmw_vmci: Remove unused vmci_ctx functions
vmci_ctx_dbell_destroy_all() and vmci_ctx_pending_datagrams()
were added in 2013 by
commit 28d6692cd8 ("VMCI: context implementation.")
but have remained unused.
Remove them.
Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250614010344.636076-2-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
17481c41f5
commit
5bce7d47d5
|
|
@ -268,28 +268,6 @@ static int ctx_fire_notification(u32 context_id, u32 priv_flags)
|
|||
return VMCI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the current number of pending datagrams. The call may
|
||||
* also serve as a synchronization point for the datagram queue,
|
||||
* as no enqueue operations can occur concurrently.
|
||||
*/
|
||||
int vmci_ctx_pending_datagrams(u32 cid, u32 *pending)
|
||||
{
|
||||
struct vmci_ctx *context;
|
||||
|
||||
context = vmci_ctx_get(cid);
|
||||
if (context == NULL)
|
||||
return VMCI_ERROR_INVALID_ARGS;
|
||||
|
||||
spin_lock(&context->lock);
|
||||
if (pending)
|
||||
*pending = context->pending_datagrams;
|
||||
spin_unlock(&context->lock);
|
||||
vmci_ctx_put(context);
|
||||
|
||||
return VMCI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Queues a VMCI datagram for the appropriate target VM context.
|
||||
*/
|
||||
|
|
@ -991,38 +969,6 @@ int vmci_ctx_dbell_destroy(u32 context_id, struct vmci_handle handle)
|
|||
VMCI_ERROR_NOT_FOUND : VMCI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unregisters all doorbell handles that were previously
|
||||
* registered with vmci_ctx_dbell_create.
|
||||
*/
|
||||
int vmci_ctx_dbell_destroy_all(u32 context_id)
|
||||
{
|
||||
struct vmci_ctx *context;
|
||||
struct vmci_handle handle;
|
||||
|
||||
if (context_id == VMCI_INVALID_ID)
|
||||
return VMCI_ERROR_INVALID_ARGS;
|
||||
|
||||
context = vmci_ctx_get(context_id);
|
||||
if (context == NULL)
|
||||
return VMCI_ERROR_NOT_FOUND;
|
||||
|
||||
spin_lock(&context->lock);
|
||||
do {
|
||||
struct vmci_handle_arr *arr = context->doorbell_array;
|
||||
handle = vmci_handle_arr_remove_tail(arr);
|
||||
} while (!vmci_handle_is_invalid(handle));
|
||||
do {
|
||||
struct vmci_handle_arr *arr = context->pending_doorbell_array;
|
||||
handle = vmci_handle_arr_remove_tail(arr);
|
||||
} while (!vmci_handle_is_invalid(handle));
|
||||
spin_unlock(&context->lock);
|
||||
|
||||
vmci_ctx_put(context);
|
||||
|
||||
return VMCI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Registers a notification of a doorbell handle initiated by the
|
||||
* specified source context. The notification of doorbells are
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ bool vmci_ctx_supports_host_qp(struct vmci_ctx *context);
|
|||
int vmci_ctx_enqueue_datagram(u32 cid, struct vmci_datagram *dg);
|
||||
int vmci_ctx_dequeue_datagram(struct vmci_ctx *context,
|
||||
size_t *max_size, struct vmci_datagram **dg);
|
||||
int vmci_ctx_pending_datagrams(u32 cid, u32 *pending);
|
||||
struct vmci_ctx *vmci_ctx_get(u32 cid);
|
||||
void vmci_ctx_put(struct vmci_ctx *context);
|
||||
bool vmci_ctx_exists(u32 cid);
|
||||
|
|
@ -153,7 +152,6 @@ void vmci_ctx_unset_notify(struct vmci_ctx *context);
|
|||
|
||||
int vmci_ctx_dbell_create(u32 context_id, struct vmci_handle handle);
|
||||
int vmci_ctx_dbell_destroy(u32 context_id, struct vmci_handle handle);
|
||||
int vmci_ctx_dbell_destroy_all(u32 context_id);
|
||||
int vmci_ctx_notify_dbell(u32 cid, struct vmci_handle handle,
|
||||
u32 src_priv_flags);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user