All of lore.kernel.org
 help / color / mirror / Atom feed
From: sthemmin@exchange.microsoft.com
To: unlisted-recipients:; (no To-header on input)
Cc: netdev@vger.kernel.org, Stephen Hemminger <sthemmin@microsoft.com>
Subject: [PATCH 11/14] hv_netvsc: make netvsc_destroy_buf void
Date: Tue, 23 Aug 2016 12:29:43 -0700	[thread overview]
Message-ID: <1471980586-18263-12-git-send-email-sthemmin@exchange.microsoft.com> (raw)
In-Reply-To: <1471980586-18263-1-git-send-email-sthemmin@exchange.microsoft.com>

From: Stephen Hemminger <sthemmin@microsoft.com>

No caller checks the return value.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/hyperv/netvsc.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 830aae2..471c476 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -206,12 +206,12 @@ get_in_err:
 	return net_device;
 }
 
-static int netvsc_destroy_buf(struct hv_device *device)
+static void netvsc_destroy_buf(struct hv_device *device)
 {
 	struct nvsp_message *revoke_packet;
-	int ret = 0;
 	struct net_device *ndev = hv_get_drvdata(device);
 	struct netvsc_device *net_device = net_device_to_netvsc_device(ndev);
+	int ret;
 
 	/*
 	 * If we got a section count, it means we received a
@@ -241,7 +241,7 @@ static int netvsc_destroy_buf(struct hv_device *device)
 		if (ret != 0) {
 			netdev_err(ndev, "unable to send "
 				"revoke receive buffer to netvsp\n");
-			return ret;
+			return;
 		}
 	}
 
@@ -256,7 +256,7 @@ static int netvsc_destroy_buf(struct hv_device *device)
 		if (ret != 0) {
 			netdev_err(ndev,
 				   "unable to teardown receive buffer's gpadl\n");
-			return ret;
+			return;
 		}
 		net_device->recv_buf_gpadl_handle = 0;
 	}
@@ -300,7 +300,7 @@ static int netvsc_destroy_buf(struct hv_device *device)
 		if (ret != 0) {
 			netdev_err(ndev, "unable to send "
 				   "revoke send buffer to netvsp\n");
-			return ret;
+			return;
 		}
 	}
 	/* Teardown the gpadl on the vsp end */
@@ -314,7 +314,7 @@ static int netvsc_destroy_buf(struct hv_device *device)
 		if (ret != 0) {
 			netdev_err(ndev,
 				   "unable to teardown send buffer's gpadl\n");
-			return ret;
+			return;
 		}
 		net_device->send_buf_gpadl_handle = 0;
 	}
@@ -324,8 +324,6 @@ static int netvsc_destroy_buf(struct hv_device *device)
 		net_device->send_buf = NULL;
 	}
 	kfree(net_device->send_section_map);
-
-	return ret;
 }
 
 static int netvsc_init_buf(struct hv_device *device)
-- 
1.7.4.1

  parent reply	other threads:[~2016-08-23 17:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 19:29 [PATCH net-next 00/14] hv_netvsc: cleanups sthemmin
2016-08-23 19:05 ` David Miller
2016-08-23 19:29 ` [PATCH 01/14] hv_netvsc: fix rtnl locking in callback sthemmin
2016-08-23 19:29 ` [PATCH 02/14] hv_netvsc: make RSS hash key static sthemmin
2016-08-23 19:29 ` [PATCH 03/14] hv_netvsc: use kcalloc sthemmin
2016-08-23 19:29 ` [PATCH 04/14] hv_netvsc: style cleanups sthemmin
2016-08-23 19:29 ` [PATCH 05/14] hv_netvsc: make inline functions static sthemmin
2016-08-23 19:29 ` [PATCH 06/14] hv_netvsc: use ARRAY_SIZE() for NDIS versions sthemmin
2016-08-23 19:29 ` [PATCH 07/14] hv_netvsc: make device_remove void sthemmin
2016-08-23 19:29 ` [PATCH 08/14] hv_netvsc: init completion during alloc sthemmin
2016-08-23 19:29 ` [PATCH 09/14] hv_netvsc: rearrange start_xmit sthemmin
2016-08-23 19:29 ` [PATCH 10/14] hv_netvsc: refactor completion function sthemmin
2016-08-23 19:29 ` sthemmin [this message]
2016-08-23 19:29 ` [PATCH 12/14] hv_netvsc: make variable local sthemmin
2016-08-23 19:29 ` [PATCH 13/14] hv_netvsc: report vmbus name in ethtool sthemmin
2016-08-23 19:29 ` [PATCH 14/14] hv_netvsc: add ethtool statistics for tx packet issues sthemmin
  -- strict thread matches above, loose matches on Subject: below --
2016-08-23 19:17 [PATCH 01/14] hv_netvsc: fix rtnl locking in callback sthemmin
2016-08-23 19:17 ` [PATCH 11/14] hv_netvsc: make netvsc_destroy_buf void sthemmin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471980586-18263-12-git-send-email-sthemmin@exchange.microsoft.com \
    --to=sthemmin@exchange.microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.