[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134F69FBDBC05FEC0C4815089F72@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Wed, 5 Feb 2025 12:00:42 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Yazen Ghannam
<yazen.ghannam@....com>, Borislav Petkov <bp@...en8.de>, "Luck, Tony"
<tony.luck@...el.com>, James Morse <james.morse@....com>, "Mauro Carvalho
Chehab" <mchehab@...nel.org>, Robert Richter <rric@...nel.org>
CC: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] EDAC: Simplify return statement in dct_ecc_enabled()
> From: Thorsten Blum <thorsten.blum@...ux.dev>
> [...]
> Subject: [PATCH] EDAC: Simplify return statement in dct_ecc_enabled()
>
> Simplify the return statement to improve the code's readability.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.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;
> }
LGTM. Thanks!
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
Powered by blists - more mailing lists