mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Javier González" <jg@lightnvm.io>
To: mb@lightnvm.io
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>
Subject: [PATCH 3/4] lightnvm: eliminate redundant variable
Date: Wed,  4 May 2016 17:31:31 +0200	[thread overview]
Message-ID: <1462375892-26533-3-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1462375892-26533-1-git-send-email-javier@cnexlabs.com>

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

  parent reply	other threads:[~2016-05-04 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 15:31 [PATCH 1/4] lightnvm: add sync and close block I/O types Javier González
2016-05-04 15:31 ` [PATCH 2/4] lightnvm: rename nr_pages to nr_ppas on nvm_rq Javier González
2016-05-05  9:34   ` Matias Bjørling
2016-05-04 15:31 ` Javier González [this message]
2016-05-05  9:52   ` [PATCH 3/4] lightnvm: eliminate redundant variable Matias Bjørling
2016-05-04 15:31 ` [PATCH 4/4] lightnvm: Precalculate max/min sectors per req Javier González
2016-05-05  9:54   ` Matias Bjørling
2016-05-05 10:02     ` Javier González
2016-05-05  9:21 ` [PATCH 1/4] lightnvm: add sync and close block I/O types Matias Bjørling
2016-05-05  9:38   ` Javier González
2016-05-05 10:08     ` Matias Bjørling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462375892-26533-3-git-send-email-javier@cnexlabs.com \
    --to=jg@lightnvm.io \
    --cc=javier@cnexlabs.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®