summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus
diff options
context:
space:
mode:
authorDavid Binder <david.binder@unisys.com>2016-09-26 11:03:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-27 13:06:16 +0200
commitf621a96850c262b7de42bd06eae4edd5bfd099d8 (patch)
treed9dd16e891c223251f631f80761352f18e570d4f /drivers/staging/unisys/visorbus
parent1306c429e2ce16d988a214456942b08f709a3e84 (diff)
downloadop-kernel-dev-f621a96850c262b7de42bd06eae4edd5bfd099d8.zip
op-kernel-dev-f621a96850c262b7de42bd06eae4edd5bfd099d8.tar.gz
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>
Diffstat (limited to 'drivers/staging/unisys/visorbus')
-rw-r--r--drivers/staging/unisys/visorbus/visorchannel.c8
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index fe5a620..70fcd1f 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -270,12 +270,12 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
* @queue: the queue the message will be removed from
* @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)
{
- bool rc;
+ int rc;
unsigned long flags;
if (channel->needs_lock) {
@@ -286,7 +286,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
rc = signalremove_inner(channel, queue, msg);
}
- return !rc;
+ return rc;
}
EXPORT_SYMBOL_GPL(visorchannel_signalremove);
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index e95d04d..ed4eced 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -2000,8 +2000,8 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
static bool
read_controlvm_event(struct controlvm_message *msg)
{
- if (visorchannel_signalremove(controlvm_channel,
- CONTROLVM_QUEUE_EVENT, msg)) {
+ if (!visorchannel_signalremove(controlvm_channel,
+ CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */
if (msg->hdr.flags.test_message == 1)
return false;
@@ -2048,9 +2048,9 @@ controlvm_periodic_work(struct work_struct *work)
bool got_command = false;
bool handle_command_failed = false;
- while (visorchannel_signalremove(controlvm_channel,
- CONTROLVM_QUEUE_RESPONSE,
- &inmsg))
+ while (!visorchannel_signalremove(controlvm_channel,
+ CONTROLVM_QUEUE_RESPONSE,
+ &inmsg))
;
if (!got_command) {
if (controlvm_pending_msg_valid) {
OpenPOWER on IntegriCloud