lkml.org 
[lkml]   [2023]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 7/7] EDAC/amd64: Move an assignment for the variable “F3” in probe one instance()
From
From: Markus Elfring <elfring@users.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@users.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

\
 
 \ /
  Last update: 2023-12-25 18:47    [W:0.078 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site