]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Drivers: hv: vmbus: Cleanup vmbus_set_event()
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 21 Dec 2015 23:12:20 +0000 (15:12 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:28:57 +0000 (10:28 +0100)
BugLink: http://bugs.launchpad.net/bugs/1541585
Cleanup vmbus_set_event() by inlining the hypercall to post
the event and since the return value of vmbus_set_event() is not checked,
make it void. As part of this cleanup, get rid of the function
hv_signal_event() as it is only callled from vmbus_set_event().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1b807e1011af46a595ba46c75ad5e20ad7177af7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/hv/connection.c
drivers/hv/hv.c
drivers/hv/hyperv_vmbus.h

index 8b9de80c4209b3c7352491bf6ace437099185cb0..1701e48e7c9ca77a93ada1248dd8f0b35d7f9a7b 100644 (file)
@@ -482,7 +482,7 @@ int vmbus_post_msg(void *buffer, size_t buflen)
 /*
  * vmbus_set_event - Send an event notification to the parent
  */
-int vmbus_set_event(struct vmbus_channel *channel)
+void vmbus_set_event(struct vmbus_channel *channel)
 {
        u32 child_relid = channel->offermsg.child_relid;
 
@@ -493,5 +493,5 @@ int vmbus_set_event(struct vmbus_channel *channel)
                        (child_relid >> 5));
        }
 
-       return hv_signal_event(channel->sig_event);
+       hv_do_hypercall(HVCALL_SIGNAL_EVENT, channel->sig_event, NULL);
 }
index 7c0716fa2cdf771f6012a007da624f73d3b64016..57a42409f6d6f9192867e018bd1e16c093ed01e9 100644 (file)
@@ -347,22 +347,6 @@ int hv_post_message(union hv_connection_id connection_id,
        return status & 0xFFFF;
 }
 
-
-/*
- * hv_signal_event -
- * Signal an event on the specified connection using the hypervisor event IPC.
- *
- * This involves a hypercall.
- */
-int hv_signal_event(void *con_id)
-{
-       u64 status;
-
-       status = hv_do_hypercall(HVCALL_SIGNAL_EVENT, con_id, NULL);
-
-       return status & 0xFFFF;
-}
-
 static int hv_ce_set_next_event(unsigned long delta,
                                struct clock_event_device *evt)
 {
index d78a0247a4f1f34ca73fd9aa769166b45f341fe9..cb41826bb4ce6b335e19befec7ba8254eee311d1 100644 (file)
@@ -502,8 +502,6 @@ extern int hv_post_message(union hv_connection_id connection_id,
                         enum hv_message_type message_type,
                         void *payload, size_t payload_size);
 
-extern int hv_signal_event(void *con_id);
-
 extern int hv_synic_alloc(void);
 
 extern void hv_synic_free(void);
@@ -651,7 +649,7 @@ void vmbus_disconnect(void);
 
 int vmbus_post_msg(void *buffer, size_t buflen);
 
-int vmbus_set_event(struct vmbus_channel *channel);
+void vmbus_set_event(struct vmbus_channel *channel);
 
 void vmbus_on_event(unsigned long data);
 void vmbus_on_msg_dpc(unsigned long data);