From nobody Tue Apr 16 15:23:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53236+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53236+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1579023949; cv=none; d=zohomail.com; s=zohoarc; b=drYCXn9DgwXeZruA4ZJN42n2Yent/ODYqAXe0Z4E0GbLDemgxmkSlhdWOqKumkFcBFz/u6RFopdx1ajSJMaQnH03BiwIpfWTnhylUfiEdtoTmQL47lk1g2biXjNY6c1ozPLuJAZD1fHF8D/8fL/ihbsRAgrXQ7qo3IA2kPrlmK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579023949; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=oHzVaab0VTyJZKsrixjXwVoLh7zyVfejPNQf5DDBSdk=; b=P0nYAiJmuPJOQmP5MJNL3xOx0EXrH3t5AaSO967PGhMwyC1Ed1nxkNFkrmVO4vemuc98flRK6DGCuzefty39KfY0yDxk3pkivrEBV9rAycgnhKxGe/nlbhmgsnPYBmSajS6dnUtXgdpp7vAXw8AcvqSJQ7AfhtSgOPZt+A0YMGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53236+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579023949781992.2860977949063; Tue, 14 Jan 2020 09:45:49 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id SNNlYY1788612xyGT8n1dSI3; Tue, 14 Jan 2020 09:45:49 -0800 X-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 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-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" X-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-devel] [edk2-platforms] [PATCH] BoardModulePkg: Fix ECC Coding Style Issues Date: Tue, 14 Jan 2020 09:27:50 -0800 Message-Id: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,prince.agyeman@intel.com X-Gm-Message-State: Zaylbl3w6NGW5UZQYvvXa3RPx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1579023949; bh=1P71MbtPVdJeQTCokoRqe5AUspMPOk6MCGS/DSurI+Y=; h=Cc:Date:From:Reply-To:Subject:To; b=gQd12dEcRUGXXvG00wAoI6RZbqpZOzcCebLyw7eSqWqVDUgZAUwDDzrIOo92WI3vpzk WFhPABrKbZJU9Gao2NcQYZR+gl/RhAvzZNLrr8zKLSBHWthCGkh4kkJFRTbcxcirhipKb TBHhD1PV+WsHegfDmLbLZoQQfiJuqP48vQA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2453 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 Reviewed-by: Chasel Chiu Reviewed-by: Michael Kubacki --- .../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/P= latform/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 **/ =20 +#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 Dri= ver. =20 @@ -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 =20 [Pcd] gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c b/Platfor= m/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[] =3D { =20 =20 /** - Gets the number of devices in Table of SIO Controllers mDeviceInfo + Gets the number of devices in Table of SIO Controllers mDeviceInfo. =20 @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/Platf= orm/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 =3D \ - (SIO_PCI_ISA_BRIDGE_DEVICE_INFO *) FixedPcdGetPtr (PcdSuperIoPciIsaB= ridgeDevice); - if(CompareMem (Device, CurrentDevice, sizeof (SIO_PCI_ISA_BRIDGE_DEVIC= E_INFO)) =3D=3D 0) { - return TRUE; - } - return FALSE; + ) +{ + SIO_PCI_ISA_BRIDGE_DEVICE_INFO *Device; + Device =3D (SIO_PCI_ISA_BRIDGE_DEVICE_INFO *) FixedPcdGetPtr (PcdSuperIo= PciIsaBridgeDevice); + if(CompareMem (Device, CurrentDevice, sizeof (SIO_PCI_ISA_BRIDGE_DEVICE_= INFO)) =3D=3D 0) { + return TRUE; + } + return FALSE; } =20 /** diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLi= b.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); } =20 - if (FoundPs2Kbc =3D=3D FALSE) { + if (!FoundPs2Kbc) { return FALSE; } =20 @@ -126,7 +126,7 @@ IsPs2KeyboardConnected ( BOOLEAN Result; Result =3D DetectPs2Keyboard (); =20 - if (Result =3D=3D FALSE) { + if (!Result) { // // If there is no ps2 keyboard detected for the 1st time, retry again. // @@ -138,7 +138,7 @@ IsPs2KeyboardConnected ( =20 /** 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/BdsPs2KbcLi= b.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 @@ =20 **/ =20 -#ifndef _PS2_KBC_LIB_H -#define _PS2_KBC_LIB_H +#ifndef _PS2_KBC_LIB_H_ +#define _PS2_KBC_LIB_H_ =20 #include #include --=20 2.19.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53236): https://edk2.groups.io/g/devel/message/53236 Mute This Topic: https://groups.io/mt/69697353/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-