All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel
@ 2014-11-06 19:13 Bryan Thompson
  2014-11-06 19:13 ` [PATCH 1/8] staging: unisys: visorchannel: Remove multiple blank lines Bryan Thompson
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Bryan Thompson

This series of patches address a collection of formatting issues reported 
by checkpatch.pl on the files in the visorchannel directory.

Bryan Thompson (8):
  staging: unisys: visorchannel: Remove multiple blank lines
  staging: unisys: visorchannel: Fix alignment issues
  staging: unisys: visorchannel: Remove space between cast and variable
  staging: unisys: visorchannel: Remove unnecessary parentheses
  staging: unisys: visorchannel: Place logical continuation at the end
    of a line
  staging: unisys: visorchannel: Adjust lines to contain a maximum of
    80 characters
  staging: unisys: visorchannel: Rename goto label Away
  staging: unisys: visorchannel: Add braces to else arm of if/else
    statement

 drivers/staging/unisys/visorchannel/globals.h      |    1 -
 .../unisys/visorchannel/visorchannel_funcs.c       |  113 +++++++++++---------
 2 files changed, 60 insertions(+), 54 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/8] staging: unisys: visorchannel: Remove multiple blank lines
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 2/8] staging: unisys: visorchannel: Fix alignment issues Bryan Thompson
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Bryan Thompson

Remove the instances of multiple blank lines in the visorchannel files.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 drivers/staging/unisys/visorchannel/globals.h      |    1 -
 .../unisys/visorchannel/visorchannel_funcs.c       |    1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/globals.h b/drivers/staging/unisys/visorchannel/globals.h
index 07653b8..581ed83 100644
--- a/drivers/staging/unisys/visorchannel/globals.h
+++ b/drivers/staging/unisys/visorchannel/globals.h
@@ -25,5 +25,4 @@
 
 #define MYDRVNAME "visorchannel"
 
-
 #endif
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 5fbd5ad..715aff8 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -504,7 +504,6 @@ Away:
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
 
-
 int
 visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
 {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/8] staging: unisys: visorchannel: Fix alignment issues
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
  2014-11-06 19:13 ` [PATCH 1/8] staging: unisys: visorchannel: Remove multiple blank lines Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 3/8] staging: unisys: visorchannel: Remove space between cast and variable Bryan Thompson
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Bryan Thompson

Use the appropriate whitespace for multiline statements in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 715aff8..13dc82e 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -226,7 +226,7 @@ visorchannel_read(VISORCHANNEL *channel, ulong offset,
 	int rc = visor_memregion_read(channel->memregion, offset,
 				      local, nbytes);
 	if ((rc >= 0) && (offset == 0) &&
-	   (nbytes >= sizeof(struct channel_header))) {
+	    (nbytes >= sizeof(struct channel_header))) {
 		memcpy(&channel->chan_hdr, local,
 		       sizeof(struct channel_header));
 	}
@@ -399,7 +399,7 @@ safe_sig_queue_validate(struct signal_queue_header *psafe_sqh,
 		punsafe_sqh->tail = *ptail;
 
 		ERRDRV("safe_sig_queue_validate: head = 0x%x, tail = 0x%x, MaxSlots = 0x%x",
-		     *phead, *ptail, psafe_sqh->max_slots);
+		       *phead, *ptail, psafe_sqh->max_slots);
 		return 0;
 	}
 	return 1;
@@ -622,9 +622,10 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 			struct signal_queue_header q;
 
 			errcode = visorchannel_read(channel,
-					off + phdr->ch_space_offset +
-						(i * sizeof(q)),
-					&q, sizeof(q));
+						    off +
+						    phdr->ch_space_offset +
+						    (i * sizeof(q)),
+						    &q, sizeof(q));
 			if (errcode < 0) {
 				seq_printf(seq,
 					   "failed to read signal queue #%d from channel @0x%-16.16Lx errcode=%d\n",
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/8] staging: unisys: visorchannel: Remove space between cast and variable
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
  2014-11-06 19:13 ` [PATCH 1/8] staging: unisys: visorchannel: Remove multiple blank lines Bryan Thompson
  2014-11-06 19:13 ` [PATCH 2/8] staging: unisys: visorchannel: Fix alignment issues Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 4/8] staging: unisys: visorchannel: Remove unnecessary parentheses Bryan Thompson
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

Remove the whitespace between a cast and the variable in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |   22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 13dc82e..eb5934e 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -89,7 +89,7 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 	}
 	if (channelBytes == 0)
 		/* we had better be a CLIENT of this channel */
-		channelBytes = (ulong) p->chan_hdr.size;
+		channelBytes = (ulong)p->chan_hdr.size;
 	if (uuid_le_cmp(guid, NULL_UUID_LE) == 0)
 		/* we had better be a CLIENT of this channel */
 		guid = p->chan_hdr.chtype;
@@ -287,7 +287,7 @@ EXPORT_SYMBOL_GPL(visorchannel_clear);
 void __iomem  *
 visorchannel_get_header(VISORCHANNEL *channel)
 {
-	return (void __iomem *) &(channel->chan_hdr);
+	return (void __iomem *)&(channel->chan_hdr);
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_header);
 
@@ -519,7 +519,7 @@ visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
 		head = head + sig_hdr.max_slots;
 	slots_used = (head - tail);
 	slots_avail = sig_hdr.max_signals - slots_used;
-	return (int) slots_avail;
+	return (int)slots_avail;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalqueue_slots_avail);
 
@@ -530,7 +530,7 @@ visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue)
 
 	if (!sig_read_header(channel, queue, &sig_hdr))
 		return 0;
-	return (int) sig_hdr.max_signals;
+	return (int)sig_hdr.max_signals;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalqueue_max_slots);
 
@@ -593,13 +593,13 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 		} else
 			return;
 	}
-	nbytes = (ulong) (phdr->size);
+	nbytes = (ulong)(phdr->size);
 	seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
 		   addr + off, nbytes, nbytes_region);
 	seq_printf(seq, "Type            = %pUL\n", &phdr->chtype);
 	seq_printf(seq, "ZoneGuid        = %pUL\n", &phdr->zone_uuid);
 	seq_printf(seq, "Signature       = 0x%-16.16Lx\n",
-		   (long long) phdr->signature);
+		   (long long)phdr->signature);
 	seq_printf(seq, "LegacyState     = %lu\n", (ulong)phdr->legacy_state);
 	seq_printf(seq, "SrvState        = %lu\n", (ulong)phdr->srv_state);
 	seq_printf(seq, "CliStateBoot    = %lu\n", (ulong)phdr->cli_state_boot);
@@ -607,14 +607,14 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 	seq_printf(seq, "HeaderSize      = %lu\n", (ulong)phdr->header_size);
 	seq_printf(seq, "Size            = %llu\n", (long long)phdr->size);
 	seq_printf(seq, "Features        = 0x%-16.16llx\n",
-		   (long long) phdr->features);
+		   (long long)phdr->features);
 	seq_printf(seq, "PartitionHandle = 0x%-16.16llx\n",
-		   (long long) phdr->partition_handle);
+		   (long long)phdr->partition_handle);
 	seq_printf(seq, "Handle          = 0x%-16.16llx\n",
-		   (long long) phdr->handle);
-	seq_printf(seq, "VersionId       = %lu\n", (ulong) phdr->version_id);
+		   (long long)phdr->handle);
+	seq_printf(seq, "VersionId       = %lu\n", (ulong)phdr->version_id);
 	seq_printf(seq, "oChannelSpace   = %llu\n",
-		   (long long) phdr->ch_space_offset);
+		   (long long)phdr->ch_space_offset);
 	if ((phdr->ch_space_offset == 0) || (errcode < 0))
 		;
 	else
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/8] staging: unisys: visorchannel: Remove unnecessary parentheses
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
                   ` (2 preceding siblings ...)
  2014-11-06 19:13 ` [PATCH 3/8] staging: unisys: visorchannel: Remove space between cast and variable Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 5/8] staging: unisys: visorchannel: Place logical continuation at the end of a line Bryan Thompson
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

Remove extraneous parentheses around a variable in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index eb5934e..e121808 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -287,7 +287,7 @@ EXPORT_SYMBOL_GPL(visorchannel_clear);
 void __iomem  *
 visorchannel_get_header(VISORCHANNEL *channel)
 {
-	return (void __iomem *)&(channel->chan_hdr);
+	return (void __iomem *)&channel->chan_hdr;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_header);
 
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/8] staging: unisys: visorchannel: Place logical continuation at the end of a line
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
                   ` (3 preceding siblings ...)
  2014-11-06 19:13 ` [PATCH 4/8] staging: unisys: visorchannel: Remove unnecessary parentheses Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 6/8] staging: unisys: visorchannel: Adjust lines to contain a maximum of 80 characters Bryan Thompson
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

Move the || logical continuation from the start of the second line of an if statement to the end of the first line.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index e121808..96a8e70 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -388,8 +388,8 @@ safe_sig_queue_validate(struct signal_queue_header *psafe_sqh,
 			struct signal_queue_header *punsafe_sqh,
 			u32 *phead, u32 *ptail)
 {
-	if ((*phead >= psafe_sqh->max_slots)
-	    || (*ptail >= psafe_sqh->max_slots)) {
+	if ((*phead >= psafe_sqh->max_slots) ||
+	    (*ptail >= psafe_sqh->max_slots)) {
 		/* Choose 0 or max, maybe based on current tail value */
 		*phead = 0;
 		*ptail = 0;
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/8] staging: unisys: visorchannel: Adjust lines to contain a maximum of 80 characters
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
                   ` (4 preceding siblings ...)
  2014-11-06 19:13 ` [PATCH 5/8] staging: unisys: visorchannel: Place logical continuation at the end of a line Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 7/8] staging: unisys: visorchannel: Rename goto label Away Bryan Thompson
  2014-11-06 19:13 ` [PATCH 8/8] staging: unisys: visorchannel: Add braces to else arm of if/else statement Bryan Thompson
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

Split multiple logging lines to get them closer to 80 characters per line.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 96a8e70..a7f4ded 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -334,7 +334,8 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 				 sizeof(struct signal_queue_header)) < 0) {
 		ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d",
 		       queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
-		ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n", rc);
+		ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n",
+		       rc);
 		goto Away;
 	}
 	rc = TRUE;
@@ -354,13 +355,15 @@ sig_do_data(VISORCHANNEL *channel, u32 queue,
 		if (visor_memregion_write(channel->memregion,
 					  signal_data_offset,
 					  data, sig_hdr->signal_size) < 0) {
-			ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n", rc);
+			ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n",
+			       rc);
 			goto Away;
 		}
 	} else {
 		if (visor_memregion_read(channel->memregion, signal_data_offset,
 					 data, sig_hdr->signal_size) < 0) {
-			ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n", rc);
+			ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n",
+			       rc);
 			goto Away;
 		}
 	}
@@ -439,7 +442,8 @@ visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg)
 		goto Away;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received)) {
-		ERRDRV("visor_memregion_write of NumSignalsReceived failed: (status=%d)\n", rc);
+		ERRDRV("visor_memregion_write of NumSignalsReceived failed: (status=%d)\n",
+		       rc);
 		goto Away;
 	}
 	rc = TRUE;
@@ -469,7 +473,8 @@ visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
 	if (sig_hdr.head == sig_hdr.tail) {
 		sig_hdr.num_overflows++;
 		if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_overflows)) {
-			ERRDRV("visor_memregion_write of NumOverflows failed: (status=%d)\n", rc);
+			ERRDRV("visor_memregion_write of NumOverflows failed: (status=%d)\n",
+			       rc);
 			goto Away;
 		}
 		rc = FALSE;
@@ -492,7 +497,8 @@ visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
 		goto Away;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent)) {
-		ERRDRV("visor_memregion_write of NumSignalsSent failed: (status=%d)\n", rc);
+		ERRDRV("visor_memregion_write of NumSignalsSent failed: (status=%d)\n",
+		       rc);
 		goto Away;
 	}
 	rc = TRUE;
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/8] staging: unisys: visorchannel: Rename goto label Away
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
                   ` (5 preceding siblings ...)
  2014-11-06 19:13 ` [PATCH 6/8] staging: unisys: visorchannel: Adjust lines to contain a maximum of 80 characters Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  2014-11-06 19:13 ` [PATCH 8/8] staging: unisys: visorchannel: Add braces to else arm of if/else statement Bryan Thompson
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

Rename the goto label used throughout visorchannel_funcs.c from Away to cleanup.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |   54 ++++++++++----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index a7f4ded..c3ac641 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -60,7 +60,7 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 	if (p == NULL) {
 		ERRDRV("allocation failed: (status=0)\n");
 		rc = NULL;
-		goto Away;
+		goto cleanup;
 	}
 	p->memregion = NULL;
 	p->needs_lock = needs_lock;
@@ -79,13 +79,13 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 	if (p->memregion == NULL) {
 		ERRDRV("visor_memregion_create failed failed: (status=0)\n");
 		rc = NULL;
-		goto Away;
+		goto cleanup;
 	}
 	if (visor_memregion_read(p->memregion, 0, &p->chan_hdr,
 				 sizeof(struct channel_header)) < 0) {
 		ERRDRV("visor_memregion_read failed: (status=0)\n");
 		rc = NULL;
-		goto Away;
+		goto cleanup;
 	}
 	if (channelBytes == 0)
 		/* we had better be a CLIENT of this channel */
@@ -96,13 +96,13 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 	if (visor_memregion_resize(p->memregion, channelBytes) < 0) {
 		ERRDRV("visor_memregion_resize failed: (status=0)\n");
 		rc = NULL;
-		goto Away;
+		goto cleanup;
 	}
 	p->size = channelBytes;
 	p->guid = guid;
 
 	rc = p;
-Away:
+cleanup:
 
 	if (rc == NULL) {
 		if (p != NULL) {
@@ -255,7 +255,7 @@ visorchannel_clear(VISORCHANNEL *channel, ulong offset, u8 ch, ulong nbytes)
 
 	if (buf == NULL) {
 		ERRDRV("%s failed memory allocation", __func__);
-		goto Away;
+		goto cleanup;
 	}
 	memset(buf, ch, bufsize);
 	while (nbytes > 0) {
@@ -268,14 +268,14 @@ visorchannel_clear(VISORCHANNEL *channel, ulong offset, u8 ch, ulong nbytes)
 					  buf, thisbytes);
 		if (x < 0) {
 			rc = x;
-			goto Away;
+			goto cleanup;
 		}
 		written += thisbytes;
 		nbytes -= thisbytes;
 	}
 	rc = 0;
 
-Away:
+cleanup:
 	if (buf != NULL) {
 		vfree(buf);
 		buf = NULL;
@@ -323,7 +323,7 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 
 	if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) {
 		ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
-		goto Away;
+		goto cleanup;
 	}
 
 	/* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */
@@ -336,10 +336,10 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 		       queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
 		ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n",
 		       rc);
-		goto Away;
+		goto cleanup;
 	}
 	rc = TRUE;
-Away:
+cleanup:
 	return rc;
 }
 
@@ -357,18 +357,18 @@ sig_do_data(VISORCHANNEL *channel, u32 queue,
 					  data, sig_hdr->signal_size) < 0) {
 			ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n",
 			       rc);
-			goto Away;
+			goto cleanup;
 		}
 	} else {
 		if (visor_memregion_read(channel->memregion, signal_data_offset,
 					 data, sig_hdr->signal_size) < 0) {
 			ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n",
 			       rc);
-			goto Away;
+			goto cleanup;
 		}
 	}
 	rc = TRUE;
-Away:
+cleanup:
 	return rc;
 }
 
@@ -419,16 +419,16 @@ visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg)
 
 	if (!sig_read_header(channel, queue, &sig_hdr)) {
 		rc = FALSE;
-		goto Away;
+		goto cleanup;
 	}
 	if (sig_hdr.head == sig_hdr.tail) {
 		rc = FALSE;	/* no signals to remove */
-		goto Away;
+		goto cleanup;
 	}
 	sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;
 	if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg)) {
 		ERRDRV("sig_read_data failed: (status=%d)\n", rc);
-		goto Away;
+		goto cleanup;
 	}
 	sig_hdr.num_received++;
 
@@ -439,15 +439,15 @@ visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg)
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail)) {
 		ERRDRV("visor_memregion_write of Tail failed: (status=%d)\n",
 		       rc);
-		goto Away;
+		goto cleanup;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received)) {
 		ERRDRV("visor_memregion_write of NumSignalsReceived failed: (status=%d)\n",
 		       rc);
-		goto Away;
+		goto cleanup;
 	}
 	rc = TRUE;
-Away:
+cleanup:
 	if (channel->needs_lock)
 		spin_unlock(&channel->remove_lock);
 
@@ -466,7 +466,7 @@ visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
 
 	if (!sig_read_header(channel, queue, &sig_hdr)) {
 		rc = FALSE;
-		goto Away;
+		goto cleanup;
 	}
 
 	sig_hdr.head = ((sig_hdr.head + 1) % sig_hdr.max_slots);
@@ -475,15 +475,15 @@ visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
 		if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_overflows)) {
 			ERRDRV("visor_memregion_write of NumOverflows failed: (status=%d)\n",
 			       rc);
-			goto Away;
+			goto cleanup;
 		}
 		rc = FALSE;
-		goto Away;
+		goto cleanup;
 	}
 
 	if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg)) {
 		ERRDRV("sig_write_data failed: (status=%d)\n", rc);
-		goto Away;
+		goto cleanup;
 	}
 	sig_hdr.num_sent++;
 
@@ -494,15 +494,15 @@ visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head)) {
 		ERRDRV("visor_memregion_write of Head failed: (status=%d)\n",
 		       rc);
-		goto Away;
+		goto cleanup;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent)) {
 		ERRDRV("visor_memregion_write of NumSignalsSent failed: (status=%d)\n",
 		       rc);
-		goto Away;
+		goto cleanup;
 	}
 	rc = TRUE;
-Away:
+cleanup:
 	if (channel->needs_lock)
 		spin_unlock(&channel->insert_lock);
 
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 8/8] staging: unisys: visorchannel: Add braces to else arm of if/else statement
  2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
                   ` (6 preceding siblings ...)
  2014-11-06 19:13 ` [PATCH 7/8] staging: unisys: visorchannel: Rename goto label Away Bryan Thompson
@ 2014-11-06 19:13 ` Bryan Thompson
  7 siblings, 0 replies; 9+ messages in thread
From: Bryan Thompson @ 2014-11-06 19:13 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

Add braces to the else arm of an if/else block in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index c3ac641..08dd78a 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -596,8 +596,9 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 		if (off == 0) {
 			phdr = &channel->chan_hdr;
 			seq_puts(seq, "(following data may be stale)\n");
-		} else
+		} else {
 			return;
+		}
 	}
 	nbytes = (ulong)(phdr->size);
 	seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-06 19:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 19:13 [PATCH 0/8] staging: unisys: visorchannel: Formatting cleanup of visorchannel Bryan Thompson
2014-11-06 19:13 ` [PATCH 1/8] staging: unisys: visorchannel: Remove multiple blank lines Bryan Thompson
2014-11-06 19:13 ` [PATCH 2/8] staging: unisys: visorchannel: Fix alignment issues Bryan Thompson
2014-11-06 19:13 ` [PATCH 3/8] staging: unisys: visorchannel: Remove space between cast and variable Bryan Thompson
2014-11-06 19:13 ` [PATCH 4/8] staging: unisys: visorchannel: Remove unnecessary parentheses Bryan Thompson
2014-11-06 19:13 ` [PATCH 5/8] staging: unisys: visorchannel: Place logical continuation at the end of a line Bryan Thompson
2014-11-06 19:13 ` [PATCH 6/8] staging: unisys: visorchannel: Adjust lines to contain a maximum of 80 characters Bryan Thompson
2014-11-06 19:13 ` [PATCH 7/8] staging: unisys: visorchannel: Rename goto label Away Bryan Thompson
2014-11-06 19:13 ` [PATCH 8/8] staging: unisys: visorchannel: Add braces to else arm of if/else statement Bryan Thompson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.