From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Cc: <devel@edk2.groups.io>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Michael Kubacki <michael.kubacki@microsoft.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: reformat all sources using uncrustify
Date: Fri, 21 Jun 2024 14:54:04 +0100 [thread overview]
Message-ID: <ZnWF/BTy1uQMUjQe@qc-i7.hemma.eciton.net> (raw)
In-Reply-To: <20240621133901.88152-1-marcin.juszkiewicz@linaro.org>
On Fri, Jun 21, 2024 at 15:39:01 +0200, Marcin Juszkiewicz wrote:
> uncrustify is required in EDK2 repository. SbsaQemu (and other platforms
> in edk2-platforms) code was free from using it IIRC.
>
> Reformat all files to make new contributions easier. We can recommend
> formatting sources without generating extra work for developers.
>
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Everything in here except one thing is improvement.
> ---
> .../Include/Library/QemuOpenFwCfgLib.h | 7 +-
> .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.h | 50 +-
> .../Include/IndustryStandard/SbsaQemuAcpi.h | 86 +--
> .../SbsaQemuPlatformVersion.h | 2 +-
> .../Include/IndustryStandard/SbsaQemuSmc.h | 14 +-
> .../Include/Library/HardwareInfoLib.h | 8 +-
> .../BoardBootManagerLib/BoardBootManager.c | 14 +-
> .../Library/PeiReportFvLib/PeiReportFvLib.c | 237 ++++-----
> .../QemuOpenBoardPkg/PlatformInitPei/Memory.c | 4 +-
> .../Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 78 +--
> .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 490 +++++++++---------
> .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c | 8 +-
> .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 88 ++--
> .../SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c | 94 ++--
> .../SbsaQemuHardwareInfoLib.c | 66 +--
> .../Library/SbsaQemuLib/SbsaQemuLib.c | 23 +-
> .../Library/SbsaQemuLib/SbsaQemuMem.c | 49 +-
> .../SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c | 14 +-
> .../SbsaQemuPciHostBridgeLib.c | 90 ++--
> 19 files changed, 735 insertions(+), 687 deletions(-)
>
> --- a/Platform/Qemu/QemuOpenBoardPkg/Library/PeiReportFvLib/PeiReportFvLib.c
> +++ b/Platform/Qemu/QemuOpenBoardPkg/Library/PeiReportFvLib/PeiReportFvLib.c
> @@ -16,7 +16,7 @@
> #include <Ppi/FirmwareVolumeInfo2.h>
>
> // Use a FV pointer PCD to get a pointer to the FileSystemGuid in the FV header
> -#define PCD_TO_FV_HEADER_FILE_SYSTEM_GUID(Pcd) (&((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN) PcdGet32 (Pcd))->FileSystemGuid)
> +#define PCD_TO_FV_HEADER_FILE_SYSTEM_GUID(Pcd) (&((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN) PcdGet32 (Pcd))->FileSystemGuid)
>
> /**
> Reports FVs necessary for MinPlarform pre-memory initialization
> @@ -38,13 +38,14 @@ ReportPreMemFv (
>
> DEBUG_CODE (
> for (Index = 0; Status == EFI_SUCCESS; Index++) {
> - Status = PeiServicesLocatePpi (&gEfiPeiFirmwareVolumeInfo2PpiGuid, Index, &Descriptor, (VOID**) &Ppi);
> - if (!EFI_ERROR (Status)) {
> - FvHeader = (EFI_FIRMWARE_VOLUME_HEADER*) Ppi->FvInfo;
> - DEBUG ((DEBUG_INFO, "Found FV at 0x%x, size 0x%x\n", FvHeader, FvHeader->FvLength));
> - }
> + Status = PeiServicesLocatePpi (&gEfiPeiFirmwareVolumeInfo2PpiGuid, Index, &Descriptor, (VOID **)&Ppi);
> + if (!EFI_ERROR (Status)) {
> + FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)Ppi->FvInfo;
> + DEBUG ((DEBUG_INFO, "Found FV at 0x%x, size 0x%x\n", FvHeader, FvHeader->FvLength));
Uncrustify gets this hunk wrong.
> }
> - );
> + }
> +
> + );
And this too.
Michael, do you have any known tweaks for this format?
Marcin, since the point was to clean up SbsaQemu, maybe you could
re-run this without including QemuOpenBoardPkg?
Regards,
Leif
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119672): https://edk2.groups.io/g/devel/message/119672
Mute This Topic: https://groups.io/mt/106798688/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2024-06-21 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 13:39 [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: reformat all sources using uncrustify Marcin Juszkiewicz
2024-06-21 13:54 ` Leif Lindholm [this message]
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=ZnWF/BTy1uQMUjQe@qc-i7.hemma.eciton.net \
--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