Skip to content

Commit

Permalink
lightnvm: remove already calculated nr_chnls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rakesh Pandit authored and Jens Axboe committed Oct 13, 2017
1 parent 88d31ea commit a96d50f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/lightnvm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a96d50f

Please sign in to comment.