Skip to contentSkip to conversation

Style fixes for EDAC/bluefield driver

PATCH In review David Thompson 2 participants 4 messages Jun 13, 2024

Subsystems (2)
lore
Share & tools
lore

David Thompson

author maintainer
#0 lore raw

v2 cover Style fixes for EDAC/bluefield driver

The bluefield_edac driver needs two coding style fixes: one fix addresses an issue raised by checkpatch, and the other fix provides consistency in declaration of #defines.

David Thompson (2):
EDAC/bluefield: fix white space in bluefield_edac_mc_probe EDAC/bluefield: fix prefix for GET_DIMM_INFO defines

 drivers/edac/bluefield_edac.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
2.30.1
author maintainer
#1 lore raw

PATCH v2 1/2 EDAC/bluefield: fix white space in bluefield_edac_mc_probe

The routine bluefield_edac_mc_probe() has an extra empty line, so it must be removed. This extra line is flagged when running "scripts/checkpatch --strict":
CHECK: Blank lines aren't necessary before a close brace '}' #324: FILE: drivers/edac/bluefield_edac.c:324:
+
+}

---
v2
- Updated commit message per review comments

---
 drivers/edac/bluefield_edac.c | 1 -
 1 file changed, 1 deletion(-)
drivers/edac/bluefield_edac.c +0 -1
index 5b3164560648..1f6f39a7dbf3 100644
@@ -320,7 +320,6 @@ static int bluefield_edac_mc_probe(struct platform_device *pdev)
 	edac_mc_free(mci);
 
 	return ret;
-
 }
 
 static void bluefield_edac_mc_remove(struct platform_device *pdev)
Signature · 1 line
2.30.1
maintainer
#2 lore raw

Re: [PATCH v2 1/2] EDAC/bluefield: fix white space in bluefield_edac_mc_probe

Quoted 23 lines · David Thompson

The routine bluefield_edac_mc_probe() has an extra empty line, so it must be removed. This extra line is flagged when running "scripts/checkpatch --strict":
CHECK: Blank lines aren't necessary before a close brace '}' #324: FILE: drivers/edac/bluefield_edac.c:324:
+
+}

---
v2
- Updated commit message per review comments

---
 drivers/edac/bluefield_edac.c | 1 -
 1 file changed, 1 deletion(-)
drivers/edac/bluefield_edac.c +0 -0
index 5b3164560648..1f6f39a7dbf3 100644

drivers/edac/bluefield_edac.c static int bluefield_edac_mc_probe(struct platform_device *pdev) · line 325

Quoted 7 lines
drivers/edac/bluefield_edac.c +0 -1
@@ -320,7 +320,6 @@ static int bluefield_edac_mc_probe(struct platform_device *pdev)
 	edac_mc_free(mci);
 
 	return ret;
-
 }
 
 static void bluefield_edac_mc_remove(struct platform_device *pdev)

Did you get my reply to this and did you read it?

https://lore.kernel.org/r/20240612200056.GGZmn-eO15ePolbAPo@fat_crate.local

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
author maintainer
#3 lore raw

PATCH v2 2/2 EDAC/bluefield: fix prefix for GET_DIMM_INFO defines

In reply to David Thompson

The GET_DIMM_INFO defines used by the driver have an "MLNX_" prefix. This prefix does not align with the other #defines in the driver, which use an "MLXBF_" prefix. The driver must be consistent in its prefix usage, so align them to use "MLXBF_" prefix.

---
v2
- Updated commit message per review comments

---
 drivers/edac/bluefield_edac.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/edac/bluefield_edac.c +4 -4
index 1f6f39a7dbf3..8f1cc029606f 100644
@@ -48,12 +48,12 @@
 #define MLXBF_EDAC_ERROR_GRAIN		8
 
 /*
- * Request MLNX_SIP_GET_DIMM_INFO
+ * Request MLXBF_SIP_GET_DIMM_INFO
  *
  * Retrieve information about DIMM on a certain slot.
  *
  * Call register usage:
- * a0: MLNX_SIP_GET_DIMM_INFO
+ * a0: MLXBF_SIP_GET_DIMM_INFO
  * a1: (Memory controller index) << 16 | (Dimm index in memory controller)
  * a2-7: not used.
  *
@@ -61,7 +61,7 @@
  * a0: MLXBF_DIMM_INFO defined below describing the DIMM.
  * a1-3: not used.
  */
-#define MLNX_SIP_GET_DIMM_INFO		0x82000008
+#define MLXBF_SIP_GET_DIMM_INFO		0x82000008
 
 /* Format for the SMC response about the memory information */
 #define MLXBF_DIMM_INFO__SIZE_GB GENMASK_ULL(15, 0)
@@ -189,7 +189,7 @@ static void bluefield_edac_init_dimms(struct mem_ctl_info *mci)
 		dimm = mci->dimms[i];
 
 		smc_arg = mem_ctrl_idx << 16 | i;
-		smc_info = smc_call1(MLNX_SIP_GET_DIMM_INFO, smc_arg);
+		smc_info = smc_call1(MLXBF_SIP_GET_DIMM_INFO, smc_arg);
 
 		if (!FIELD_GET(MLXBF_DIMM_INFO__SIZE_GB, smc_info)) {
 			dimm->mtype = MEM_EMPTY;
Signature · 1 line
2.30.1