Make large if() more readable.
Change-Id: Ie43400387ab9f290e744ebaa09786612237e6c7e Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
parent
fa1abc63d2
commit
b7738370b7
|
@ -3050,10 +3050,8 @@ static int handle_target(void *priv)
|
||||||
* allow some slack in the time comparison. Otherwise, if we
|
* allow some slack in the time comparison. Otherwise, if we
|
||||||
* schedule for now+polling_interval, the next poll won't
|
* schedule for now+polling_interval, the next poll won't
|
||||||
* actually happen until a polling_interval later. */
|
* actually happen until a polling_interval later. */
|
||||||
if (!target->tap->enabled ||
|
const bool poll_needed = timeval_ms() + polling_interval / 2 >= target->backoff.next_attempt;
|
||||||
power_dropout ||
|
if (!target->tap->enabled || power_dropout || srst_asserted || !poll_needed)
|
||||||
srst_asserted ||
|
|
||||||
timeval_ms() + polling_interval / 2 < target->backoff.next_attempt)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* polling may fail silently until the target has been examined */
|
/* polling may fail silently until the target has been examined */
|
||||||
|
|
Loading…
Reference in New Issue