summaryrefslogtreecommitdiff
path: root/drivers/staging/hv/connection.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-04-16 18:50:39 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-20 13:40:33 -0700
commit242b45aa8d93f7fc46ed551db9eb06cc33da7167 (patch)
tree7bce96b0e10f09aa2706d9fb90adfc18744d99d3 /drivers/staging/hv/connection.c
parentb3ee87081ccc3a5c4394d97ae1a13944b5072e81 (diff)
hv: Reduce indention in vmbus_on_event
Reduce indention in vmbus_on_event() by converting two if (var) to if (!var) Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/connection.c')
-rw-r--r--drivers/staging/hv/connection.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/staging/hv/connection.c b/drivers/staging/hv/connection.c
index b71ed271952..ccc5b4adabf 100644
--- a/drivers/staging/hv/connection.c
+++ b/drivers/staging/hv/connection.c
@@ -287,30 +287,23 @@ void vmbus_on_event(unsigned long data)
u32 *recv_int_page = vmbus_connection.recv_int_page;
/* Check events */
- if (recv_int_page) {
- for (dword = 0; dword < maxdword; dword++) {
- if (recv_int_page[dword]) {
- for (bit = 0; bit < 32; bit++) {
- if (sync_test_and_clear_bit(bit,
- (unsigned long *)
- &recv_int_page[dword])) {
- relid = (dword << 5) + bit;
-
- if (relid == 0) {
- /* special case - vmbus channel protocol msg */
- continue;
- } else {
- /* QueueWorkItem(VmbusProcessEvent, (void*)relid); */
- /* ret = WorkQueueQueueWorkItem(gVmbusConnection.workQueue, VmbusProcessChannelEvent, (void*)relid); */
- process_chn_event((void *)
- (unsigned long)relid);
- }
- }
+ if (!recv_int_page)
+ return;
+ for (dword = 0; dword < maxdword; dword++) {
+ if (!recv_int_page[dword])
+ continue;
+ for (bit = 0; bit < 32; bit++) {
+ if (sync_test_and_clear_bit(bit, (unsigned long *)&recv_int_page[dword])) {
+ relid = (dword << 5) + bit;
+
+ if (relid == 0) {
+ /* special case - vmbus channel protocol msg */
+ continue;
}
+ process_chn_event((void *) (unsigned long)relid);
}
- }
+ }
}
- return;
}
/*