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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux