target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c
static void nmbm_scan_badblocks(struct nmbm_instance *ni)
{
	uint32_t ba;

	for (ba = 0; ba < ni->block_count; ba++) {
		if (nmbm_check_bad_phys_block(ni, ba)) {
			nmbm_set_block_state(ni, ba, BLOCK_ST_BAD);
			nlog_info(ni, "Bad block %u [0x%08llx]\n", ba,
				 ba2addr(ni, ba));
		}
	}
}
/*
 * nmbm_scan_badblocks - Scan and record all bad blocks
 * @ni: NMBM instance structure
 *
 * Scan the entire lower NAND chip and record all bad blocks in to block state
 * table.
 */
Scan and record all bad blocks
@ni: NMBM instance structure

Scan the entire lower NAND chip and record all bad blocks in to block state
table.
Scan and record all bad blocks @ni : NMBM instance structure Scan the entire lower NAND chip and record all bad blocks in to block state table .
static void nmbm_scan_badblocks(struct nmbm_instance *ni)
{
	uint32_t ba;
	for (ba = 0; ba < ni->block_count; ba++) {
		if (nmbm_check_bad_phys_block(ni, ba)) {
			nmbm_set_block_state(ni, ba, BLOCK_ST_BAD);
			nlog_info(ni, "Bad block %u [0x%08llx]\n", ba,
				 ba2addr(ni, ba));
		}
	}
}
static void nmbm_scan_badblocks ( struct nmbm_instance * ni ) { uint32_t ba ; for ( ba = 0 ; ba < ni -> block_count ; ba ++ ) { if ( nmbm_check_bad_phys_block ( ni , ba ) ) { nmbm_set_block_state ( ni , ba , BLOCK_ST_BAD ) ; nlog_info ( ni , " \n " , ba , ba2addr ( ni , ba ) ) ; } } }
nmbm_scan_badblocks - Scan and record all bad blocks
 @ni: NMBM instance structure
nmbm_scan_badblocks - Scan and record all bad blocks @ni : NMBM instance structure