On Wed, 2019-10-02 at 08:17 -0700, Bart Van Assche wrote: > > Both loops check the loop termination condition twice. Has it been > considered to write these loops such that the loop termination > condition > is only tested once, e.g. using the following pattern? > > for (i = 0; i < 10; i++) > if (wait_event_timeout(...) > 0) > break; > Right, that's probably better. This was just meant as a minimal, temporary fix for the already applied patch. I expect Himanshu or Quinn to follow up anyway. I also still think that it'd be better to get the wake_up() calls right and not have to loop over wait_event_timeout() at all. Thanks, Martin