Commit 7e396129 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] paride cleanup and fixes (14/25)

Equivalent transformation:
	call of pi_do_claimed() in run_fsm() expanded; recursive
	call of run_fsm() replaced with loop.
parent 1a2300d3
...@@ -215,21 +215,25 @@ static struct request *pd_req; /* current request */ ...@@ -215,21 +215,25 @@ static struct request *pd_req; /* current request */
static void run_fsm(void) static void run_fsm(void)
{ {
while (1) {
enum action res; enum action res;
switch(res = phase()) { switch(res = phase()) {
case Ok: case Fail: case Ok: case Fail:
pi_unclaim(pi_current); pi_unclaim(pi_current);
next_request(res); next_request(res);
break; return;
case Wait: case Wait:
pi_unclaim(pi_current); pi_unclaim(pi_current);
/* fallthrough */ /* fallthrough */
case Claim: case Claim:
pi_do_claimed(pi_current, run_fsm); if (!pi_schedule_claimed(pi_current, run_fsm))
return;
break; break;
case Hold: case Hold:
ps_set_intr(); ps_set_intr();
return;
}
} }
} }
......
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