target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c
static uint32_t nmbm_get_spare_block_count(uint32_t block_count)
{
	uint32_t val;

	val = (block_count + NMBM_SPARE_BLOCK_DIV / 2) / NMBM_SPARE_BLOCK_DIV;
	val *= NMBM_SPARE_BLOCK_MULTI;

	if (val < NMBM_SPARE_BLOCK_MIN)
		val = NMBM_SPARE_BLOCK_MIN;

	return val;
}
/*
 * nmbm_get_spare_block_count - Calculate number of blocks should be reserved
 * @block_count: number of blocks of data
 *
 * Calculate number of blocks should be reserved for data
 */
Calculate number of blocks should be reserved
@block_count: number of blocks of data

Calculate number of blocks should be reserved for data
Calculate number of blocks should be reserved @block_count : number of blocks of data Calculate number of blocks should be reserved for data
static uint32_t nmbm_get_spare_block_count(uint32_t block_count)
{
	uint32_t val;
	val = (block_count + NMBM_SPARE_BLOCK_DIV / 2) / NMBM_SPARE_BLOCK_DIV;
	val *= NMBM_SPARE_BLOCK_MULTI;
	if (val < NMBM_SPARE_BLOCK_MIN)
		val = NMBM_SPARE_BLOCK_MIN;
	return val;
}
static uint32_t nmbm_get_spare_block_count ( uint32_t block_count ) { uint32_t val ; val = ( block_count + NMBM_SPARE_BLOCK_DIV / 2 ) / NMBM_SPARE_BLOCK_DIV ; val *= NMBM_SPARE_BLOCK_MULTI ; if ( val < NMBM_SPARE_BLOCK_MIN ) val = NMBM_SPARE_BLOCK_MIN ; return val ; }
nmbm_get_spare_block_count - Calculate number of blocks should be reserved
 @block_count: number of blocks of data
nmbm_get_spare_block_count - Calculate number of blocks should be reserved @block_count : number of blocks of data