Drivers: hv: vmbus: Cleanup vmbus_set_event()
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 21 Dec 2015 23:12:20 +0000 (15:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 05:32:57 +0000 (21:32 -0800)
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>
drivers/hv/connection.c
drivers/hv/hv.c
drivers/hv/hyperv_vmbus.h

index 3dc5a9c7fad6edda9fcaac0ecda2a24ca96822c5..4a320e60641ae2a1abe0205f6cfff28ded11c26d 100644 (file)
@@ -474,7 +474,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;
 
@@ -485,5 +485,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 11bca51ef5ff9ea9a522c2f1a9bf9c5a682bb2cd..1c677d0f16d61e486da4412d06eea7b2a439998e 100644 (file)
@@ -337,22 +337,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 4ebc796b4f33b83a5e6918c227d8c1bd437ed80e..ac7aa303c37d2e590f2d8082895d031c5489c879 100644 (file)
@@ -501,8 +501,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);
@@ -650,7 +648,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);