提交 6f480bf9 编写于 作者: M Márton Németh 提交者: Greg Kroah-Hartman

usbip: simplify port status saving

Use memcpy() function to save port status instead of
a handwritten for loop.
Signed-off-by: NMárton Németh <nm127@freemail.hu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 4a3ca2be
...@@ -287,9 +287,8 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -287,9 +287,8 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
/* store old status and compare now and old later */ /* store old status and compare now and old later */
if (usbip_dbg_flag_vhci_rh) { if (usbip_dbg_flag_vhci_rh) {
int i = 0; memcpy(prev_port_status, dum->port_status,
for (i = 0; i < VHCI_NPORTS; i++) sizeof(prev_port_status));
prev_port_status[i] = dum->port_status[i];
} }
switch (typeReq) { switch (typeReq) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册