Commit 8a285327 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: move read_controlvm_event

The function read_controlvm_event needs to be moved lower in the file
to avoid extraneous function prototypes.
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <Timothy.Sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 511474a5
...@@ -1357,27 +1357,6 @@ chipset_notready(struct controlvm_message_header *msg_hdr) ...@@ -1357,27 +1357,6 @@ chipset_notready(struct controlvm_message_header *msg_hdr)
controlvm_respond(msg_hdr, rc); controlvm_respond(msg_hdr, rc);
} }
/**
* read_controlvm_event() - retreives the next message from the
* CONTROLVM_QUEUE_EVENT queue in the controlvm
* channel
* @msg: pointer to the retrieved message
*
* Return: true if a valid message was retrieved or false otherwise
*/
static bool
read_controlvm_event(struct controlvm_message *msg)
{
if (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */
if (msg->hdr.flags.test_message == 1)
return false;
return true;
}
return false;
}
/* /*
* The general parahotplug flow works as follows. The visorchipset * The general parahotplug flow works as follows. The visorchipset
* driver receives a DEVICE_CHANGESTATE message from Command * driver receives a DEVICE_CHANGESTATE message from Command
...@@ -2091,6 +2070,27 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr) ...@@ -2091,6 +2070,27 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
return true; return true;
} }
/**
* read_controlvm_event() - retreives the next message from the
* CONTROLVM_QUEUE_EVENT queue in the controlvm
* channel
* @msg: pointer to the retrieved message
*
* Return: true if a valid message was retrieved or false otherwise
*/
static bool
read_controlvm_event(struct controlvm_message *msg)
{
if (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */
if (msg->hdr.flags.test_message == 1)
return false;
return true;
}
return false;
}
static void static void
controlvm_periodic_work(struct work_struct *work) controlvm_periodic_work(struct work_struct *work)
{ {
......
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