RE: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-08 Thread David Laight
From: David Miller > Sent: 05 October 2018 22:24 > > From: Ben Dooks > Date: Tue, 2 Oct 2018 17:56:02 +0100 > > > - memcpy(skb->data, &tx_cmd_a, 4); > > + ptr = skb_push(skb, 8); > > + tx_cmd_a = cpu_to_le32(tx_cmd_a); > > + tx_cmd_b = cpu_to_le32(tx_cmd_b); > > + memcpy(ptr, &tx_cmd_

Re: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-06 Thread David Miller
From: Ben Dooks Date: Sat, 06 Oct 2018 12:27:27 +0100 > Thanks, got a new version of the series just being tested with this. > Should it go into the original, or as a separate change? Into the original.

Re: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-06 Thread Ben Dooks
On 2018-10-05 22:24, David Miller wrote: From: Ben Dooks Date: Tue, 2 Oct 2018 17:56:02 +0100 - memcpy(skb->data, &tx_cmd_a, 4); + ptr = skb_push(skb, 8); + tx_cmd_a = cpu_to_le32(tx_cmd_a); + tx_cmd_b = cpu_to_le32(tx_cmd_b); + memcpy(ptr, &tx_cmd_a, 4); +

Re: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-05 Thread David Miller
From: Ben Dooks Date: Tue, 2 Oct 2018 17:56:02 +0100 > - memcpy(skb->data, &tx_cmd_a, 4); > + ptr = skb_push(skb, 8); > + tx_cmd_a = cpu_to_le32(tx_cmd_a); > + tx_cmd_b = cpu_to_le32(tx_cmd_b); > + memcpy(ptr, &tx_cmd_a, 4); > + memcpy(ptr+4, &tx_cmd_b, 4); Even a memcpy

RE: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-03 Thread Ben Dooks
On 2018-10-03 14:36, David Laight wrote: From: Ben Dooks Sent: 02 October 2018 17:56 The smsc95xx_tx_fixup is doing multiple calls to skb_push() to put an 8-byte command header onto the packet. It would be easier to do one skb_push() and then copy the data in once the push is done. Signed-off-

RE: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-03 Thread David Laight
From: Ben Dooks > Sent: 02 October 2018 17:56 > > The smsc95xx_tx_fixup is doing multiple calls to skb_push() to > put an 8-byte command header onto the packet. It would be easier > to do one skb_push() and then copy the data in once the push is > done. > > Signed-off-by: Ben Dooks > --- > driv