summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2017-10-13 14:45:53 +0200
committerJens Axboe <axboe@kernel.dk>2017-10-13 08:34:57 -0600
commita96d50fa0c8d3e399c49a0a90ddbbaabf8a46bb3 (patch)
tree389d2dbed2891d3a085ab81cabdd72dc28cd23b4
parent88d31ea2676696ad0802a361c8b824f0762fa34c (diff)
downloadlinux-a96d50fa0c8d3e399c49a0a90ddbbaabf8a46bb3.tar.bz2
lightnvm: remove already calculated nr_chnls
Remove repeated calculation for number of channels while creating a target device. Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Reviewed-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/lightnvm/core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index ee2b6d771990..798964f511cd 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -139,7 +139,6 @@ static struct nvm_tgt_dev *nvm_create_tgt_dev(struct nvm_dev *dev,
int prev_nr_luns;
int i, j;
- nr_chnls = nr_luns / dev->geo.luns_per_chnl;
nr_chnls = (nr_chnls_mod == 0) ? nr_chnls : nr_chnls + 1;
dev_map = kmalloc(sizeof(struct nvm_dev_map), GFP_KERNEL);