diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-19 12:07:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-22 22:12:58 +0300 |
commit | d1854d509d61d36af44f2130423bff8836e1592e (patch) | |
tree | 0464d3e8f6baa0a39939b2170cf32eac098970ed /drivers/net/usb/ax88179_178a.c | |
parent | 5864118b6a442ac947207489193319489911e7b3 (diff) | |
download | linux-d1854d509d61d36af44f2130423bff8836e1592e.tar.xz |
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>
Diffstat (limited to 'drivers/net/usb/ax88179_178a.c')
-rw-r--r-- | drivers/net/usb/ax88179_178a.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index 0bc457ba8574..72d165114b67 100644 --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -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); |