> 2022年6月1日 19:22,Paul Menzel <pmenzel@xxxxxxxxxxxxx> 写道: >> [snipped] >> +/** >> + * is_bit_set() - get bit value by index. >> + * @val: value. >> + * @index: index of the bit (LSB numbering). >> + * >> + * Return: bit value. >> + */ >> +bool is_bit_set(int *val, unsigned char index) >> +{ >> + if ((*val) & (1 << index)) >> + return true; >> + return false; > > Maybe: > > return (*val) & (1 << index) The above line doesn’t return bool value range, otherwise it returns !!((*val) & (1 << index). I am OK with either of them, what the patch does is fine to me. Coly Li [snipped]