NVMe: removed unused nn var from nvme_dev_add
authorMatias Bjørling <m@bjorling.me>
Tue, 18 Aug 2015 16:13:41 +0000 (10:13 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 16:13:41 +0000 (10:13 -0600)
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 <m@bjorling.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c

index 2e16000693bfffa99f45ab4d26e9318150909561..85cd33bf9607ee345362e67cacb744884aade0e7 100644 (file)
@@ -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;