diff options
author | Javier González <jg@lightnvm.io> | 2017-06-26 11:57:12 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-26 16:24:53 -0600 |
commit | caa69fa560025d12c276abd62d58a87b94324708 (patch) | |
tree | 39d0e7ee808b05a2312b4133061e906a0d3a3410 /drivers/lightnvm/pblk-map.c | |
parent | 613fa267c3fa2bdf92d005a4d0fa911bc84f17f4 (diff) | |
download | linux-caa69fa560025d12c276abd62d58a87b94324708.tar.gz linux-caa69fa560025d12c276abd62d58a87b94324708.tar.bz2 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 'drivers/lightnvm/pblk-map.c')
-rw-r--r-- | drivers/lightnvm/pblk-map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-map.c b/drivers/lightnvm/pblk-map.c index 17c16955284d..18291c238930 100644 --- a/drivers/lightnvm/pblk-map.c +++ b/drivers/lightnvm/pblk-map.c @@ -53,8 +53,9 @@ static void pblk_map_page_data(struct pblk *pblk, unsigned int sentry, lba_list[paddr] = cpu_to_le64(w_ctx->lba); le64_add_cpu(&line->emeta->nr_valid_lbas, 1); } else { - meta_list[i].lba = cpu_to_le64(ADDR_EMPTY); - lba_list[paddr] = cpu_to_le64(ADDR_EMPTY); + u64 addr_empty = cpu_to_le64(ADDR_EMPTY); + + lba_list[paddr] = meta_list[i].lba = addr_empty; pblk_map_pad_invalidate(pblk, line, paddr); } } |