Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1553094

[net-next v1 2/8] net: netcp: remove the redundant memmov()

From Murali Karicheri <m-karicheri2@ti.com>
Newsgroups linux.kernel
Subject [net-next v1 2/8] net: netcp: remove the redundant memmov()
Date 2017-01-06 21:40 +0100
Message-ID <sWJsS-75B-33@gated-at.bofh.it> (permalink)
References <sWJsR-75B-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/net/ethernet/ti/netcp_core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
index a136c56..286fd8d 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;
 	}
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[net-next v1 0/8] netcp: enhancements and minor fixes Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:40 +0100
  [net-next v1 7/8] net: netcp: ale: use ale_status to size the ale table Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:40 +0100
  [net-next v1 1/8] net: netcp: extract eflag from desc for rx_hook handling Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:40 +0100
  [net-next v1 2/8] net: netcp: remove the redundant memmov() Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:40 +0100
  [net-next v1 5/8] net: netcp: use hw capability to remove FCS word from rx packets Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:50 +0100
  [net-next v1 3/8] net: netcp: store network statistics in 64 bits Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:50 +0100
  [net-next v1 6/8] net: netcp: ale: update to support unknown vlan controls for NU switch Murali Karicheri <m-karicheri2@ti.com> - 2017-01-06 21:50 +0100
  Re: [net-next v1 0/8] netcp: enhancements and minor fixes David Miller <davem@davemloft.net> - 2017-01-08 03:10 +0100

csiph-web