Ping-Ke Shih <pkshih@xxxxxxxxxxx> writes: >> +static int get_num_chains(u32 mask) >> +{ >> + int num_chains = 0; >> + >> + while (mask) { >> + if (mask & BIT(0)) >> + num_chains++; >> + mask >>= 1; >> + } >> + >> + return num_chains; >> +} > > use hweight32()? Yup, we'll fix that. Thanks! -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches