mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
ax88179_178a: Merge memcpy + le32_to_cpus to get_unaligned_le32
Merge the combo use of memcpy and le32_to_cpus. Use get_unaligned_le32 instead. This simplifies the code. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5864118b6a
commit
d1854d509d
1 changed files with 1 additions and 2 deletions
|
@ -1366,8 +1366,7 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
skb_trim(skb, skb->len - 4);
|
skb_trim(skb, skb->len - 4);
|
||||||
memcpy(&rx_hdr, skb_tail_pointer(skb), 4);
|
rx_hdr = get_unaligned_le32(skb_tail_pointer(skb));
|
||||||
le32_to_cpus(&rx_hdr);
|
|
||||||
|
|
||||||
pkt_cnt = (u16)rx_hdr;
|
pkt_cnt = (u16)rx_hdr;
|
||||||
hdr_off = (u16)(rx_hdr >> 16);
|
hdr_off = (u16)(rx_hdr >> 16);
|
||||||
|
|
Loading…
Add table
Reference in a new issue