[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0d78bced4d012fc30f0ad70091559d04fa7b13b9.camel@irl.hu>
Date: Sat, 06 Apr 2024 02:00:02 +0200
From: Gergo Koteles <soyer@....hu>
To: Barnabás Pőcze <pobrn@...tonmail.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, Ike Panhc <ike.pan@...onical.com>,
Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Henrique de Moraes Holschuh <hmh@....eng.br>,
linux-acpi@...r.kernel.org, ibm-acpi-devel@...ts.sourceforge.net,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/3] ACPI: platform-profile: add
platform_profile_cycle()
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
Powered by blists - more mailing lists