Commit c11cf5fd authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: refactor SignalRemoveAll()

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

pChannel => ch
Queue => queue
pSignal => sig
signalCount => count
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29fe22b3
...@@ -156,14 +156,14 @@ EXPORT_SYMBOL_GPL(spar_signal_remove); ...@@ -156,14 +156,14 @@ EXPORT_SYMBOL_GPL(spar_signal_remove);
* Return value: * Return value:
* # of signals copied. * # of signals copied.
*/ */
unsigned int unsigned int spar_signal_remove_all(struct channel_header *ch, u32 queue,
SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal) void *sig)
{ {
void *psource; void *psource;
unsigned int head, tail, signalCount = 0; unsigned int head, tail, count = 0;
struct signal_queue_header *pqhdr = struct signal_queue_header *pqhdr =
(struct signal_queue_header *) ((char *) pChannel + (struct signal_queue_header *) ((char *) ch +
pChannel->ch_space_offset) + Queue; ch->ch_space_offset) + queue;
/* capture current head and tail */ /* capture current head and tail */
head = pqhdr->head; head = pqhdr->head;
...@@ -183,17 +183,17 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal) ...@@ -183,17 +183,17 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
psource = psource =
(char *) pqhdr + pqhdr->sig_base_offset + (char *) pqhdr + pqhdr->sig_base_offset +
(tail * pqhdr->signal_size); (tail * pqhdr->signal_size);
memcpy((char *) pSignal + (pqhdr->signal_size * signalCount), memcpy((char *) sig + (pqhdr->signal_size * count),
psource, pqhdr->signal_size); psource, pqhdr->signal_size);
mb(); /* channel synch */ mb(); /* channel synch */
pqhdr->tail = tail; pqhdr->tail = tail;
signalCount++; count++;
pqhdr->num_received++; pqhdr->num_received++;
} }
return signalCount; return count;
} }
/* /*
......
...@@ -550,8 +550,8 @@ unsigned char spar_signal_remove(struct channel_header __iomem *ch, u32 queue, ...@@ -550,8 +550,8 @@ unsigned char spar_signal_remove(struct channel_header __iomem *ch, u32 queue,
* Return value: * Return value:
* # of signals copied. * # of signals copied.
*/ */
unsigned int SignalRemoveAll(struct channel_header *pChannel, u32 Queue, unsigned int spar_signal_remove_all(struct channel_header *ch, u32 queue,
void *pSignal); void *sig);
/* /*
* Routine Description: * Routine Description:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment