[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <15936ac5-5380-42fa-b13a-e6b2ccf92490@web.de>
Date: Mon, 25 Dec 2023 18:46:22 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linux-edac@...r.kernel.org, kernel-janitors@...r.kernel.org,
Borislav Petkov <bp@...en8.de>, James Morse <james.morse@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Robert Richter
<rric@...nel.org>, Tony Luck <tony.luck@...el.com>,
Yazen Ghannam <yazen.ghannam@....com>
Cc: LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr,
Muralidhara M K <muralidhara.mk@....com>
Subject: [PATCH 7/7] EDAC/amd64: Move an assignment for the variable “F3” in probe_one_instance()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 25 Dec 2023 17:54:33 +0100
Move one assignment for a local variable so that its setting will only
be performed immediately before this pointer is used.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/edac/amd64_edac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 698cde573847..91e0abdf762f 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -4263,7 +4263,7 @@ static bool instance_has_memory(struct amd64_pvt *pvt)
static int probe_one_instance(unsigned int nid)
{
- struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
+ struct pci_dev *F3;
struct amd64_pvt *pvt;
struct ecc_settings *s;
int ret;
@@ -4281,6 +4281,7 @@ static int probe_one_instance(unsigned int nid)
}
pvt->mc_node_id = nid;
+ F3 = node_to_amd_nb(nid)->misc;
pvt->F3 = F3;
ret = per_family_init(pvt);
--
2.43.0
Powered by blists - more mailing lists