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

misc: vmw_vmci: Remove unused vmci_doorbell_notify

vmci_doorbell_notify() was added in 2013 by
commit 83e2ec765be0 ("VMCI: doorbell implementation.")

but has remained unused.

Remove it.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250614010344.636076-3-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
2ce80bc1 5bce7d47

-54
-53
drivers/misc/vmw_vmci/vmci_doorbell.c
··· 258 258 } 259 259 260 260 /* 261 - * Notify another guest or the host. We send a datagram down to the 262 - * host via the hypervisor with the notification info. 263 - */ 264 - static int dbell_notify_as_guest(struct vmci_handle handle, u32 priv_flags) 265 - { 266 - struct vmci_doorbell_notify_msg notify_msg; 267 - 268 - notify_msg.hdr.dst = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID, 269 - VMCI_DOORBELL_NOTIFY); 270 - notify_msg.hdr.src = VMCI_ANON_SRC_HANDLE; 271 - notify_msg.hdr.payload_size = sizeof(notify_msg) - VMCI_DG_HEADERSIZE; 272 - notify_msg.handle = handle; 273 - 274 - return vmci_send_datagram(&notify_msg.hdr); 275 - } 276 - 277 - /* 278 261 * Calls the specified callback in a delayed context. 279 262 */ 280 263 static void dbell_delayed_dispatch(struct work_struct *work) ··· 549 566 return VMCI_SUCCESS; 550 567 } 551 568 EXPORT_SYMBOL_GPL(vmci_doorbell_destroy); 552 - 553 - /* 554 - * vmci_doorbell_notify() - Ring the doorbell (and hide in the bushes). 555 - * @dst: The handlle identifying the doorbell resource 556 - * @priv_flags: Priviledge flags. 557 - * 558 - * Generates a notification on the doorbell identified by the 559 - * handle. For host side generation of notifications, the caller 560 - * can specify what the privilege of the calling side is. 561 - */ 562 - int vmci_doorbell_notify(struct vmci_handle dst, u32 priv_flags) 563 - { 564 - int retval; 565 - enum vmci_route route; 566 - struct vmci_handle src; 567 - 568 - if (vmci_handle_is_invalid(dst) || 569 - (priv_flags & ~VMCI_PRIVILEGE_ALL_FLAGS)) 570 - return VMCI_ERROR_INVALID_ARGS; 571 - 572 - src = VMCI_INVALID_HANDLE; 573 - retval = vmci_route(&src, &dst, false, &route); 574 - if (retval < VMCI_SUCCESS) 575 - return retval; 576 - 577 - if (VMCI_ROUTE_AS_HOST == route) 578 - return vmci_ctx_notify_dbell(VMCI_HOST_CONTEXT_ID, 579 - dst, priv_flags); 580 - 581 - if (VMCI_ROUTE_AS_GUEST == route) 582 - return dbell_notify_as_guest(dst, priv_flags); 583 - 584 - pr_warn("Unknown route (%d) for doorbell\n", route); 585 - return VMCI_ERROR_DST_UNREACHABLE; 586 - } 587 - EXPORT_SYMBOL_GPL(vmci_doorbell_notify);
-1
include/linux/vmw_vmci_api.h
··· 35 35 u32 priv_flags, 36 36 vmci_callback notify_cb, void *client_data); 37 37 int vmci_doorbell_destroy(struct vmci_handle handle); 38 - int vmci_doorbell_notify(struct vmci_handle handle, u32 priv_flags); 39 38 u32 vmci_get_context_id(void); 40 39 bool vmci_is_context_owner(u32 context_id, kuid_t uid); 41 40 int vmci_register_vsock_callback(vmci_vsock_cb callback);