From: Markus Elfring <Markus.Elfring@web.de>
To: Yazen Ghannam <yazen.ghannam@amd.com>,
Borislav Petkov <bp@alien8.de>,
linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Avadhut Naik <avadhut.naik@amd.com>,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
John Allen <john.allen@amd.com>,
Muralidhara M K <muralidhara.mk@amd.com>,
Tony Luck <tony.luck@intel.com>,
William Roche <william.roche@oracle.com>
Subject: Re: [PATCH v4 1/3] RAS: Introduce AMD Address Translation Library
Date: Wed, 20 Dec 2023 17:15:40 +0100 [thread overview]
Message-ID: <154454fe-2cbd-4432-ae44-634b1624504a@web.de> (raw)
In-Reply-To: <20231218190406.27479-2-yazen.ghannam@amd.com>
…
> +++ b/drivers/ras/amd/atl/core.c
> @@ -0,0 +1,225 @@
…
> +unsigned long norm_to_sys_addr(u8 socket_id, u8 die_id, u8 coh_st_inst_id, unsigned long addr)
> +{
…
> + if (!late_hole_remove(&ctx) && add_base_and_hole(&ctx))
> + return -EINVAL;
> +
> + if (dehash_address(&ctx))
> + return -EINVAL;
> +
> + if (late_hole_remove(&ctx) && add_base_and_hole(&ctx))
> + return -EINVAL;
…
> + return ctx.ret_addr;
> +}
…
I wonder which condition checks should actually be used for such
a function implementation.
How do you think about to avoid also the specification of duplicate
return statements here?
Regards,
Markus
next prev parent reply other threads:[~2023-12-20 16:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 19:04 [PATCH v4 0/3] AMD Address Translation Library Yazen Ghannam
2023-12-18 19:04 ` [PATCH v4 1/3] RAS: Introduce " Yazen Ghannam
2023-12-18 19:21 ` Christophe JAILLET
2023-12-18 21:53 ` Yazen Ghannam
2023-12-19 16:07 ` Borislav Petkov
2023-12-19 16:39 ` Borislav Petkov
2023-12-19 16:57 ` Borislav Petkov
2023-12-20 15:45 ` Markus Elfring
2023-12-20 16:15 ` Markus Elfring [this message]
2023-12-20 17:28 ` Markus Elfring
2023-12-28 17:16 ` Borislav Petkov
2023-12-18 19:04 ` [PATCH v4 2/3] EDAC/amd64: Use new " Yazen Ghannam
2023-12-18 19:04 ` [PATCH v4 3/3] Documentation: RAS: Add index and address translation section Yazen Ghannam
2024-01-03 10:59 ` [PATCH v4 0/3] AMD Address Translation Library 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=154454fe-2cbd-4432-ae44-634b1624504a@web.de \
--to=markus.elfring@web.de \
--cc=avadhut.naik@amd.com \
--cc=bp@alien8.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=john.allen@amd.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muralidhara.mk@amd.com \
--cc=tony.luck@intel.com \
--cc=william.roche@oracle.com \
--cc=yazen.ghannam@amd.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