Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

misc: vmw_vmci: Remove unused vmci_ctx functions

vmci_ctx_dbell_destroy_all() and vmci_ctx_pending_datagrams()
were added in 2013 by
commit 28d6692cd8fb ("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>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
5bce7d47 17481c41

-56
-54
drivers/misc/vmw_vmci/vmci_context.c
··· 269 269 } 270 270 271 271 /* 272 - * Returns the current number of pending datagrams. The call may 273 - * also serve as a synchronization point for the datagram queue, 274 - * as no enqueue operations can occur concurrently. 275 - */ 276 - int vmci_ctx_pending_datagrams(u32 cid, u32 *pending) 277 - { 278 - struct vmci_ctx *context; 279 - 280 - context = vmci_ctx_get(cid); 281 - if (context == NULL) 282 - return VMCI_ERROR_INVALID_ARGS; 283 - 284 - spin_lock(&context->lock); 285 - if (pending) 286 - *pending = context->pending_datagrams; 287 - spin_unlock(&context->lock); 288 - vmci_ctx_put(context); 289 - 290 - return VMCI_SUCCESS; 291 - } 292 - 293 - /* 294 272 * Queues a VMCI datagram for the appropriate target VM context. 295 273 */ 296 274 int vmci_ctx_enqueue_datagram(u32 cid, struct vmci_datagram *dg) ··· 967 989 968 990 return vmci_handle_is_invalid(removed_handle) ? 969 991 VMCI_ERROR_NOT_FOUND : VMCI_SUCCESS; 970 - } 971 - 972 - /* 973 - * Unregisters all doorbell handles that were previously 974 - * registered with vmci_ctx_dbell_create. 975 - */ 976 - int vmci_ctx_dbell_destroy_all(u32 context_id) 977 - { 978 - struct vmci_ctx *context; 979 - struct vmci_handle handle; 980 - 981 - if (context_id == VMCI_INVALID_ID) 982 - return VMCI_ERROR_INVALID_ARGS; 983 - 984 - context = vmci_ctx_get(context_id); 985 - if (context == NULL) 986 - return VMCI_ERROR_NOT_FOUND; 987 - 988 - spin_lock(&context->lock); 989 - do { 990 - struct vmci_handle_arr *arr = context->doorbell_array; 991 - handle = vmci_handle_arr_remove_tail(arr); 992 - } while (!vmci_handle_is_invalid(handle)); 993 - do { 994 - struct vmci_handle_arr *arr = context->pending_doorbell_array; 995 - handle = vmci_handle_arr_remove_tail(arr); 996 - } while (!vmci_handle_is_invalid(handle)); 997 - spin_unlock(&context->lock); 998 - 999 - vmci_ctx_put(context); 1000 - 1001 - return VMCI_SUCCESS; 1002 992 } 1003 993 1004 994 /*
-2
drivers/misc/vmw_vmci/vmci_context.h
··· 132 132 int vmci_ctx_enqueue_datagram(u32 cid, struct vmci_datagram *dg); 133 133 int vmci_ctx_dequeue_datagram(struct vmci_ctx *context, 134 134 size_t *max_size, struct vmci_datagram **dg); 135 - int vmci_ctx_pending_datagrams(u32 cid, u32 *pending); 136 135 struct vmci_ctx *vmci_ctx_get(u32 cid); 137 136 void vmci_ctx_put(struct vmci_ctx *context); 138 137 bool vmci_ctx_exists(u32 cid); ··· 152 153 153 154 int vmci_ctx_dbell_create(u32 context_id, struct vmci_handle handle); 154 155 int vmci_ctx_dbell_destroy(u32 context_id, struct vmci_handle handle); 155 - int vmci_ctx_dbell_destroy_all(u32 context_id); 156 156 int vmci_ctx_notify_dbell(u32 cid, struct vmci_handle handle, 157 157 u32 src_priv_flags); 158 158