Re: [PATCH v2] Grow: Split Grow_reshape into helper function.

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

 




> 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]





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux