Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1592677 > unrolled thread

[PATCH 6/9] hyperv: remove unnecessary return variable

Started bykys@exchange.microsoft.com
First post2017-03-05 02:30 +0100
Last post2017-03-05 02:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 6/9] hyperv: remove unnecessary return variable kys@exchange.microsoft.com - 2017-03-05 02:30 +0100

#1592677 — [PATCH 6/9] hyperv: remove unnecessary return variable

Fromkys@exchange.microsoft.com
Date2017-03-05 02:30 +0100
Subject[PATCH 6/9] hyperv: remove unnecessary return variable
Message-ID<tht9L-Wr-1@gated-at.bofh.it>
From: Stephen Hemminger <stephen@networkplumber.org>

hv_ringbuffer_read cleanup.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/ring_buffer.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
index 52d0556..8a24974 100644
--- a/drivers/hv/ring_buffer.c
+++ b/drivers/hv/ring_buffer.c
@@ -341,13 +341,11 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
 	struct vmpacket_descriptor desc;
 	u32 offset;
 	u32 packetlen;
-	int ret = 0;
 	struct hv_ring_buffer_info *inring_info = &channel->inbound;
 
 	if (buflen <= 0)
 		return -EINVAL;
 
-
 	*buffer_actual_len = 0;
 	*requestid = 0;
 
@@ -358,7 +356,7 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
 		 * No error is set when there is even no header, drivers are
 		 * supposed to analyze buffer_actual_len.
 		 */
-		return ret;
+		return 0;
 	}
 
 	init_cached_read_index(channel);
@@ -403,5 +401,5 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
 
 	hv_signal_on_read(channel);
 
-	return ret;
+	return 0;
 }
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web