summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-recovery.c
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-06-26 11:57:12 +0200
committerJens Axboe <axboe@kernel.dk>2017-06-27 00:24:53 +0200
commitcaa69fa560025d12c276abd62d58a87b94324708 (patch)
tree39d0e7ee808b05a2312b4133061e906a0d3a3410 /drivers/lightnvm/pblk-recovery.c
parentlightnvm: propagate right error code to target (diff)
downloadlinux-caa69fa560025d12c276abd62d58a87b94324708.tar.xz
linux-caa69fa560025d12c276abd62d58a87b94324708.zip
lightnvm: pblk: spare double cpu_to_le64 calc.
Spare a double calculation on the fast write path. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <matias@cnexlabs.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--drivers/lightnvm/pblk-recovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
index f8f85087cd3c..82787006b865 100644
--- a/drivers/lightnvm/pblk-recovery.c
+++ b/drivers/lightnvm/pblk-recovery.c
@@ -390,12 +390,12 @@ next_pad_rq:
for (j = 0; j < pblk->min_write_pgs; j++, i++, w_ptr++) {
struct ppa_addr dev_ppa;
+ u64 addr_empty = cpu_to_le64(ADDR_EMPTY);
dev_ppa = addr_to_gen_ppa(pblk, w_ptr, line->id);
pblk_map_invalidate(pblk, dev_ppa);
- meta_list[i].lba = cpu_to_le64(ADDR_EMPTY);
- lba_list[w_ptr] = cpu_to_le64(ADDR_EMPTY);
+ lba_list[w_ptr] = meta_list[i].lba = addr_empty;
rqd->ppa_list[i] = dev_ppa;
}
}