From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
James Morse <james.morse@arm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Robert Richter <rric@kernel.org>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] EDAC: Simplify return statement in dct_ecc_enabled()
Date: Tue, 4 Feb 2025 11:53:57 -0500 [thread overview]
Message-ID: <20250204165357.GA277200@yaz-khff2.amd.com> (raw)
In-Reply-To: <20250201130953.1377-2-thorsten.blum@linux.dev>
On Sat, Feb 01, 2025 at 02:09:54PM +0100, Thorsten Blum wrote:
> 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)
> --
Looks good to me.
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Thanks,
Yazen
next prev parent reply other threads:[~2025-02-04 16:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-01 13:09 [PATCH] EDAC: Simplify return statement in dct_ecc_enabled() Thorsten Blum
2025-02-04 16:53 ` Yazen Ghannam [this message]
2025-02-05 12:00 ` Zhuo, Qiuxu
2025-02-24 9:58 ` [RESEND PATCH] " Thorsten Blum
2025-02-28 12:30 ` [PATCH] " Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250204165357.GA277200@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=thorsten.blum@linux.dev \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox