public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] EDAC: Simplify return statement in dct_ecc_enabled()
@ 2025-02-01 13:09 Thorsten Blum
  2025-02-04 16:53 ` Yazen Ghannam
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thorsten Blum @ 2025-02-01 13:09 UTC (permalink / raw)
  To: Yazen Ghannam, Borislav Petkov, Tony Luck, James Morse,
	Mauro Carvalho Chehab, Robert Richter
  Cc: Thorsten Blum, linux-edac, linux-kernel

Simplify the return statement to improve the code's readability.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/edac/amd64_edac.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 8414ceb43e4a..1f106b4fafdf 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3355,10 +3355,7 @@ static bool dct_ecc_enabled(struct amd64_pvt *pvt)
 
 	edac_dbg(3, "Node %d: DRAM ECC %s.\n", nid, (ecc_en ? "enabled" : "disabled"));
 
-	if (!ecc_en || !nb_mce_en)
-		return false;
-	else
-		return true;
+	return ecc_en && nb_mce_en;
 }
 
 static bool umc_ecc_enabled(struct amd64_pvt *pvt)
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-28 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-01 13:09 [PATCH] EDAC: Simplify return statement in dct_ecc_enabled() Thorsten Blum
2025-02-04 16:53 ` Yazen Ghannam
2025-02-05 12:00 ` Zhuo, Qiuxu
2025-02-24  9:58 ` [RESEND PATCH] " Thorsten Blum
2025-02-28 12:30 ` [PATCH] " Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox