From 98379a12c54974ee5856dcf81781a5dc845505c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Gonz=C3=A1lez?= Date: Mon, 28 Nov 2016 22:39:03 +0100 Subject: [PATCH] lightnvm: use constant name instead of value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There is a constant to refer to free blocks. Use it when marking bad blocks instead of using a constant value Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- drivers/lightnvm/gennvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index e969e3a801c4..aee5b722ba63 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/gennvm.c @@ -279,7 +279,7 @@ static int gen_block_bb(struct gen_dev *gn, struct ppa_addr ppa, lun = &gn->luns[(dev->luns_per_chnl * ppa.g.ch) + ppa.g.lun]; for (i = 0; i < nr_blks; i++) { - if (blks[i] == 0) + if (blks[i] == NVM_BLK_T_FREE) continue; blk = &lun->vlun.blocks[i]; -- 2.39.5