Skip to content

Commit 95f1464

Browse files
Allen Hubbejonmason
authored andcommitted
NTB: ntb_hw_intel: use local variable pdev
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>
1 parent 4089527 commit 95f1464

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/ntb/hw/intel/ntb_hw_intel.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
706706
"LMT45 -\t\t\t%#018llx\n", u.v64);
707707
}
708708

709-
if (pdev_is_xeon(ndev->ntb.pdev)) {
709+
if (pdev_is_xeon(pdev)) {
710710
if (ntb_topo_is_b2b(ndev->ntb.topo)) {
711711
off += scnprintf(buf + off, buf_size - off,
712712
"\nNTB Outgoing B2B XLAT:\n");
@@ -787,22 +787,22 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
787787
off += scnprintf(buf + off, buf_size - off,
788788
"\nXEON NTB Hardware Errors:\n");
789789

790-
if (!pci_read_config_word(ndev->ntb.pdev,
790+
if (!pci_read_config_word(pdev,
791791
XEON_DEVSTS_OFFSET, &u.v16))
792792
off += scnprintf(buf + off, buf_size - off,
793793
"DEVSTS -\t\t%#06x\n", u.v16);
794794

795-
if (!pci_read_config_word(ndev->ntb.pdev,
795+
if (!pci_read_config_word(pdev,
796796
XEON_LINK_STATUS_OFFSET, &u.v16))
797797
off += scnprintf(buf + off, buf_size - off,
798798
"LNKSTS -\t\t%#06x\n", u.v16);
799799

800-
if (!pci_read_config_dword(ndev->ntb.pdev,
800+
if (!pci_read_config_dword(pdev,
801801
XEON_UNCERRSTS_OFFSET, &u.v32))
802802
off += scnprintf(buf + off, buf_size - off,
803803
"UNCERRSTS -\t\t%#06x\n", u.v32);
804804

805-
if (!pci_read_config_dword(ndev->ntb.pdev,
805+
if (!pci_read_config_dword(pdev,
806806
XEON_CORERRSTS_OFFSET, &u.v32))
807807
off += scnprintf(buf + off, buf_size - off,
808808
"CORERRSTS -\t\t%#06x\n", u.v32);

0 commit comments

Comments
 (0)