Eudyptula Challenge (Task 10)
Greetings Linux Kernel Developers! This is Task 10 of the Eudyptula Challenge. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c: fix coding style
Fix coding style issues detected by checkpatch.pl: 1. do not use assignment in if condition 2. line over 80 characters Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 92caef7..bef08d5 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -47,7 +47,8 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev) snprintf(status_attr_path, SYSFS_PATH_MAX, %s/usbip_status, udev-path); - if ((fd = open(status_attr_path, O_RDONLY)) 0) { + fd = open(status_attr_path, O_RDONLY); + if (fd 0) { err(error opening attribute %s, status_attr_path); return -1; } @@ -87,8 +88,8 @@ struct usbip_exported_device *usbip_exported_device_new(const char *sdevpath) goto err; /* reallocate buffer to include usb interface data */ - size = sizeof(struct usbip_exported_device) + edev-udev.bNumInterfaces * - sizeof(struct usbip_usb_interface); + size = sizeof(struct usbip_exported_device) + + edev-udev.bNumInterfaces * sizeof(struct usbip_usb_interface); edev_old = edev; edev = realloc(edev, size); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Split patch into 2 logical chunks
Fix coding style issues detected by checkpatch.pl in usbip_host_driver.c. v2: Split patch into logical chunks, as suggested by Greg Kroah-Hartman gre...@linuxfoundation.org [PATCH v2 1/2] Fix coding style issue do not use assignment in if condition detected by checkpatch.pl in usbip_host_driver.c. [PATCH v2 2/2] Fix coding style issue line over 80 characters detected by checkpatch.pl in usbip_host_driver.c. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/2] drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c: fix coding style
Fix coding style issue do not use assignment in if condition detected by checkpatch.pl in usbip_host_driver.c. Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 92caef7..32b8f52 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -47,7 +47,8 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev) snprintf(status_attr_path, SYSFS_PATH_MAX, %s/usbip_status, udev-path); - if ((fd = open(status_attr_path, O_RDONLY)) 0) { + fd = open(status_attr_path, O_RDONLY); + if (fd 0) { err(error opening attribute %s, status_attr_path); return -1; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/2] drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c: fix coding style
Fix coding style issue line over 80 characters detected by checkpatch.pl in usbip_host_driver.c. Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 32b8f52..bef08d5 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -88,8 +88,8 @@ struct usbip_exported_device *usbip_exported_device_new(const char *sdevpath) goto err; /* reallocate buffer to include usb interface data */ - size = sizeof(struct usbip_exported_device) + edev-udev.bNumInterfaces * - sizeof(struct usbip_usb_interface); + size = sizeof(struct usbip_exported_device) + + edev-udev.bNumInterfaces * sizeof(struct usbip_usb_interface); edev_old = edev; edev = realloc(edev, size); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fix subject line
Fix coding style issues detected by checkpatch.pl in usbip_host_driver.c. v3: Shorten subject line, as suggested by Greg Kroah-Hartman gre...@linuxfoundation.org, Joe Perches j...@perches.com v2: Split patch into logical chunks, as suggested by Greg Kroah-Hartman gre...@linuxfoundation.org -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] staging: usbip: usbip_host_driver.c: fix line over 80 characters
Fix coding style issue line over 80 characters detected by checkpatch.pl in usbip_host_driver.c. Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 32b8f52..bef08d5 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -88,8 +88,8 @@ struct usbip_exported_device *usbip_exported_device_new(const char *sdevpath) goto err; /* reallocate buffer to include usb interface data */ - size = sizeof(struct usbip_exported_device) + edev-udev.bNumInterfaces * - sizeof(struct usbip_usb_interface); + size = sizeof(struct usbip_exported_device) + + edev-udev.bNumInterfaces * sizeof(struct usbip_usb_interface); edev_old = edev; edev = realloc(edev, size); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] staging: usbip: usbip_host_driver.c: avoid assignment in if
Fix coding style issue do not use assignment in if condition detected by checkpatch.pl in usbip_host_driver.c. Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 92caef7..32b8f52 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -47,7 +47,8 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev) snprintf(status_attr_path, SYSFS_PATH_MAX, %s/usbip_status, udev-path); - if ((fd = open(status_attr_path, O_RDONLY)) 0) { + fd = open(status_attr_path, O_RDONLY); + if (fd 0) { err(error opening attribute %s, status_attr_path); return -1; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 0/2] Fix subject line
Fix coding style issues detected by checkpatch.pl in usbip_host_driver.c. v3: Shorten subject line, as suggested by Greg Kroah-Hartman gre...@linuxfoundation.org, Joe Perches j...@perches.com v2: Split patch into logical chunks, as suggested by Greg Kroah-Hartman gre...@linuxfoundation.org -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 2/2] staging: usbip: usbip_host_driver.c: fix line over 80 characters
Fix coding style issue line over 80 characters detected by checkpatch.pl in usbip_host_driver.c. Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 32b8f52..bef08d5 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -88,8 +88,8 @@ struct usbip_exported_device *usbip_exported_device_new(const char *sdevpath) goto err; /* reallocate buffer to include usb interface data */ - size = sizeof(struct usbip_exported_device) + edev-udev.bNumInterfaces * - sizeof(struct usbip_usb_interface); + size = sizeof(struct usbip_exported_device) + + edev-udev.bNumInterfaces * sizeof(struct usbip_usb_interface); edev_old = edev; edev = realloc(edev, size); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/2] staging: usbip: usbip_host_driver.c: avoid assignment in if
Fix coding style issue do not use assignment in if condition detected by checkpatch.pl in usbip_host_driver.c. Signed-off-by: Wahib Faizi wahibfa...@gmail.com --- .../usbip/userspace/libsrc/usbip_host_driver.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 92caef7..32b8f52 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -47,7 +47,8 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev) snprintf(status_attr_path, SYSFS_PATH_MAX, %s/usbip_status, udev-path); - if ((fd = open(status_attr_path, O_RDONLY)) 0) { + fd = open(status_attr_path, O_RDONLY); + if (fd 0) { err(error opening attribute %s, status_attr_path); return -1; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html