[PATCH 07/15] staging: usbip: simplified errorhandling

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach In each errorcase spin_unlock_irq is called and -EINVAL is returned. To simplify that I created a label called "err" doing that. On Success count will be returned. Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/stub_

[PATCH 11/15] staging: usbip: userspace: avoid memory leaks

2013-04-04 Thread Stefan Reif
Call freeaddrinfo when connect/listen fails. Call usbip_host_driver_close on error. Signed-off-by: Stefan Reif --- drivers/staging/usbip/userspace/src/usbip_network.c | 4 ++-- drivers/staging/usbip/userspace/src/usbipd.c| 7 ++- 2 files changed, 8 insertions(+), 3 deletions

[PATCH 06/15] staging: usbip: simple indent fix

2013-04-04 Thread Stefan Reif
Fix an indent. Signed-off-by: Stefan Reif --- drivers/staging/usbip/usbip_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 539fa57..7b97df6 100644 --- a/drivers/staging/usbip

[PATCH 10/15] staging: usbip: simplified cleanup function

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach This patch simplified "stub_device_free" cleanup function: - changed return type to void, since the return value is not checked anywhere - kfree is NULL-safe, so removed if statement - deleted debug-message Signed-off-by: Kurt Kanzenbach Signed-off-by: S

[PATCH 13/15] staging: usbip: userspace: libsrc: cleanup parsing

2013-04-04 Thread Stefan Reif
We replaced them by the pseudo-ID `1' (instead of reading the ID from the file) to indicate that the parser is in a section that can be ignored. If the parser is in such a section, the current line (which contains sub-items for this section) is discarded. Signed-off-by: Kurt Kanzenbach S

[PATCH 14/15] staging: usbip: userspace: unified command line arguments

2013-04-04 Thread Stefan Reif
mote Now: $ usbip attach --remote -b $ usbip list --remote Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/userspace/README | 4 ++-- drivers/staging/usbip/userspace/doc/usbip.8| 4 ++-- drivers/staging/usbip/userspace/src/usbip_att

[PATCH 05/15] staging: usbip: remove unnused, broken macro

2013-04-04 Thread Stefan Reif
Remove broken preprocessor macro "hardware". It is unused and it references an element (pdev in vhci_hcd) that does not exist. Signed-off-by: Stefan Reif --- drivers/staging/usbip/vhci.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/usbip/vhci.h b/drivers/sta

[PATCH 08/15] staging: usbip: removed unnecessary if-else-statements

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach In each if-else case "return" is called. This is why these if-else-statements are useless. Removing them improves understanding and readability. Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/stub_m

[PATCH 12/15] staging: usbip: userspace: removed unnecessary code

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach Since no usbip_name function is used in usbipd, it's not necessary to parse "usb.ids" file at startup. Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/userspace/src/usbipd.c | 4 1 file changed, 4 deletions(-

[PATCH 09/15] staging: usbip: removed unnecessary for loop

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach This for loop is not needed, since STUB_BUSID_OTHER is defined as 0. In Addition added a comment if STUB_BUSID_OTHER changes sometime. Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/stub_main.c | 8 1 file changed, 4

[PATCH 15/15] staging: usbip: userspace: show product name in `list -l' command

2013-04-04 Thread Stefan Reif
ff-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/userspace/src/usbip_list.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/staging/usbip/userspace/src/usbip_list.c b/drivers/staging/usbip/userspace/src/usbip_list.c index ed30d91..ff56255 100644

[PATCH 00/15] staging: usbip: code cleanup

2013-04-04 Thread Stefan Reif
staging: usbip: userspace: unified command line arguments staging: usbip: userspace: show product name in `list -l' command Stefan Reif (5): staging: usbip: userspace: libsrc: replace numbers by ascii staging: usbip: reformat function pickup_urb_and_free_priv staging: usbip: remove un

[PATCH 03/15] staging: usbip: reformat function pickup_urb_and_free_priv

2013-04-04 Thread Stefan Reif
re-indent funtion "pickup_urb_and_free_priv" to improve readability. Signed-off-by: Stefan Reif --- drivers/staging/usbip/vhci_rx.c | 54 ++--- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/drivers/staging/usbip/vhci_rx.c b/drive

[PATCH 01/15] staging: usbip: userspace: libsrc: replace numbers by ascii

2013-04-04 Thread Stefan Reif
replace numbers in code by ascii text constants as suggested by Dan Carpenter: http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/035907.html Signed-off-by: Stefan Reif --- drivers/staging/usbip/userspace/libsrc/names.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 04/15] staging: usbip: removed enumeration of comments

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach Enumerations for one comment makes no sense. This is why this should be removed. Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/stub_dev.c | 2 +- drivers/staging/usbip/stub_rx.c | 2 +- drivers/staging/usbip/vhci_rx.c | 2 +- 3

[PATCH 02/15] staging: usbip: reformat function stub_recv_cmd_unlink()

2013-04-04 Thread Stefan Reif
From: Kurt Kanzenbach Reformat function stub_recv_cmd_unlink() to improve readability. Signed-off-by: Kurt Kanzenbach Signed-off-by: Stefan Reif --- drivers/staging/usbip/stub_rx.c | 98 - 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a