mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wahib Faizi <wahibfaizi@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Valentina Manea <valentina.manea.m@gmail.com>,
	linux-usb@vger.kernel.org, devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org, Wahib Faizi <wahibfaizi@gmail.com>
Subject: [PATCH] drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c: fix coding style
Date: Thu, 12 Jun 2014 14:35:38 +0400	[thread overview]
Message-ID: <1402569338-5709-2-git-send-email-wahibfaizi@gmail.com> (raw)
In-Reply-To: <1402569338-5709-1-git-send-email-wahibfaizi@gmail.com>

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 <wahibfaizi@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


  reply	other threads:[~2014-06-12 10:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Eudyptula Challenge (Task 10)>
2014-06-12 10:35 ` Eudyptula Challenge (Task 10) Wahib Faizi
2014-06-12 10:35   ` Wahib Faizi [this message]
2014-06-12 14:10     ` [PATCH] drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c: fix coding style Greg Kroah-Hartman
2014-06-12 17:32   ` Split patch into 2 logical chunks Wahib Faizi
2014-06-12 17:32     ` [PATCH v2 1/2] drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c: fix coding style Wahib Faizi
2014-06-12 17:54       ` Greg Kroah-Hartman
2014-06-12 17:55         ` Joe Perches
2014-06-12 17:32     ` [PATCH v2 2/2] " Wahib Faizi
2014-06-12 19:09   ` Fix subject line Wahib Faizi
2014-06-12 19:09     ` [PATCH 1/2] staging: usbip: usbip_host_driver.c: avoid assignment in if Wahib Faizi
2014-06-12 19:09     ` [PATCH 2/2] staging: usbip: usbip_host_driver.c: fix line over 80 characters Wahib Faizi
2014-06-12 19:40   ` [PATCH v3 0/2] Fix subject line Wahib Faizi
2014-06-12 19:40     ` [PATCH v3 1/2] staging: usbip: usbip_host_driver.c: avoid assignment in if Wahib Faizi
2014-06-12 19:40     ` [PATCH v3 2/2] staging: usbip: usbip_host_driver.c: fix line over 80 characters Wahib Faizi
2014-06-12 20:25     ` [PATCH v3 0/2] Fix subject line Davidlohr Bueso
2014-06-12 20:35       ` Greg Kroah-Hartman
2014-06-12 20:48         ` Davidlohr Bueso
2014-06-12 21:30           ` Dan Carpenter
2014-06-15 20:28       ` Wahib
2014-06-18  0:30         ` Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402569338-5709-2-git-send-email-wahibfaizi@gmail.com \
    --to=wahibfaizi@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=valentina.manea.m@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome