[PATCH 46/64] Staging: hv: netvsc_drv: Get rid of unnecessary state in struct netvsc_driver

K. Y. Srinivasan kys at microsoft.com
Fri May 13 02:34:59 UTC 2011


Since the function pointers in struct netvsc_driver are no longer used
(as these are invoked directly), get rid of this unused state.

Signed-off-by: K. Y. Srinivasan <kys at microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at microsoft.com>
---
 drivers/staging/hv/hyperv_net.h   |   11 -----------
 drivers/staging/hv/netvsc.c       |    3 ---
 drivers/staging/hv/netvsc_drv.c   |    2 --
 drivers/staging/hv/rndis_filter.c |   10 ----------
 4 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/hv/hyperv_net.h b/drivers/staging/hv/hyperv_net.h
index 820008e..03f37da 100644
--- a/drivers/staging/hv/hyperv_net.h
+++ b/drivers/staging/hv/hyperv_net.h
@@ -90,17 +90,6 @@ struct netvsc_driver {
 	u32 ring_buf_size;
 	u32 req_ext_size;
 
-	/*
-	 * This is set by the caller to allow us to callback when we
-	 * receive a packet from the "wire"
-	 */
-	int (*recv_cb)(struct hv_device *dev,
-				 struct hv_netvsc_packet *packet);
-	void (*link_status_change)(struct hv_device *dev, u32 status);
-
-	/* Specific to this driver */
-	int (*send)(struct hv_device *dev, struct hv_netvsc_packet *packet);
-
 };
 
 static inline
diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c
index 85e7ea6..6ab5b77 100644
--- a/drivers/staging/hv/netvsc.c
+++ b/drivers/staging/hv/netvsc.c
@@ -1174,9 +1174,6 @@ int netvsc_initialize(struct hv_driver *drv)
 	drv->name = driver_name;
 	memcpy(&drv->dev_type, &netvsc_device_type, sizeof(struct hv_guid));
 
-
-	driver->send			= netvsc_send;
-
 	rndis_filter_init(driver);
 	return 0;
 }
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 01812bd..cade6e6 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -446,8 +446,6 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
 	int ret;
 
 	net_drv_obj->ring_buf_size = ring_size * PAGE_SIZE;
-	net_drv_obj->recv_cb = netvsc_recv_callback;
-	net_drv_obj->link_status_change = netvsc_linkstatus_callback;
 
 	/* Callback to client driver to complete the initialization */
 	drv_init(&net_drv_obj->base);
diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c
index 9a6c064..ca922d8 100644
--- a/drivers/staging/hv/rndis_filter.c
+++ b/drivers/staging/hv/rndis_filter.c
@@ -596,16 +596,6 @@ int rndis_filter_init(struct netvsc_driver *drv)
 	ASSERT(Driver->OnLinkStatusChanged);
 	rndisDriver->OnLinkStatusChanged = Driver->OnLinkStatusChanged;*/
 
-	/* Save the original dispatch handlers before we override it */
-	rndis_filter.inner_drv.send = drv->send;
-	rndis_filter.inner_drv.recv_cb = drv->recv_cb;
-	rndis_filter.inner_drv.link_status_change =
-					drv->link_status_change;
-
-	/* Override */
-	drv->send = rndis_filter_send;
-	drv->recv_cb = rndis_filter_receive;
-
 	return 0;
 }
 
-- 
1.7.4.1




More information about the devel mailing list