public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran via groups.io" <rebecca=os.amperecomputing.com@groups.io>
To: devel@edk2.groups.io, marcin.juszkiewicz@linaro.org
Subject: Re: [edk2-devel] Maybe it is time to update code style?
Date: Mon, 25 Sep 2023 11:16:51 -0600	[thread overview]
Message-ID: <e34775bf-96f5-46d5-9e8a-36ca6004378f@os.amperecomputing.com> (raw)
In-Reply-To: <f6cc1fc4-0198-4066-9992-294f1ae59e5c@linaro.org>

On 9/25/2023 3:03 AM, Marcin Juszkiewicz via groups.io wrote:
> I feel sick each time I have to edit EDK2 code.
> 
> All those INF, DEC, DSC, FDF, XYZ files are something I do not even try
> to understand, just got minimal knowledge what goes where by asking Leif
> (thanks a lot!) and observing build error messages.
> 
> I got used to UINTN and other weird variable types. No idea where from
> they came from (MS Windows?)

Given that people at Intel/Microsoft are still adding code with the 
Windows NT style function documentation, I suspect there will be quite a 
resistance to changing things.

For example, the following was added in 2019:


EFI_STATUS
GetSelfTest (
...
   )
/*++

Routine Description:

   Execute the Get Self Test ...

Arguments:

   IpmiInstance    - Data structure...

Returns:

   EFI_SUCCESS       - BMC Self test results...

--*/
{
   EFI_STATUS  Status;

Vincent provided the following explanation on Twitter:

"It's from MS, namley the coding style used in Windows NT 
https://computernewb.com/~lily/files/Documents/NTDesignWorkbook/coding.pdf 
. Ken Reneris wrote the original EFI sample at Intel after working 
having worked on various parts of NT, including the HAL, at MS. He 
brought that coding style with him to Intel."

-- 
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109047): https://edk2.groups.io/g/devel/message/109047
Mute This Topic: https://groups.io/mt/101570674/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2023-09-25 17:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25  9:03 [edk2-devel] Maybe it is time to update code style? Marcin Juszkiewicz
2023-09-25 15:25 ` Michael D Kinney
2023-09-25 15:39 ` Andrew Fish via groups.io
2023-09-25 17:16 ` Rebecca Cran via groups.io [this message]
2023-09-25 18:03 ` Pedro Falcato
2023-09-25 19:22   ` Marcin Juszkiewicz

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-list 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=e34775bf-96f5-46d5-9e8a-36ca6004378f@os.amperecomputing.com \
    --to=devel@edk2.groups.io \
    /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