linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Aravind Gopalakrishnan <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mchehab@osg.samsung.com, peterz@infradead.org, mingo@kernel.org,
	linux-edac@vger.kernel.org, hpa@zytor.com,
	torvalds@linux-foundation.org, Suravee.Suthikulpanit@amd.com,
	Aravind.Gopalakrishnan@amd.com, bp@suse.de, tglx@linutronix.de,
	linux-kernel@vger.kernel.org
Subject: [tip:ras/core] x86/amd_nb, EDAC: Rename amd_get_node_id()
Date: Wed, 21 Oct 2015 03:04:25 -0700	[thread overview]
Message-ID: <tip-1a6775c1a2c2ed863699403cda517916c22aeb72@git.kernel.org> (raw)
In-Reply-To: <1445246268-26285-3-git-send-email-bp@alien8.de>

Commit-ID:  1a6775c1a2c2ed863699403cda517916c22aeb72
Gitweb:     http://git.kernel.org/tip/1a6775c1a2c2ed863699403cda517916c22aeb72
Author:     Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
AuthorDate: Mon, 19 Oct 2015 11:17:42 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 21 Oct 2015 11:10:55 +0200

x86/amd_nb, EDAC: Rename amd_get_node_id()

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.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1445246268-26285-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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 1a5da2e..3c56ef1 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 73aea40..d5fcdbf 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];
 

  reply	other threads:[~2015-10-21 10:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19  9:17 [PATCH 0/8] tip-queue 2015-10-19 Borislav Petkov
2015-10-19  9:17 ` [PATCH 1/8] x86/setup: Do not reserve crashkernel high memory if low reservation failed Borislav Petkov
2015-10-21 10:04   ` [tip:ras/core] " tip-bot for Baoquan He
2015-10-19  9:17 ` [PATCH 2/8] x86/amd_nb, EDAC: Rename amd_get_node_id() Borislav Petkov
2015-10-21 10:04   ` tip-bot for Aravind Gopalakrishnan [this message]
2015-10-19  9:17 ` [PATCH 3/8] x86/setup: Cleanup crashkernel reservation functions Borislav Petkov
2015-10-21 10:04   ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19  9:17 ` [PATCH 4/8] x86/setup/crash: Remove alignment variable Borislav Petkov
2015-10-21 10:05   ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19  9:17 ` [PATCH 5/8] x86/setup/crash: Cleanup some more Borislav Petkov
2015-10-21 10:05   ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19  9:17 ` [PATCH 6/8] x86/setup/crash: Check memblock_reserve() retval Borislav Petkov
2015-10-21 10:05   ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19  9:17 ` [PATCH 7/8] kexec/crash: Say which char is the unrecognized Borislav Petkov
2015-10-21 10:06   ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19  9:17 ` [PATCH 8/8] x86/mce: Fix thermal throttling reporting after kexec Borislav Petkov
2015-10-21 10:06   ` [tip:ras/core] " tip-bot for Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-1a6775c1a2c2ed863699403cda517916c22aeb72@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).