From b2b1ec9b55ed0840956db15f823c4a73383c08be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matias=20Bj=C3=B8rling?= Date: Tue, 18 Aug 2015 10:13:41 -0600 Subject: [PATCH] NVMe: removed unused nn var from nvme_dev_add MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The logic in nvme_dev_add to enumerate namespaces was moved to nvme_dev_scan. When moved, the nn variable is no longer used. This patch removes it. Fixes: a5768aai ("NVMe: Automatic namespace rescan") Signed-off-by: Matias Bjørling Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- drivers/block/nvme-core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 2e16000..85cd33b 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -2447,7 +2447,6 @@ static int nvme_dev_add(struct nvme_dev *dev) { struct pci_dev *pdev = to_pci_dev(dev->dev); int res; - unsigned nn; struct nvme_id_ctrl *ctrl; int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; @@ -2457,7 +2456,6 @@ static int nvme_dev_add(struct nvme_dev *dev) return -EIO; } - nn = le32_to_cpup(&ctrl->nn); dev->oncs = le16_to_cpup(&ctrl->oncs); dev->abort_limit = ctrl->acl + 1; dev->vwc = ctrl->vwc; -- 2.7.4