projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb00352
)
lightnvm: use constant name instead of value
author
Javier González
<jg@lightnvm.io>
Mon, 28 Nov 2016 21:39:03 +0000
(22:39 +0100)
committer
Jens Axboe
<axboe@fb.com>
Tue, 29 Nov 2016 19:12:51 +0000
(12:12 -0700)
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>
drivers/lightnvm/gennvm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/lightnvm/gennvm.c
b/drivers/lightnvm/gennvm.c
index e969e3a801c47fd2485dee7f36f11d793b69b267..aee5b722ba63bd653596bbd589236dbf4a9cc5e2 100644
(file)
--- 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];