From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.365.1579022871253104545 for ; Tue, 14 Jan 2020 09:27:51 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: prince.agyeman@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2020 09:27:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,433,1574150400"; d="scan'208";a="225613334" Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.84]) by orsmga006.jf.intel.com with ESMTP; 14 Jan 2020 09:27:50 -0800 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Shenglei Zhang , Chasel Chiu , Nate DeSimone , Michael Kubacki Subject: [edk2-platforms] [PATCH] BoardModulePkg: Fix ECC Coding Style Issues Date: Tue, 14 Jan 2020 09:27:50 -0800 Message-Id: X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2453 Fixed coding style issues as reported by the ECC tool Cc: Shenglei Zhang Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../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 #include -- 2.19.1.windows.1