projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5864118
)
ax88179_178a: Merge memcpy + le32_to_cpus to get_unaligned_le32
author
Chuhong Yuan
<hslester96@gmail.com>
Fri, 19 Jul 2019 09:07:15 +0000
(17:07 +0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 22 Jul 2019 19:12:58 +0000
(12:12 -0700)
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>
drivers/net/usb/ax88179_178a.c
patch
|
blob
|
history
diff --git
a/drivers/net/usb/ax88179_178a.c
b/drivers/net/usb/ax88179_178a.c
index 0bc457ba8574a79838bcbc2ecb29bb611ac5cfb3..72d165114b674fdc8629e8f7d00af80cde67dca9 100644
(file)
--- 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);