lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1462375892-26533-3-git-send-email-javier@cnexlabs.com>
Date:	Wed,  4 May 2016 17:31:31 +0200
From:	"Javier González" <jg@...htnvm.io>
To:	mb@...htnvm.io
Cc:	linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
	Javier González <javier@...xlabs.com>
Subject: [PATCH 3/4] lightnvm: eliminate redundant variable

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@...xlabs.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ