* [PATCH 3/3] usbip: simplify port status saving
@ 2011-06-13 21:30 Németh Márton
2011-06-14 6:28 ` Németh Márton
0 siblings, 1 reply; 2+ messages in thread
From: Németh Márton @ 2011-06-13 21:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Matt Mooney, Max Vozeler, Sarah Sharp,
usbip-devel, devel
Cc: LKML
From: Márton Németh <nm127@freemail.hu>
Use memcpy() function to save port status instead of
a handwritten for loop.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
drivers/staging/usbip/vhci_hcd.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index d3ce569..ccb30e1 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -281,9 +281,8 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
/* store old status and compare now and old later */
if (usbip_dbg_flag_vhci_rh) {
- int i = 0;
- for (i = 0; i < VHCI_NPORTS; i++)
- prev_port_status[i] = dum->port_status[i];
+ memcpy(prev_port_status, dum->port_status,
+ sizeof(prev_port_status));
}
switch (typeReq) {
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 3/3] usbip: simplify port status saving
2011-06-13 21:30 [PATCH 3/3] usbip: simplify port status saving Németh Márton
@ 2011-06-14 6:28 ` Németh Márton
0 siblings, 0 replies; 2+ messages in thread
From: Németh Márton @ 2011-06-14 6:28 UTC (permalink / raw)
To: Greg Kroah-Hartman, Matt Mooney, Max Vozeler, Sarah Sharp,
usbip-devel, devel, Joe Perches
Cc: LKML
From: Márton Németh <nm127@freemail.hu>
Use memcpy() function to save port status instead of
a handwritten for loop.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
drivers/staging/usbip/vhci_hcd.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index d3f11a3..878b5bf 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -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 */
if (usbip_dbg_flag_vhci_rh) {
- int i = 0;
- for (i = 0; i < VHCI_NPORTS; i++)
- prev_port_status[i] = dum->port_status[i];
+ memcpy(prev_port_status, dum->port_status,
+ sizeof(prev_port_status));
}
switch (typeReq) {
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-14 6:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 21:30 [PATCH 3/3] usbip: simplify port status saving Németh Márton
2011-06-14 6:28 ` Németh Márton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox