Re: [PATCH v4 1/3] ACPI: platform-profile: add platform_profile_cycle()

From: Gergo Koteles
Date: Fri Apr 05 2024 - 20:00:25 EST


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