* [PATCH] lightnvm: remove already calculated nr_chnls
@ 2017-09-17 21:04 Rakesh Pandit
2017-09-18 7:56 ` Javier González
0 siblings, 1 reply; 3+ messages in thread
From: Rakesh Pandit @ 2017-09-17 21:04 UTC (permalink / raw)
To: Matias Bjørling, linux-block, linux-kernel; +Cc: Javier González
Remove repeated calculation for number of channels while creating a
target device.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
This is also a trivial change I found while investigating/working on
other issue.
drivers/lightnvm/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 1b8338d..01536b8 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);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lightnvm: remove already calculated nr_chnls
2017-09-17 21:04 [PATCH] lightnvm: remove already calculated nr_chnls Rakesh Pandit
@ 2017-09-18 7:56 ` Javier González
[not found] ` <CAOu_J6nFO1iqGvZgDQxPdgoAKhoOAvgR6e7gSeKhS9yq=orZqg@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Javier González @ 2017-09-18 7:56 UTC (permalink / raw)
To: Rakesh Pandit; +Cc: Matias Bjørling, linux-block, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
> On 17 Sep 2017, at 23.04, Rakesh Pandit <rakesh@tuxera.com> wrote:
>
> Remove repeated calculation for number of channels while creating a
> target device.
>
> Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
> ---
>
> This is also a trivial change I found while investigating/working on
> other issue.
>
> drivers/lightnvm/core.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
> index 1b8338d..01536b8 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);
> --
> 2.7.4
We wanted to make sure that nr_chnls was really, really set :)
Reviewed-by: Javier González <javier@cnexlabs.com>
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-21 11:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-17 21:04 [PATCH] lightnvm: remove already calculated nr_chnls Rakesh Pandit
2017-09-18 7:56 ` Javier González
[not found] ` <CAOu_J6nFO1iqGvZgDQxPdgoAKhoOAvgR6e7gSeKhS9yq=orZqg@mail.gmail.com>
2017-09-21 11:14 ` Matias Bjørling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox