Quoting Doug Anderson (2020-04-24 10:12:04) > On Thu, Apr 23, 2020 at 9:54 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote: > > + unsigned long i; > > > > - for (i = 0; i < tcs->num_tcs; i++) { > > - if (tcs_is_free(tcs->drv, tcs->offset + i)) > > - return tcs->offset + i; > > - } > > + i = find_next_zero_bit(drv->tcs_in_use, MAX_TCS_NR, tcs->offset); > > Rather than passing MAX_TCS_NR would it be legit to pass "tcs->offset > + tcs->num_tcs"? You are passing that as "size" above in > check_for_req_inflight(). Yeah I think that should work. I'll roll it in.