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 Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux