Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1250501

[PATCH 2/8] x86/amd_nb, EDAC: Rename amd_get_node_id()

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject [PATCH 2/8] x86/amd_nb, EDAC: Rename amd_get_node_id()
Date 2015-10-19 11:30 +0200
Message-ID <qleVt-aI-15@gated-at.bofh.it> (permalink)
References <qleLL-8ro-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>

This function doesn't give us the "Node ID" as the function name
suggests. Rather, it receives a PCI device as argument, checks the
available F3 PCI device IDs in the system and returns the index of the
matching Bus/Device IDs.

Rename it to amd_pci_dev_to_node_id().

No functional change is introduced.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Suggested-by: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1444742394-3974-1-git-send-email-Aravind.Gopalakrishnan@amd.com
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/include/asm/amd_nb.h | 2 +-
 drivers/edac/amd64_edac.c     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index 1a5da2e63aee..3c56ef1ae068 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -81,7 +81,7 @@ static inline struct amd_northbridge *node_to_amd_nb(int node)
 	return (node < amd_northbridges.num) ? &amd_northbridges.nb[node] : NULL;
 }
 
-static inline u16 amd_get_node_id(struct pci_dev *pdev)
+static inline u16 amd_pci_dev_to_node_id(struct pci_dev *pdev)
 {
 	struct pci_dev *misc;
 	int i;
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 73aea40a9c89..d5fcdbfd99b8 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2770,7 +2770,7 @@ static int init_one_instance(struct pci_dev *F2)
 	struct mem_ctl_info *mci = NULL;
 	struct edac_mc_layer layers[2];
 	int err = 0, ret;
-	u16 nid = amd_get_node_id(F2);
+	u16 nid = amd_pci_dev_to_node_id(F2);
 
 	ret = -ENOMEM;
 	pvt = kzalloc(sizeof(struct amd64_pvt), GFP_KERNEL);
@@ -2860,7 +2860,7 @@ err_ret:
 static int probe_one_instance(struct pci_dev *pdev,
 			      const struct pci_device_id *mc_type)
 {
-	u16 nid = amd_get_node_id(pdev);
+	u16 nid = amd_pci_dev_to_node_id(pdev);
 	struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
 	struct ecc_settings *s;
 	int ret = 0;
@@ -2910,7 +2910,7 @@ static void remove_one_instance(struct pci_dev *pdev)
 {
 	struct mem_ctl_info *mci;
 	struct amd64_pvt *pvt;
-	u16 nid = amd_get_node_id(pdev);
+	u16 nid = amd_pci_dev_to_node_id(pdev);
 	struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
 	struct ecc_settings *s = ecc_stngs[nid];
 
-- 
2.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] tip-queue 2015-10-19 Borislav Petkov <bp@alien8.de> - 2015-10-19 11:20 +0200
  [PATCH 8/8] x86/mce: Fix thermal throttling reporting after kexec Borislav Petkov <bp@alien8.de> - 2015-10-19 11:20 +0200
    [tip:ras/core] x86/mce:   Fix thermal throttling reporting after kexec tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-10-21 12:10 +0200
  [PATCH 6/8] x86/setup/crash: Check memblock_reserve() retval Borislav Petkov <bp@alien8.de> - 2015-10-19 11:20 +0200
    [tip:ras/core] x86/setup/crash: Check memblock_reserve() retval tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-10-21 12:10 +0200
  [PATCH 3/8] x86/setup: Cleanup crashkernel reservation functions Borislav Petkov <bp@alien8.de> - 2015-10-19 11:30 +0200
    [tip:ras/core] x86/setup:   Cleanup crashkernel reservation functions tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-10-21 12:10 +0200
  [PATCH 2/8] x86/amd_nb, EDAC: Rename amd_get_node_id() Borislav Petkov <bp@alien8.de> - 2015-10-19 11:30 +0200
    [tip:ras/core] x86/amd_nb, EDAC: Rename amd_get_node_id() tip-bot for Aravind Gopalakrishnan <tipbot@zytor.com> - 2015-10-21 12:10 +0200

csiph-web