aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/netcp_core.c
diff options
context:
space:
mode:
authorKaricheri, Muralidharan <m-karicheri2@ti.com>2017-01-06 15:37:40 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-07 21:03:50 -0500
commitaa255101f7e92b621736856386f87f7b418874a6 (patch)
tree53f865b09a25f227df5e17d82a5b4c90f1c855b9 /drivers/net/ethernet/ti/netcp_core.c
parentnet: netcp: extract eflag from desc for rx_hook handling (diff)
downloadlinux-dev-aa255101f7e92b621736856386f87f7b418874a6.tar.xz
linux-dev-aa255101f7e92b621736856386f87f7b418874a6.zip
net: netcp: remove the redundant memmov()
The psdata is populated with command data by netcp modules to the tail of the buffer and set_words() copy the same to the front of the psdata. So remove the redundant memmov function call. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/netcp_core.c')
-rw-r--r--drivers/net/ethernet/ti/netcp_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
index a136c56e0aff..286fd8da3b67 100644
--- a/drivers/net/ethernet/ti/netcp_core.c
+++ b/drivers/net/ethernet/ti/netcp_core.c
@@ -1226,9 +1226,9 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp,
/* psdata points to both native-endian and device-endian data */
__le32 *psdata = (void __force *)p_info.psdata;
- memmove(p_info.psdata, p_info.psdata + p_info.psdata_len,
- p_info.psdata_len);
- set_words(p_info.psdata, p_info.psdata_len, psdata);
+ set_words((u32 *)psdata +
+ (KNAV_DMA_NUM_PS_WORDS - p_info.psdata_len),
+ p_info.psdata_len, psdata);
tmp |= (p_info.psdata_len & KNAV_DMA_DESC_PSLEN_MASK) <<
KNAV_DMA_DESC_PSLEN_SHIFT;
}