On Thu, Apr 02, 2015 at 04:21:22PM +0530, Viresh Kumar wrote:
+#define for_each_active_base(_index, _base, _cpu_base, _active_bases) \
- for ((_active_bases) = (_cpu_base)->active_bases; \
(_index) = ffs(_active_bases), \
(_base) = (_cpu_base)->clock_base + (_index) - 1, (_index); \
(_active_bases) &= ~(1 << ((_index) - 1)))
Can't use ffs here, some people end up using asm-generic/bitops/ffs.h and that sucks.
Esp for small vectors like here, the unconditional iteration is faster.