staging: unisys: visorbus: Convert visorchannel_signalremove() return val

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalremove(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
David Binder 2016-09-26 11:03:48 -04:00 committed by Greg Kroah-Hartman
parent 1306c429e2
commit f621a96850
6 changed files with 21 additions and 21 deletions

View File

@ -200,7 +200,7 @@ enum diag_severity {
DIAG_SEVERITY_PRINT = 4, DIAG_SEVERITY_PRINT = 4,
}; };
bool visorchannel_signalremove(struct visorchannel *channel, u32 queue, int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
void *msg); void *msg);
bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue, bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
void *msg); void *msg);

View File

@ -270,12 +270,12 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
* @queue: the queue the message will be removed from * @queue: the queue the message will be removed from
* @msg: the message to remove * @msg: the message to remove
* *
* Return: boolean indicating whether the removal succeeded or failed * Return: integer error code indicating the status of the removal
*/ */
bool int
visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg) visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
{ {
bool rc; int rc;
unsigned long flags; unsigned long flags;
if (channel->needs_lock) { if (channel->needs_lock) {
@ -286,7 +286,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
rc = signalremove_inner(channel, queue, msg); rc = signalremove_inner(channel, queue, msg);
} }
return !rc; return rc;
} }
EXPORT_SYMBOL_GPL(visorchannel_signalremove); EXPORT_SYMBOL_GPL(visorchannel_signalremove);

View File

@ -2000,7 +2000,7 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
static bool static bool
read_controlvm_event(struct controlvm_message *msg) read_controlvm_event(struct controlvm_message *msg)
{ {
if (visorchannel_signalremove(controlvm_channel, if (!visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg)) { CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */ /* got a message */
if (msg->hdr.flags.test_message == 1) if (msg->hdr.flags.test_message == 1)
@ -2048,7 +2048,7 @@ controlvm_periodic_work(struct work_struct *work)
bool got_command = false; bool got_command = false;
bool handle_command_failed = false; bool handle_command_failed = false;
while (visorchannel_signalremove(controlvm_channel, while (!visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_RESPONSE, CONTROLVM_QUEUE_RESPONSE,
&inmsg)) &inmsg))
; ;

View File

@ -927,7 +927,7 @@ drain_queue(struct uiscmdrsp *cmdrsp, struct visorhba_devdata *devdata)
struct scsi_cmnd *scsicmd; struct scsi_cmnd *scsicmd;
while (1) { while (1) {
if (!visorchannel_signalremove(devdata->dev->visorchannel, if (visorchannel_signalremove(devdata->dev->visorchannel,
IOCHAN_FROM_IOPART, IOCHAN_FROM_IOPART,
cmdrsp)) cmdrsp))
break; /* queue empty */ break; /* queue empty */

View File

@ -581,7 +581,7 @@ visorinput_channel_interrupt(struct visor_device *dev)
visorinput_dev = devdata->visorinput_dev; visorinput_dev = devdata->visorinput_dev;
while (visorchannel_signalremove(dev->visorchannel, 0, &r)) { while (!visorchannel_signalremove(dev->visorchannel, 0, &r)) {
scancode = r.activity.arg1; scancode = r.activity.arg1;
keycode = scancode_to_keycode(scancode); keycode = scancode_to_keycode(scancode);
switch (r.activity.action) { switch (r.activity.action) {

View File

@ -1539,7 +1539,7 @@ send_rcv_posts_if_needed(struct visornic_devdata *devdata)
static void static void
drain_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata) drain_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata)
{ {
while (visorchannel_signalremove(devdata->dev->visorchannel, while (!visorchannel_signalremove(devdata->dev->visorchannel,
IOCHAN_FROM_IOPART, IOCHAN_FROM_IOPART,
cmdrsp)) cmdrsp))
; ;
@ -1565,7 +1565,7 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
/* TODO: CLIENT ACQUIRE -- Don't really need this at the /* TODO: CLIENT ACQUIRE -- Don't really need this at the
* moment * moment
*/ */
if (!visorchannel_signalremove(devdata->dev->visorchannel, if (visorchannel_signalremove(devdata->dev->visorchannel,
IOCHAN_FROM_IOPART, IOCHAN_FROM_IOPART,
cmdrsp)) cmdrsp))
break; /* queue empty */ break; /* queue empty */