aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2012-10-02 01:30:22 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-02 14:39:30 -0400
commit6562640bd3b368a7ffb1caa61c82abe6e9d54b3b (patch)
tree3add1f3f656ec7505abd84aaea3355c4c22b60bd
parent99e3fcfa34e7ea6dbb44fe5df51b79ccb6f73d3d (diff)
hyperv: Remove extra allocated space for recv_pkt_list elements
The receive code path doesn't use the page buffer, so remove the extra allocated space here. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hyperv/hyperv_net.h2
-rw-r--r--drivers/net/hyperv/netvsc.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 95ceb3593043..d58f28c46386 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -465,8 +465,6 @@ struct nvsp_message {
465 465
466#define NETVSC_RECEIVE_BUFFER_ID 0xcafe 466#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
467 467
468#define NETVSC_RECEIVE_SG_COUNT 1
469
470/* Preallocated receive packets */ 468/* Preallocated receive packets */
471#define NETVSC_RECEIVE_PACKETLIST_COUNT 256 469#define NETVSC_RECEIVE_PACKETLIST_COUNT 256
472 470
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 4a1a5f58fa73..d9c4c0399c88 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -904,9 +904,7 @@ int netvsc_device_add(struct hv_device *device, void *additional_info)
904 INIT_LIST_HEAD(&net_device->recv_pkt_list); 904 INIT_LIST_HEAD(&net_device->recv_pkt_list);
905 905
906 for (i = 0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) { 906 for (i = 0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) {
907 packet = kzalloc(sizeof(struct hv_netvsc_packet) + 907 packet = kzalloc(sizeof(struct hv_netvsc_packet), GFP_KERNEL);
908 (NETVSC_RECEIVE_SG_COUNT *
909 sizeof(struct hv_page_buffer)), GFP_KERNEL);
910 if (!packet) 908 if (!packet)
911 break; 909 break;
912 910