From: matt mooney <mfm@muteddisk.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 12/16] staging: usbip: vhci_sysfs.c: coding style cleanup
Date: Fri, 6 May 2011 03:47:52 -0700 [thread overview]
Message-ID: <dc9256b9b85be6dffa8926cb4f18c02588b53d6f.1304676742.git.mfm@muteddisk.com> (raw)
In-Reply-To: <cover.1304676742.git.mfm@muteddisk.com>
Fix a few alignment issues and remove extraneous lines.
Add braces to else clause.
Signed-off-by: matt mooney <mfm@muteddisk.com>
---
drivers/staging/usbip/vhci_sysfs.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c
index e2dadbd..be851d8 100644
--- a/drivers/staging/usbip/vhci_sysfs.c
+++ b/drivers/staging/usbip/vhci_sysfs.c
@@ -53,20 +53,19 @@ static ssize_t show_status(struct device *dev, struct device_attribute *attr,
struct vhci_device *vdev = port_to_vdev(i);
spin_lock(&vdev->ud.lock);
-
out += sprintf(out, "%03u %03u ", i, vdev->ud.status);
if (vdev->ud.status == VDEV_ST_USED) {
out += sprintf(out, "%03u %08x ",
- vdev->speed, vdev->devid);
+ vdev->speed, vdev->devid);
out += sprintf(out, "%16p ", vdev->ud.tcp_socket);
out += sprintf(out, "%s", dev_name(&vdev->udev->dev));
- } else
+ } else {
out += sprintf(out, "000 000 000 0000000000000000 0-0");
+ }
out += sprintf(out, "\n");
-
spin_unlock(&vdev->ud.lock);
}
@@ -127,6 +126,7 @@ static ssize_t store_detach(struct device *dev, struct device_attribute *attr,
return -EINVAL;
usbip_dbg_vhci_sysfs("Leave\n");
+
return count;
}
static DEVICE_ATTR(detach, S_IWUSR, NULL, store_detach);
@@ -183,8 +183,7 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
sscanf(buf, "%u %u %u %u", &rhport, &sockfd, &devid, &speed);
usbip_dbg_vhci_sysfs("rhport(%u) sockfd(%u) devid(%u) speed(%u)\n",
- rhport, sockfd, devid, speed);
-
+ rhport, sockfd, devid, speed);
/* check received parameters */
if (valid_args(rhport, speed) < 0)
@@ -199,9 +198,7 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
/* begin a lock */
spin_lock(&the_controller->lock);
-
vdev = port_to_vdev(rhport);
-
spin_lock(&vdev->ud.lock);
if (vdev->ud.status != VDEV_ST_NULL) {
@@ -214,7 +211,7 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
}
usbip_uinfo("rhport(%u) sockfd(%d) devid(%u) speed(%u)\n",
- rhport, sockfd, devid, speed);
+ rhport, sockfd, devid, speed);
vdev->devid = devid;
vdev->speed = speed;
--
1.7.5.1
next prev parent reply other threads:[~2011-05-06 10:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 10:47 [PATCH 00/16] staging: usbip: cleanup matt mooney
2011-05-06 10:47 ` [PATCH 01/16] staging: usbip: stub_dev.c: coding style cleanup matt mooney
2011-05-06 10:47 ` [PATCH 02/16] staging: usbip: stub_main.c: " matt mooney
2011-05-06 10:47 ` [PATCH 03/16] staging: usbip: stub_rx.c: " matt mooney
2011-05-06 10:47 ` [PATCH 04/16] staging: usbip: stub_tx.c: " matt mooney
2011-05-06 10:47 ` [PATCH 05/16] staging: usbip: usbip_common.h: " matt mooney
2011-05-06 10:47 ` [PATCH 06/16] staging: usbip: usbip_common.c: " matt mooney
2011-05-06 10:47 ` [PATCH 07/16] staging: usbip: usbip_event.c: " matt mooney
2011-05-06 10:47 ` [PATCH 08/16] staging: usbip: stub.h: " matt mooney
2011-05-06 10:47 ` [PATCH 09/16] staging: usbip: vhci.h: " matt mooney
2011-05-06 10:47 ` [PATCH 10/16] staging: usbip: vhci_hcd.c: " matt mooney
2011-05-06 10:47 ` [PATCH 11/16] staging: usbip: vhci_rx.c: " matt mooney
2011-05-06 10:47 ` matt mooney [this message]
2011-05-06 10:47 ` [PATCH 13/16] staging: usbip: vhci_tx.c: " matt mooney
2011-05-06 10:47 ` [PATCH 14/16] staging: usbip: add break to default case in switch statements matt mooney
2011-05-06 10:47 ` [PATCH 15/16] staging: usbip: remove section dividers matt mooney
2011-05-06 10:47 ` [PATCH 16/16] staging: usbip: fixup MODULE_ macros matt mooney
2011-05-06 21:27 ` [PATCH 00/16] staging: usbip: cleanup Greg KH
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=dc9256b9b85be6dffa8926cb4f18c02588b53d6f.1304676742.git.mfm@muteddisk.com \
--to=mfm@muteddisk.com \
--cc=greg@kroah.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®