[edk2-devel] Maybe it is time to update code style?

Rebecca Cran via groups.io rebecca=os.amperecomputing.com at groups.io
Mon Sep 25 17:16:51 UTC 2023


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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list