diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2013-06-21 14:36:34 -0400 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2013-12-16 15:54:35 -0500 |
commit | 68608c268bf265b039daeaafee6c902dfef32024 (patch) | |
tree | baa12f3b00233d56776087f992bb0f616b1173e2 | |
parent | 0a8d44cb33377969337fa6c1961b631605d5f453 (diff) |
NVMe: Cache dev->pci_dev in a local pointer
Helps with line-length issues
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
-rw-r--r-- | drivers/block/nvme-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 0e9c5dcb2bd7..300766973d76 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c | |||
@@ -1891,6 +1891,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev) | |||
1891 | */ | 1891 | */ |
1892 | static int nvme_dev_add(struct nvme_dev *dev) | 1892 | static int nvme_dev_add(struct nvme_dev *dev) |
1893 | { | 1893 | { |
1894 | struct pci_dev *pdev = dev->pci_dev; | ||
1894 | int res; | 1895 | int res; |
1895 | unsigned nn, i; | 1896 | unsigned nn, i; |
1896 | struct nvme_ns *ns; | 1897 | struct nvme_ns *ns; |
@@ -1900,8 +1901,7 @@ static int nvme_dev_add(struct nvme_dev *dev) | |||
1900 | dma_addr_t dma_addr; | 1901 | dma_addr_t dma_addr; |
1901 | int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; | 1902 | int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; |
1902 | 1903 | ||
1903 | mem = dma_alloc_coherent(&dev->pci_dev->dev, 8192, &dma_addr, | 1904 | mem = dma_alloc_coherent(&pdev->dev, 8192, &dma_addr, GFP_KERNEL); |
1904 | GFP_KERNEL); | ||
1905 | if (!mem) | 1905 | if (!mem) |
1906 | return -ENOMEM; | 1906 | return -ENOMEM; |
1907 | 1907 | ||
@@ -1919,8 +1919,8 @@ static int nvme_dev_add(struct nvme_dev *dev) | |||
1919 | memcpy(dev->firmware_rev, ctrl->fr, sizeof(ctrl->fr)); | 1919 | memcpy(dev->firmware_rev, ctrl->fr, sizeof(ctrl->fr)); |
1920 | if (ctrl->mdts) | 1920 | if (ctrl->mdts) |
1921 | dev->max_hw_sectors = 1 << (ctrl->mdts + shift - 9); | 1921 | dev->max_hw_sectors = 1 << (ctrl->mdts + shift - 9); |
1922 | if ((dev->pci_dev->vendor == PCI_VENDOR_ID_INTEL) && | 1922 | if ((pdev->vendor == PCI_VENDOR_ID_INTEL) && |
1923 | (dev->pci_dev->device == 0x0953) && ctrl->vs[3]) | 1923 | (pdev->device == 0x0953) && ctrl->vs[3]) |
1924 | dev->stripe_size = 1 << (ctrl->vs[3] + shift); | 1924 | dev->stripe_size = 1 << (ctrl->vs[3] + shift); |
1925 | 1925 | ||
1926 | id_ns = mem; | 1926 | id_ns = mem; |