From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1AF348208F for ; Sun, 18 Dec 2016 23:21:25 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP; 18 Dec 2016 23:21:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,372,1477983600"; d="scan'208";a="44357888" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga005.fm.intel.com with ESMTP; 18 Dec 2016 23:21:23 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Ruiyu Ni Date: Mon, 19 Dec 2016 15:20:23 +0800 Message-Id: <1482132023-10416-9-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1482132023-10416-1-git-send-email-dandan.bi@intel.com> References: <1482132023-10416-1-git-send-email-dandan.bi@intel.com> Subject: [patch 8/8] MdeModulePkg/NonDiscoverableDeviceRegistrationLib: Fix coding style issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 07:21:25 -0000 1. Fix issues comments 2. Fix Guid/protocol format Cc: Ard Biesheuvel Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- .../Library/NonDiscoverableDeviceRegistrationLib.h | 4 +++- .../NonDiscoverableDeviceRegistrationLib.c | 14 ++++++++++++-- .../NonDiscoverableDeviceRegistrationLib.inf | 22 ++++++++++++---------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/MdeModulePkg/Include/Library/NonDiscoverableDeviceRegistrationLib.h b/MdeModulePkg/Include/Library/NonDiscoverableDeviceRegistrationLib.h index 120d914..c2d9e48 100644 --- a/MdeModulePkg/Include/Library/NonDiscoverableDeviceRegistrationLib.h +++ b/MdeModulePkg/Include/Library/NonDiscoverableDeviceRegistrationLib.h @@ -30,21 +30,23 @@ typedef enum { } NON_DISCOVERABLE_DEVICE_TYPE; /** Register a non-discoverable MMIO device - @param[in] DeviceType The type of non-discoverable device + @param[in] Type The type of non-discoverable device @param[in] DmaType Whether the device is DMA coherent @param[in] InitFunc Initialization routine to be invoked when the device is enabled @param[in,out] Handle The handle onto which to install the non-discoverable device protocol. If Handle is NULL or *Handle is NULL, a new handle will be allocated. @param[in] NumMmioResources The number of UINTN base/size pairs that follow, each describing an MMIO region owned by the device + @param[in] ... The variable argument list which contains the + info about MmioResources. @retval EFI_SUCCESS The registration succeeded. @retval Other The registration failed. **/ diff --git a/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c b/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c index 94cd946..6f46dfa 100644 --- a/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c +++ b/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c @@ -23,10 +23,18 @@ #include #include #include +/** + Get Guid form the type of non-discoverable device. + + @param[in] Type The type of non-discoverable device. + + @retval Return the Guid. + +**/ STATIC CONST EFI_GUID * GetGuidFromType ( IN NON_DISCOVERABLE_DEVICE_TYPE Type ) @@ -72,23 +80,25 @@ typedef struct { EFI_DEVICE_PATH_PROTOCOL End; } NON_DISCOVERABLE_DEVICE_PATH; #pragma pack () /** - Register a non-discoverable MMIO device + Register a non-discoverable MMIO device. - @param[in] DeviceType The type of non-discoverable device + @param[in] Type The type of non-discoverable device @param[in] DmaType Whether the device is DMA coherent @param[in] InitFunc Initialization routine to be invoked when the device is enabled @param[in,out] Handle The handle onto which to install the non-discoverable device protocol. If Handle is NULL or *Handle is NULL, a new handle will be allocated. @param[in] NumMmioResources The number of UINTN base/size pairs that follow, each describing an MMIO region owned by the device + @param[in] ... The variable argument list which contains the + info about MmioResources. @retval EFI_SUCCESS The registration succeeded. @retval EFI_INVALID_PARAMETER An invalid argument was given @retval Other The registration failed. diff --git a/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf b/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf index ba32324..dfcf8dc 100644 --- a/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf +++ b/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf @@ -1,6 +1,8 @@ # @file +# Component Description File for NonDiscoverableDeviceRegistrationLib. +# # Copyright (c) 2016, Linaro, Ltd. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -30,17 +32,17 @@ [LibraryClasses] DebugLib DevicePathLib UefiBootServicesTableLib [Protocols] - gEdkiiNonDiscoverableDeviceProtocolGuid + gEdkiiNonDiscoverableDeviceProtocolGuid ## PRODUCES [Guids] - gEdkiiNonDiscoverableAhciDeviceGuid - gEdkiiNonDiscoverableAmbaDeviceGuid - gEdkiiNonDiscoverableEhciDeviceGuid - gEdkiiNonDiscoverableNvmeDeviceGuid - gEdkiiNonDiscoverableOhciDeviceGuid - gEdkiiNonDiscoverableSdhciDeviceGuid - gEdkiiNonDiscoverableUfsDeviceGuid - gEdkiiNonDiscoverableUhciDeviceGuid - gEdkiiNonDiscoverableXhciDeviceGuid + gEdkiiNonDiscoverableAhciDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableAmbaDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableEhciDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableNvmeDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableOhciDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableSdhciDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableUfsDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableUhciDeviceGuid ## CONSUMES ## GUID + gEdkiiNonDiscoverableXhciDeviceGuid ## CONSUMES ## GUID -- 1.9.5.msysgit.1