mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 22:14:41 +08: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
@ -1366,8 +1366,7 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
return 0;
|
||||
|
||||
skb_trim(skb, skb->len - 4);
|
||||
memcpy(&rx_hdr, skb_tail_pointer(skb), 4);
|
||||
le32_to_cpus(&rx_hdr);
|
||||
rx_hdr = get_unaligned_le32(skb_tail_pointer(skb));
|
||||
|
||||
pkt_cnt = (u16)rx_hdr;
|
||||
hdr_off = (u16)(rx_hdr >> 16);
|
||||
|
Loading…
Reference in New Issue
Block a user