public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Sami Mujawar <sami.mujawar@arm.com>
Subject: [PATCH edk2-platforms v1 05/10] Platform/ARM: Fix Ecc error 1001
Date: Wed, 24 Nov 2021 17:23:25 +0100	[thread overview]
Message-ID: <20211124162330.236813-6-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20211124162330.236813-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

This patch fixes the following Ecc reported error:
'TAB' character is not allowed in source code,
please replace each 'TAB' with two spaces.

The patch also format and document the InstallStructures
function to comply to edk2 coding style.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
 .../SmbiosPlatformDxe/SmbiosPlatformDxe.c     | 38 ++++++++++---------
 .../Drivers/Lan9118Dxe/Lan9118DxeUtil.h       |  4 +-
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/Platform/ARM/JunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/ARM/JunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index ac18b16ca676..a5a675b2a613 100644
--- a/Platform/ARM/JunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/Platform/ARM/JunoPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -743,36 +743,40 @@ InstallMemoryStructure (
 }

 /**
-   Install a whole table worth of structructures
+  Install a whole table worth of structures.

-   @parm
+  @param [in] Smbios         Smbios protocol.
+  @param [in] DefaultTables  Default Smbios tables.
+
+  @retval EFI_SUCCESS           Record was added.
+  @retval EFI_OUT_OF_RESOURCES  Record was not added.
+  @retval EFI_ALREADY_STARTED   The SmbiosHandle passed in was already in use.
 **/
 EFI_STATUS
 InstallStructures (
-   IN EFI_SMBIOS_PROTOCOL       *Smbios,
-   IN CONST VOID *DefaultTables[]
+   IN EFI_SMBIOS_PROTOCOL   *Smbios,
+   IN CONST VOID            *DefaultTables[]
    )
 {
     EFI_STATUS                Status = EFI_SUCCESS;
     EFI_SMBIOS_HANDLE         SmbiosHandle;
+    UINTN                     TableEntry;

-    int TableEntry;
-    for ( TableEntry=0; DefaultTables[TableEntry] != NULL; TableEntry++)
-    {
-	SmbiosHandle = ((EFI_SMBIOS_TABLE_HEADER*)DefaultTables[TableEntry])->Handle;
-	Status = Smbios->Add (
-	    Smbios,
-	    NULL,
-	    &SmbiosHandle,
-	    (EFI_SMBIOS_TABLE_HEADER*) DefaultTables[TableEntry]
-	    );
-	if (EFI_ERROR(Status))
-	    break;
+    for (TableEntry = 0; DefaultTables[TableEntry] != NULL; TableEntry++) {
+      SmbiosHandle = ((EFI_SMBIOS_TABLE_HEADER*)DefaultTables[TableEntry])->Handle;
+      Status = Smbios->Add (
+                         Smbios,
+                         NULL,
+                         &SmbiosHandle,
+                         (EFI_SMBIOS_TABLE_HEADER*)DefaultTables[TableEntry]
+                         );
+      if (EFI_ERROR(Status)) {
+        break;
+      }
     }
     return Status;
 }

-
 /**
    Install all structures from the DefaultTables structure

diff --git a/Platform/ARM/VExpressPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.h b/Platform/ARM/VExpressPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.h
index 601714c94387..e50c458f8c3a 100644
--- a/Platform/ARM/VExpressPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.h
+++ b/Platform/ARM/VExpressPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.h
@@ -45,7 +45,7 @@ Lan9118RawMmioRead32(
   UINTN Delay
   );
 #define Lan9118MmioRead32(a) \
-	Lan9118RawMmioRead32(a, a ## _RD_DELAY)
+  Lan9118RawMmioRead32(a, a ## _RD_DELAY)

 UINT32
 Lan9118RawMmioWrite32(
@@ -54,7 +54,7 @@ Lan9118RawMmioWrite32(
   UINTN Delay
   );
 #define Lan9118MmioWrite32(a, v) \
-	Lan9118RawMmioWrite32(a, v, a ## _WR_DELAY)
+  Lan9118RawMmioWrite32(a, v, a ## _WR_DELAY)

 /* ------------------ MAC CSR Access ------------------- */

--
2.25.1

  parent reply	other threads:[~2021-11-24 16:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 16:23 [PATCH edk2-platforms v1 00/10] Fix Arm platforms CI errors PierreGondois
2021-11-24 16:23 ` [PATCH edk2-platforms v1 01/10] Platform/ARM: Modify duplicated GUID in PciHostBridgeLib PierreGondois
2021-12-17 14:14   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 02/10] Platform/ARM: Modify duplicated GUID in ArmVExpressLib PierreGondois
2021-12-17 14:14   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 03/10] Platform/ARM: Modify duplicated GUID in ArmVExpressLibSec PierreGondois
2021-12-17 13:59   ` Sami Mujawar
2021-12-17 14:15     ` PierreGondois
2021-12-17 16:30       ` Sami Mujawar
2021-12-17 16:33         ` [edk2-devel] " Ard Biesheuvel
2021-12-17 16:39           ` Sami Mujawar
2021-12-20  9:29             ` wenyi,xie
2021-11-24 16:23 ` [PATCH edk2-platforms v1 04/10] Platform/ARM: Modify duplicated GUID in ArmVExpressPkg.dec PierreGondois
2021-12-17 14:14   ` Sami Mujawar
2021-11-24 16:23 ` PierreGondois [this message]
2021-12-17 14:15   ` [PATCH edk2-platforms v1 05/10] Platform/ARM: Fix Ecc error 1001 Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 06/10] Platform/ARM: Fix Ecc error 1008 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 07/10] Platform/ARM: Fix Ecc error 1012 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 08/10] Platform/ARM: Fix Ecc error 3003 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 09/10] Platform/ARM: Fix Ecc error 9005 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 10/10] Platform/ARM: Fix Ecc error 5005 PierreGondois
2021-12-17 14:16   ` Sami Mujawar
2021-11-24 18:34 ` [edk2-devel] [PATCH edk2-platforms v1 00/10] Fix Arm platforms CI errors Chris Jones
2022-01-24 14:31   ` Sami Mujawar

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=20211124162330.236813-6-Pierre.Gondois@arm.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