Commit 26a11262 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

hv_netvsc: copy_to_send buf can be void

Since only caller does not care about return value.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 824c2d67
...@@ -701,7 +701,7 @@ static u32 netvsc_get_next_send_section(struct netvsc_device *net_device) ...@@ -701,7 +701,7 @@ static u32 netvsc_get_next_send_section(struct netvsc_device *net_device)
return NETVSC_INVALID_INDEX; return NETVSC_INVALID_INDEX;
} }
static u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device, static void netvsc_copy_to_send_buf(struct netvsc_device *net_device,
unsigned int section_index, unsigned int section_index,
u32 pend_size, u32 pend_size,
struct hv_netvsc_packet *packet, struct hv_netvsc_packet *packet,
...@@ -713,7 +713,6 @@ static u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device, ...@@ -713,7 +713,6 @@ static u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device,
char *dest = start + (section_index * net_device->send_section_size) char *dest = start + (section_index * net_device->send_section_size)
+ pend_size; + pend_size;
int i; int i;
u32 msg_size = 0;
u32 padding = 0; u32 padding = 0;
u32 page_count = packet->cp_partial ? packet->rmsg_pgcnt : u32 page_count = packet->cp_partial ? packet->rmsg_pgcnt :
packet->page_buf_cnt; packet->page_buf_cnt;
...@@ -733,16 +732,11 @@ static u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device, ...@@ -733,16 +732,11 @@ static u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device,
u32 len = pb[i].len; u32 len = pb[i].len;
memcpy(dest, (src + offset), len); memcpy(dest, (src + offset), len);
msg_size += len;
dest += len; dest += len;
} }
if (padding) { if (padding)
memset(dest, 0, padding); memset(dest, 0, padding);
msg_size += padding;
}
return msg_size;
} }
static inline int netvsc_send_pkt( static inline int netvsc_send_pkt(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment