From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752099AbbLUViU (ORCPT ); Mon, 21 Dec 2015 16:38:20 -0500 Received: from p3plsmtps2ded02.prod.phx3.secureserver.net ([208.109.80.59]:60597 "EHLO p3plsmtps2ded02.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbbLUViT (ORCPT ); Mon, 21 Dec 2015 16:38:19 -0500 x-originating-ip: 72.167.245.219 From: "K. Y. Srinivasan" To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com Cc: "K. Y. Srinivasan" Subject: [PATCH 1/1] Drivers: hv: vmbus: Cleanup vmbus_set_event() Date: Mon, 21 Dec 2015 15:12:20 -0800 Message-Id: <1450739540-28507-1-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 X-CMAE-Envelope: MS4wfERWfoMbN4fe3TSZTxEH/y4pdEend1UIxXtcQHHW5eMBHM3TaYc+oeXJh9g5hRSe0AAFS3BM9nmwqbKo/8WaF3Fe1LkXDtnSLkNf0pXSpGLt3gFR4d1I l1ohw9NlhO+bgO4zqLVf/7TRmxaAHFHa7TqJS7fU1i0uaqS8fwpj1FnDkQ4FSAEfkvdijjIkVlCUx8Z+9tf/Xvv33orvVsqZ5bIdr54EzP3RzsWKoWbw/zV5 vUNYI/OiRmt/3Dqq8N2sutHyKuhpL1sxArlWDNyILE724Q4p9HQq9fvCbvmGYYN4eI8ZVaQ7p35Wi9onMtfeDl7XfvsPzPBEsCtNI+q6TZR4Ce8cCHDoLbXF ET9Ra/JsnHejBgcdsVpw+pb2bXAkFNE2ItZjAJUdBw2nsRNhN3jSWd9F3lXz76zECx93RGEq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/hv/connection.c | 4 ++-- drivers/hv/hv.c | 16 ---------------- drivers/hv/hyperv_vmbus.h | 4 +--- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 3dc5a9c..4a320e6 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -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); } diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 1db9556..2ed8e16 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -336,22 +336,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) { diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 0411b7b..70540d5 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -587,8 +587,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); @@ -736,7 +734,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); -- 1.7.4.1