]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
misc: vmw_vmci: Remove unused vmci_doorbell_notify
authorDr. David Alan Gilbert <linux@treblig.org>
Sat, 14 Jun 2025 01:03:43 +0000 (02:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jun 2025 15:45:35 +0000 (16:45 +0100)
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>
drivers/misc/vmw_vmci/vmci_doorbell.c
include/linux/vmw_vmci_api.h

index fa8a7fce4481bd84e9ef56c3f4ea9cfb0074497e..53eeb9e6cb5628f5a83e9db34dd3a997bad7f955 100644 (file)
@@ -257,23 +257,6 @@ static int dbell_unlink(struct vmci_handle handle)
        return vmci_send_datagram(&unlink_msg.hdr);
 }
 
-/*
- * Notify another guest or the host.  We send a datagram down to the
- * host via the hypervisor with the notification info.
- */
-static int dbell_notify_as_guest(struct vmci_handle handle, u32 priv_flags)
-{
-       struct vmci_doorbell_notify_msg notify_msg;
-
-       notify_msg.hdr.dst = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
-                                             VMCI_DOORBELL_NOTIFY);
-       notify_msg.hdr.src = VMCI_ANON_SRC_HANDLE;
-       notify_msg.hdr.payload_size = sizeof(notify_msg) - VMCI_DG_HEADERSIZE;
-       notify_msg.handle = handle;
-
-       return vmci_send_datagram(&notify_msg.hdr);
-}
-
 /*
  * Calls the specified callback in a delayed context.
  */
@@ -566,39 +549,3 @@ int vmci_doorbell_destroy(struct vmci_handle handle)
        return VMCI_SUCCESS;
 }
 EXPORT_SYMBOL_GPL(vmci_doorbell_destroy);
-
-/*
- * vmci_doorbell_notify() - Ring the doorbell (and hide in the bushes).
- * @dst:        The handlle identifying the doorbell resource
- * @priv_flags: Priviledge flags.
- *
- * Generates a notification on the doorbell identified by the
- * handle. For host side generation of notifications, the caller
- * can specify what the privilege of the calling side is.
- */
-int vmci_doorbell_notify(struct vmci_handle dst, u32 priv_flags)
-{
-       int retval;
-       enum vmci_route route;
-       struct vmci_handle src;
-
-       if (vmci_handle_is_invalid(dst) ||
-           (priv_flags & ~VMCI_PRIVILEGE_ALL_FLAGS))
-               return VMCI_ERROR_INVALID_ARGS;
-
-       src = VMCI_INVALID_HANDLE;
-       retval = vmci_route(&src, &dst, false, &route);
-       if (retval < VMCI_SUCCESS)
-               return retval;
-
-       if (VMCI_ROUTE_AS_HOST == route)
-               return vmci_ctx_notify_dbell(VMCI_HOST_CONTEXT_ID,
-                                            dst, priv_flags);
-
-       if (VMCI_ROUTE_AS_GUEST == route)
-               return dbell_notify_as_guest(dst, priv_flags);
-
-       pr_warn("Unknown route (%d) for doorbell\n", route);
-       return VMCI_ERROR_DST_UNREACHABLE;
-}
-EXPORT_SYMBOL_GPL(vmci_doorbell_notify);
index f28907345c8086b90f80f201eefc163708489b4b..28a3b6a9e1cafa4ac441e6ec8a91bb7ad1e71f30 100644 (file)
@@ -35,7 +35,6 @@ int vmci_doorbell_create(struct vmci_handle *handle, u32 flags,
                         u32 priv_flags,
                         vmci_callback notify_cb, void *client_data);
 int vmci_doorbell_destroy(struct vmci_handle handle);
-int vmci_doorbell_notify(struct vmci_handle handle, u32 priv_flags);
 u32 vmci_get_context_id(void);
 bool vmci_is_context_owner(u32 context_id, kuid_t uid);
 int vmci_register_vsock_callback(vmci_vsock_cb callback);