mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-01 19:34:35 +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;
|
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…
Reference in New Issue
Block a user