Hi Barnabás, On Fri, 2024-04-05 at 16:34 +0000, Barnabás Pőcze wrote: > > + next = ffs(cur_profile->choices[0] >> (profile + 1)) + profile; > > + > > + /* current profile is the highest, select the lowest */ > > + if (next == profile) > > + next = ffs(cur_profile->choices[0]) - 1; > > I think you can use `find_next_bit()` or similar instead. > Thanks, it looks much better with find_next_bit_wrap. > Best regards, Gergo