[PATCH 31/91] staging: unisys: refactor SignalRemoveAll()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename SignalRemoveAll to spar_signal_remove_all(), and fix CamelCase
names:

pChannel => ch
Queue => queue
pSignal => sig
signalCount => count

Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/channels/channel.c                | 16 ++++++++--------
 .../unisys/common-spar/include/channels/channel.h        |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/unisys/channels/channel.c b/drivers/staging/unisys/channels/channel.c
index b1e2f95..2fc61a7 100644
--- a/drivers/staging/unisys/channels/channel.c
+++ b/drivers/staging/unisys/channels/channel.c
@@ -156,14 +156,14 @@ EXPORT_SYMBOL_GPL(spar_signal_remove);
  * Return value:
  * # of signals copied.
  */
-unsigned int
-SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
+unsigned int spar_signal_remove_all(struct channel_header *ch, u32 queue,
+				    void *sig)
 {
 	void *psource;
-	unsigned int head, tail, signalCount = 0;
+	unsigned int head, tail, count = 0;
 	struct signal_queue_header *pqhdr =
-	    (struct signal_queue_header *) ((char *) pChannel +
-				    pChannel->ch_space_offset) + Queue;
+	    (struct signal_queue_header *) ((char *) ch +
+				    ch->ch_space_offset) + queue;
 
 	/* capture current head and tail */
 	head = pqhdr->head;
@@ -183,17 +183,17 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
 		psource =
 		    (char *) pqhdr + pqhdr->sig_base_offset +
 		    (tail * pqhdr->signal_size);
-		memcpy((char *) pSignal + (pqhdr->signal_size * signalCount),
+		memcpy((char *) sig + (pqhdr->signal_size * count),
 		       psource, pqhdr->signal_size);
 
 		mb(); /* channel synch */
 		pqhdr->tail = tail;
 
-		signalCount++;
+		count++;
 		pqhdr->num_received++;
 	}
 
-	return signalCount;
+	return count;
 }
 
 /*
diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h
index 4d9e5d4..865d9a4 100644
--- a/drivers/staging/unisys/common-spar/include/channels/channel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/channel.h
@@ -550,8 +550,8 @@ unsigned char spar_signal_remove(struct channel_header __iomem *ch, u32 queue,
 * Return value:
 * # of signals copied.
 */
-unsigned int SignalRemoveAll(struct channel_header *pChannel, u32 Queue,
-			     void *pSignal);
+unsigned int spar_signal_remove_all(struct channel_header *ch, u32 queue,
+				    void *sig);
 
 /*
 * Routine Description:
-- 
1.9.1

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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux