Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1733536 > unrolled thread

[PATCH] lightnvm: remove already calculated nr_chnls

Started byRakesh Pandit <rakesh@tuxera.com>
First post2017-09-17 23:10 +0200
Last post2017-09-21 13:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] lightnvm: remove already calculated nr_chnls Rakesh Pandit <rakesh@tuxera.com> - 2017-09-17 23:10 +0200
    Re: [PATCH] lightnvm: remove already calculated nr_chnls Javier González <jg@lightnvm.io> - 2017-09-18 10:00 +0200
      Re: [PATCH] lightnvm: remove already calculated nr_chnls Matias Bjørling <mb@lightnvm.io> - 2017-09-21 13:20 +0200

#1733536 — [PATCH] lightnvm: remove already calculated nr_chnls

FromRakesh Pandit <rakesh@tuxera.com>
Date2017-09-17 23:10 +0200
Subject[PATCH] lightnvm: remove already calculated nr_chnls
Message-ID<uqOZc-51P-21@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1733716

FromJavier González <jg@lightnvm.io>
Date2017-09-18 10:00 +0200
Message-ID<uqZ8e-3dr-21@gated-at.bofh.it>
In reply to#1733536

[Multipart message — attachments visible in raw view] — view raw

> 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>

[toc] | [prev] | [next] | [standalone]


#1736543

FromMatias Bjørling <mb@lightnvm.io>
Date2017-09-21 13:20 +0200
Message-ID<us7Gq-gp-3@gated-at.bofh.it>
In reply to#1733716
On 09/18/2017 12:56 PM, Matias Bjørling wrote:
> 
> 
> Den 18. sep. 2017 09.56 skrev "Javier González" <jg@lightnvm.io 
> <mailto:jg@lightnvm.io>>:
> 
>      > On 17 Sep 2017, at 23.04, Rakesh Pandit <rakesh@tuxera.com
>     <mailto:rakesh@tuxera.com>> wrote:
>      >
>      > Remove repeated calculation for number of channels while creating a
>      > target device.
>      >
>      > Signed-off-by: Rakesh Pandit <rakesh@tuxera.com
>     <mailto: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
>     <mailto:javier@cnexlabs.com>>
> 
> What the hell... must have been a patch or merge that went wrong.

Thanks Rakesh. I pulled it in for 4.15.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web