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

staging: unisys: refactor parahotplug_process_list()

Simplify the code a little and shorten the indentation levels by
reversing the check for time_after_eq().
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cafefc0c
...@@ -1535,7 +1535,10 @@ parahotplug_process_list(void) ...@@ -1535,7 +1535,10 @@ parahotplug_process_list(void)
list_for_each_safe(pos, tmp, &Parahotplug_request_list) { list_for_each_safe(pos, tmp, &Parahotplug_request_list) {
struct parahotplug_request *req = struct parahotplug_request *req =
list_entry(pos, struct parahotplug_request, list); list_entry(pos, struct parahotplug_request, list);
if (time_after_eq(jiffies, req->expiration)) {
if (!time_after_eq(jiffies, req->expiration))
continue;
list_del(pos); list_del(pos);
if (req->msg.hdr.flags.response_expected) if (req->msg.hdr.flags.response_expected)
controlvm_respond_physdev_changestate( controlvm_respond_physdev_changestate(
...@@ -1544,7 +1547,6 @@ parahotplug_process_list(void) ...@@ -1544,7 +1547,6 @@ parahotplug_process_list(void)
req->msg.cmd.device_change_state.state); req->msg.cmd.device_change_state.state);
parahotplug_request_destroy(req); parahotplug_request_destroy(req);
} }
}
spin_unlock(&Parahotplug_request_list_lock); spin_unlock(&Parahotplug_request_list_lock);
} }
...@@ -1621,7 +1623,7 @@ parahotplug_process_message(struct controlvm_message *inmsg) ...@@ -1621,7 +1623,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
* indicated it's done. * indicated it's done.
*/ */
spin_lock(&Parahotplug_request_list_lock); spin_lock(&Parahotplug_request_list_lock);
list_add_tail(&(req->list), &Parahotplug_request_list); list_add_tail(&req->list, &Parahotplug_request_list);
spin_unlock(&Parahotplug_request_list_lock); spin_unlock(&Parahotplug_request_list_lock);
parahotplug_request_kickoff(req); parahotplug_request_kickoff(req);
......
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