staging: unisys: refactor visor_signal_remove()
Rename visor_signal_remove() to spar_signal_remove() and fix CamelCase parameter names: pChannel => ch Queue => queue pSignal => sig Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
93a8456556
commit
3f12c5f959
4 changed files with 9 additions and 10 deletions
|
@ -102,14 +102,13 @@ EXPORT_SYMBOL_GPL(spar_signal_insert);
|
||||||
* 1 if the removal succeeds, 0 if the queue was empty.
|
* 1 if the removal succeeds, 0 if the queue was empty.
|
||||||
*/
|
*/
|
||||||
unsigned char
|
unsigned char
|
||||||
visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
|
spar_signal_remove(struct channel_header __iomem *ch, u32 queue, void *sig)
|
||||||
void *pSignal)
|
|
||||||
{
|
{
|
||||||
void __iomem *psource;
|
void __iomem *psource;
|
||||||
unsigned int head, tail;
|
unsigned int head, tail;
|
||||||
struct signal_queue_header __iomem *pqhdr =
|
struct signal_queue_header __iomem *pqhdr =
|
||||||
(struct signal_queue_header __iomem *) ((char __iomem *) pChannel +
|
(struct signal_queue_header __iomem *) ((char __iomem *) ch +
|
||||||
readq(&pChannel->ch_space_offset)) + Queue;
|
readq(&ch->ch_space_offset)) + queue;
|
||||||
|
|
||||||
/* capture current head and tail */
|
/* capture current head and tail */
|
||||||
head = readl(&pqhdr->head);
|
head = readl(&pqhdr->head);
|
||||||
|
@ -127,7 +126,7 @@ visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
|
||||||
/* copy signal from tail location to the area pointed to by pSignal */
|
/* copy signal from tail location to the area pointed to by pSignal */
|
||||||
psource = (char __iomem *) pqhdr + readq(&pqhdr->sig_base_offset) +
|
psource = (char __iomem *) pqhdr + readq(&pqhdr->sig_base_offset) +
|
||||||
(tail * readl(&pqhdr->signal_size));
|
(tail * readl(&pqhdr->signal_size));
|
||||||
memcpy_fromio(pSignal, psource, readl(&pqhdr->signal_size));
|
memcpy_fromio(sig, psource, readl(&pqhdr->signal_size));
|
||||||
|
|
||||||
mb(); /* channel synch */
|
mb(); /* channel synch */
|
||||||
writel(tail, &pqhdr->tail);
|
writel(tail, &pqhdr->tail);
|
||||||
|
@ -136,7 +135,7 @@ visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
|
||||||
&pqhdr->num_received);
|
&pqhdr->num_received);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(visor_signal_remove);
|
EXPORT_SYMBOL_GPL(spar_signal_remove);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routine Description:
|
* Routine Description:
|
||||||
|
|
|
@ -61,7 +61,7 @@ SignalRemove_withLock(struct channel_header __iomem *pChannel, u32 Queue,
|
||||||
unsigned char result;
|
unsigned char result;
|
||||||
|
|
||||||
spin_lock(lock);
|
spin_lock(lock);
|
||||||
result = visor_signal_remove(pChannel, Queue, pSignal);
|
result = spar_signal_remove(pChannel, Queue, pSignal);
|
||||||
spin_unlock(lock);
|
spin_unlock(lock);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -528,8 +528,8 @@ unsigned char spar_signal_insert(struct channel_header __iomem *ch, u32 queue,
|
||||||
* empty.
|
* empty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned char visor_signal_remove(struct channel_header __iomem *pChannel,
|
unsigned char spar_signal_remove(struct channel_header __iomem *ch, u32 queue,
|
||||||
u32 Queue, void *pSignal);
|
void *sig);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routine Description:
|
* Routine Description:
|
||||||
|
|
|
@ -125,7 +125,7 @@ int
|
||||||
uisqueue_get_cmdrsp(struct uisqueue_info *queueinfo,
|
uisqueue_get_cmdrsp(struct uisqueue_info *queueinfo,
|
||||||
void *cmdrsp, unsigned int whichqueue)
|
void *cmdrsp, unsigned int whichqueue)
|
||||||
{
|
{
|
||||||
if (!visor_signal_remove(queueinfo->chan, whichqueue, cmdrsp))
|
if (!spar_signal_remove(queueinfo->chan, whichqueue, cmdrsp))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
queueinfo->packets_received++;
|
queueinfo->packets_received++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue