public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms] [PATCH] BoardModulePkg: Fix ECC Coding Style Issues
@ 2020-01-14 17:27 Agyeman, Prince
  2020-01-20  5:19 ` Chiu, Chasel
  2020-01-30  0:30 ` Kubacki, Michael A
  0 siblings, 2 replies; 3+ messages in thread
From: Agyeman, Prince @ 2020-01-14 17:27 UTC (permalink / raw)
  To: devel; +Cc: Shenglei Zhang, Chasel Chiu, Nate DeSimone, Michael Kubacki

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2453

Fixed coding style issues as reported by the ECC tool

Cc: Shenglei Zhang <shenglei.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>

Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
---
 .../BoardModulePkg/LegacySioDxe/ComponentName.h   |  5 +++++
 .../BoardModulePkg/LegacySioDxe/LegacySioDxe.inf  |  2 ++
 .../Intel/BoardModulePkg/LegacySioDxe/SioChip.c   |  5 +++--
 .../Intel/BoardModulePkg/LegacySioDxe/SioDriver.c | 15 ++++++++-------
 .../Library/BdsPs2KbcLib/BdsPs2KbcLib.c           |  6 +++---
 .../Library/BdsPs2KbcLib/BdsPs2KbcLib.h           |  4 ++--
 6 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h
index 85ca348701..91bc245f3a 100644
--- a/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h
+++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h
@@ -6,6 +6,9 @@
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
+#ifndef _LEGACY_SIO_DXE_COMPONENT_NAME_H_
+#define _LEGACY_SIO_DXE_COMPONENT_NAME_H_
+
 /**
   Retrieves a Unicode string that is the user-readable name of the EFI Driver.
 
@@ -85,3 +88,5 @@ SioComponentNameGetControllerName (
   IN  CHAR8                         *Language,
   OUT CHAR16                        **ControllerName
   );
+
+#endif
diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
index 1d7cd92604..698d406450 100644
--- a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
+++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
@@ -44,6 +44,8 @@
   SioDriver.c
   SioDriver.h
   ComponentName.c
+  ComponentName.h
+  Register.h
 
 [Pcd]
   gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable
diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c
index b9a84ca51c..846dddf739 100644
--- a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c
+++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c
@@ -145,7 +145,7 @@ DEVICE_INFO    mDeviceInfo[] = {
 
 
 /**
-  Gets the number of devices in Table of SIO Controllers mDeviceInfo
+  Gets the number of devices in Table of SIO Controllers mDeviceInfo.
 
   @retval     Number of enabled devices in Table of SIO Controllers.
 **/
@@ -153,7 +153,8 @@ UINTN
 EFIAPI
 GetDeviceCount (
   VOID
-){
+  )
+{
    UINTN        Count;
    // Get mDeviceInfo item count
    // -1 to account for for the end device info
diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c
index 5bfdc94681..484c53e953 100644
--- a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c
+++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c
@@ -118,13 +118,14 @@ BOOLEAN
 EFIAPI
 SioDeviceEnabled (
   IN SIO_PCI_ISA_BRIDGE_DEVICE_INFO *CurrentDevice
-){
-    SIO_PCI_ISA_BRIDGE_DEVICE_INFO *Device = \
-      (SIO_PCI_ISA_BRIDGE_DEVICE_INFO *) FixedPcdGetPtr (PcdSuperIoPciIsaBridgeDevice);
-    if(CompareMem (Device, CurrentDevice, sizeof (SIO_PCI_ISA_BRIDGE_DEVICE_INFO)) == 0) {
-      return TRUE;
-    }
-    return FALSE;
+  )
+{
+  SIO_PCI_ISA_BRIDGE_DEVICE_INFO *Device;
+  Device = (SIO_PCI_ISA_BRIDGE_DEVICE_INFO *) FixedPcdGetPtr (PcdSuperIoPciIsaBridgeDevice);
+  if(CompareMem (Device, CurrentDevice, sizeof (SIO_PCI_ISA_BRIDGE_DEVICE_INFO)) == 0) {
+    return TRUE;
+  }
+  return FALSE;
 }
 
 /**
diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c
index eff10bddb4..0cf4c4d262 100644
--- a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c
+++ b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c
@@ -65,7 +65,7 @@ DetectPs2Keyboard (
     MicroSecondDelay (30);
   }
 
-  if (FoundPs2Kbc == FALSE) {
+  if (!FoundPs2Kbc) {
     return FALSE;
   }
 
@@ -126,7 +126,7 @@ IsPs2KeyboardConnected (
   BOOLEAN Result;
   Result = DetectPs2Keyboard ();
 
-  if (Result == FALSE) {
+  if (!Result) {
     //
     // If there is no ps2 keyboard detected for the 1st time, retry again.
     //
@@ -138,7 +138,7 @@ IsPs2KeyboardConnected (
 
 /**
   Updates the ConIn variable with Ps2 Keyboard device path,
-  if it doesn't already exists in ConIn and ConInDev
+  if it doesn't already exists in ConIn and ConInDev.
 **/
 VOID
 AddPs2Keyboard (
diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h
index d9a27e6681..a96d53b98d 100644
--- a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h
+++ b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h
@@ -6,8 +6,8 @@
 
 **/
 
-#ifndef _PS2_KBC_LIB_H
-#define _PS2_KBC_LIB_H
+#ifndef _PS2_KBC_LIB_H_
+#define _PS2_KBC_LIB_H_
 
 #include <Uefi.h>
 #include <Library/UefiLib.h>
-- 
2.19.1.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-30  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-14 17:27 [edk2-platforms] [PATCH] BoardModulePkg: Fix ECC Coding Style Issues Agyeman, Prince
2020-01-20  5:19 ` Chiu, Chasel
2020-01-30  0:30 ` Kubacki, Michael A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox