summaryrefslogtreecommitdiff
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2016-11-28 22:39:03 +0100
committerJens Axboe <axboe@fb.com>2016-11-29 12:12:51 -0700
commit98379a12c54974ee5856dcf81781a5dc845505c3 (patch)
treeba7c87b84b32e1c1ad6534739449efebf34cdcc0 /drivers/lightnvm
parenteb00352b5213e52419ac7dd8bbd84a1300fe4b5d (diff)
lightnvm: use constant name instead of value
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 <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/gennvm.c2
1 files changed, 1 insertions, 1 deletions
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];