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


Groups > linux.kernel > #1394475 > unrolled thread

[PATCH 3/4] lightnvm: eliminate redundant variable

Started by"Javier González" <jg@lightnvm.io>
First post2016-05-04 17:40 +0200
Last post2016-05-05 12:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/4] lightnvm: eliminate redundant variable "Javier González" <jg@lightnvm.io> - 2016-05-04 17:40 +0200
    Re: [PATCH 3/4] lightnvm: eliminate redundant variable Matias Bjørling <mb@lightnvm.io> - 2016-05-05 12:00 +0200

#1394475 — [PATCH 3/4] lightnvm: eliminate redundant variable

From"Javier González" <jg@lightnvm.io>
Date2016-05-04 17:40 +0200
Subject[PATCH 3/4] lightnvm: eliminate redundant variable
Message-ID<rv746-6DR-15@gated-at.bofh.it>
Eliminate redundant variable that has been superseded by the new
variables emerging from the Open-Channel SSD spec.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/lightnvm/rrpc.c  | 2 +-
 include/linux/lightnvm.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 72aca96..2103e97 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -1264,7 +1264,7 @@ static sector_t rrpc_capacity(void *private)
 	sector_t reserved, provisioned;
 
 	/* cur, gc, and two emergency blocks for each lun */
-	reserved = rrpc->nr_luns * dev->max_pages_per_blk * 4;
+	reserved = rrpc->nr_luns * dev->sec_per_blk * 4;
 	provisioned = rrpc->nr_sects - reserved;
 
 	if (reserved > rrpc->nr_sects) {
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 272a98b..67e72f5 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -365,7 +365,6 @@ struct nvm_dev {
 	unsigned long total_blocks;
 	unsigned long total_secs;
 	int nr_luns;
-	unsigned max_pages_per_blk;
 
 	unsigned long *lun_map;
 	void *dma_pool;
-- 
2.5.0

[toc] | [next] | [standalone]


#1395002

FromMatias Bjørling <mb@lightnvm.io>
Date2016-05-05 12:00 +0200
Message-ID<rvoeC-626-1@gated-at.bofh.it>
In reply to#1394475
On 05/04/2016 05:31 PM, Javier González wrote:
> Eliminate redundant variable that has been superseded by the new
> variables emerging from the Open-Channel SSD spec.
>
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>   drivers/lightnvm/rrpc.c  | 2 +-
>   include/linux/lightnvm.h | 1 -
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index 72aca96..2103e97 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -1264,7 +1264,7 @@ static sector_t rrpc_capacity(void *private)
>   	sector_t reserved, provisioned;
>
>   	/* cur, gc, and two emergency blocks for each lun */
> -	reserved = rrpc->nr_luns * dev->max_pages_per_blk * 4;
> +	reserved = rrpc->nr_luns * dev->sec_per_blk * 4;
>   	provisioned = rrpc->nr_sects - reserved;
>
>   	if (reserved > rrpc->nr_sects) {
> diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
> index 272a98b..67e72f5 100644
> --- a/include/linux/lightnvm.h
> +++ b/include/linux/lightnvm.h
> @@ -365,7 +365,6 @@ struct nvm_dev {
>   	unsigned long total_blocks;
>   	unsigned long total_secs;
>   	int nr_luns;
> -	unsigned max_pages_per_blk;
>
>   	unsigned long *lun_map;
>   	void *dma_pool;
>
Thanks Javier. Applied for 4.7. I also updated the patch description.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web