mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-12 01:18:02 +07:00
usbip: simplify port status saving
Use memcpy() function to save port status instead of a handwritten for loop. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4a3ca2bebe
commit
6f480bf9c3
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user