Skip to content

Commit 753bc23

Browse files
committed
ipmi:si: Merge some if statements
Changes resulted in a silly looking piece of logic. Get rid of a goto and use if statements properly. Signed-off-by: Corey Minyard <corey@minyard.net>
1 parent bbfb835 commit 753bc23

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,22 +1096,18 @@ static void smi_timeout(struct timer_list *t)
10961096
/* Running with interrupts, only do long timeouts. */
10971097
timeout = jiffies + SI_TIMEOUT_JIFFIES;
10981098
smi_inc_stat(smi_info, long_timeouts);
1099-
goto do_mod_timer;
1100-
}
1101-
1102-
/*
1103-
* If the state machine asks for a short delay, then shorten
1104-
* the timer timeout.
1105-
*/
1106-
if (smi_result == SI_SM_CALL_WITH_DELAY) {
1099+
} else if (smi_result == SI_SM_CALL_WITH_DELAY) {
1100+
/*
1101+
* If the state machine asks for a short delay, then shorten
1102+
* the timer timeout.
1103+
*/
11071104
smi_inc_stat(smi_info, short_timeouts);
11081105
timeout = jiffies + 1;
11091106
} else {
11101107
smi_inc_stat(smi_info, long_timeouts);
11111108
timeout = jiffies + SI_TIMEOUT_JIFFIES;
11121109
}
11131110

1114-
do_mod_timer:
11151111
if (smi_result != SI_SM_IDLE)
11161112
smi_mod_timer(smi_info, timeout);
11171113
else

0 commit comments

Comments
 (0)