NTB: ntb_hw_intel: use local variable pdev
authorAllen Hubbe <Allen.Hubbe@emc.com>
Fri, 22 Jul 2016 13:38:23 +0000 (09:38 -0400)
committerJon Mason <jdmason@kudzu.us>
Fri, 5 Aug 2016 14:34:13 +0000 (10:34 -0400)
Clean up duplicated expression by replacing it with the equivalent local
variable pdev.

Signed-off-by: Allen Hubbe <Allen.Hubbe@emc.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/intel/ntb_hw_intel.c

index 5efd037..0d5c29a 100644 (file)
@@ -706,7 +706,7 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
                                 "LMT45 -\t\t\t%#018llx\n", u.v64);
        }
 
-       if (pdev_is_xeon(ndev->ntb.pdev)) {
+       if (pdev_is_xeon(pdev)) {
                if (ntb_topo_is_b2b(ndev->ntb.topo)) {
                        off += scnprintf(buf + off, buf_size - off,
                                         "\nNTB Outgoing B2B XLAT:\n");
@@ -787,22 +787,22 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
                off += scnprintf(buf + off, buf_size - off,
                                 "\nXEON NTB Hardware Errors:\n");
 
-               if (!pci_read_config_word(ndev->ntb.pdev,
+               if (!pci_read_config_word(pdev,
                                          XEON_DEVSTS_OFFSET, &u.v16))
                        off += scnprintf(buf + off, buf_size - off,
                                         "DEVSTS -\t\t%#06x\n", u.v16);
 
-               if (!pci_read_config_word(ndev->ntb.pdev,
+               if (!pci_read_config_word(pdev,
                                          XEON_LINK_STATUS_OFFSET, &u.v16))
                        off += scnprintf(buf + off, buf_size - off,
                                         "LNKSTS -\t\t%#06x\n", u.v16);
 
-               if (!pci_read_config_dword(ndev->ntb.pdev,
+               if (!pci_read_config_dword(pdev,
                                           XEON_UNCERRSTS_OFFSET, &u.v32))
                        off += scnprintf(buf + off, buf_size - off,
                                         "UNCERRSTS -\t\t%#06x\n", u.v32);
 
-               if (!pci_read_config_dword(ndev->ntb.pdev,
+               if (!pci_read_config_dword(pdev,
                                           XEON_CORERRSTS_OFFSET, &u.v32))
                        off += scnprintf(buf + off, buf_size - off,
                                         "CORERRSTS -\t\t%#06x\n", u.v32);