]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / PlatformDriOverrideDxe / PlatDriOverrideDxe.c
index 76c240b73d0ce49b437a1c14e4c57c4c1485eaf4..b2ddf1020b3cb8be09cd5ba9412aeac0433b82bf 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
   This file also installs UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL.\r
-  \r
+\r
   The main code offers a UI interface in device manager to let user configure\r
   platform override protocol to override the default algorithm for matching\r
   drivers to controllers.\r
@@ -13,7 +13,7 @@
   4. It save all the mapping info in NV variables which will be consumed\r
      by platform override protocol driver to publish the platform override protocol.\r
 \r
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -96,7 +96,7 @@ HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -107,7 +107,7 @@ HII_VENDOR_DEVICE_PATH  mHiiVendorDevicePath = {
   Converting a given device to an unicode string.\r
 \r
   @param    DevPath     Given device path instance\r
-  \r
+\r
   @return   Converted string from given device path.\r
   @retval   L"?" Converting failed.\r
 **/\r
@@ -131,7 +131,7 @@ DevicePathToStr (
 }\r
 \r
 /**\r
-  Worker function to get the driver name by ComponentName or ComponentName2 protocol \r
+  Worker function to get the driver name by ComponentName or ComponentName2 protocol\r
   according to the driver binding handle.\r
 \r
   @param  DriverBindingHandle  The Handle of DriverBinding.\r
@@ -197,7 +197,7 @@ GetComponentNameWorker (
 \r
 \r
 /**\r
-  Get the driver name by ComponentName or ComponentName2 protocol \r
+  Get the driver name by ComponentName or ComponentName2 protocol\r
   according to the driver binding handle\r
 \r
   @param DriverBindingHandle  The Handle of DriverBinding.\r
@@ -219,7 +219,7 @@ GetComponentName (
   DriverName = GetComponentNameWorker (DriverBindingHandle, &gEfiComponentName2ProtocolGuid, L"PlatformLang");\r
   if (DriverName == NULL) {\r
     //\r
-    // If we can not get driver name from Component Name 2 protocol, we can try ISO 639-2 Component Name protocol. \r
+    // If we can not get driver name from Component Name 2 protocol, we can try ISO 639-2 Component Name protocol.\r
     //\r
     DriverName = GetComponentNameWorker (DriverBindingHandle, &gEfiComponentNameProtocolGuid, L"Lang");\r
   }\r
@@ -266,7 +266,7 @@ GetImageName (
     // Make sure device path node is aligned when accessing it's FV Name Guid field.\r
     //\r
     AlignedDevPathNode = AllocateCopyPool (DevicePathNodeLength(DevPathNode), DevPathNode);\r
-    \r
+\r
     //\r
     // Find the Fv File path\r
     //\r
@@ -298,9 +298,9 @@ GetImageName (
         Buffer = NULL;\r
       }\r
     }\r
-    \r
+\r
     FreePool (AlignedDevPathNode);\r
-    \r
+\r
     //\r
     // Next device path node\r
     //\r
@@ -344,13 +344,13 @@ UpdateDeviceSelectPage (
   VOID                                      *StartOpCodeHandle;\r
   VOID                                      *EndOpCodeHandle;\r
   EFI_IFR_GUID_LABEL                        *StartLabel;\r
-  EFI_IFR_GUID_LABEL                        *EndLabel;  \r
+  EFI_IFR_GUID_LABEL                        *EndLabel;\r
 \r
   //\r
   // Set current page form ID.\r
   //\r
-  mCurrentPage = FORM_ID_DEVICE;  \r
-  \r
+  mCurrentPage = FORM_ID_DEVICE;\r
+\r
   //\r
   // Initial the mapping database in memory\r
   //\r
@@ -507,7 +507,7 @@ UpdateDeviceSelectPage (
     // Save the device path string toke for next access use\r
     //\r
     mControllerToken[Index] = NewStringToken;\r
-      \r
+\r
     HiiCreateGotoOpCode (\r
       StartOpCodeHandle,\r
       FORM_ID_DRIVER,\r
@@ -575,7 +575,7 @@ GetDriverBindingHandleFromImageHandle (
   if (EFI_ERROR (Status) || (DriverBindingHandleCount == 0)) {\r
     return NULL;\r
   }\r
-  \r
+\r
   //\r
   // Get the first Driver Binding handle which has the specific image handle.\r
   //\r
@@ -819,7 +819,7 @@ UpdateBindingDriverSelectPage (
     //\r
     NewStrSize = StrSize (DriverName);\r
     NewString = AllocateZeroPool (NewStrSize);\r
-    ASSERT (NewString != NULL); \r
+    ASSERT (NewString != NULL);\r
     if (EFI_ERROR (CheckMapping (mControllerDevicePathProtocol[mSelectedCtrIndex], LoadedImageDevicePath, &mMappingDataBase, NULL, NULL))) {\r
       mDriSelection[Index] = FALSE;\r
     } else {\r
@@ -842,7 +842,7 @@ UpdateBindingDriverSelectPage (
 \r
     NewStrSize = StrSize (DriverName);\r
     NewString = AllocateZeroPool (NewStrSize);\r
-    ASSERT (NewString != NULL); \r
+    ASSERT (NewString != NULL);\r
     StrCatS (NewString, NewStrSize/sizeof(CHAR16), DriverName);\r
     NewStringHelpToken = HiiSetString (Private->RegisteredHandle, DriverImageFilePathToken[Index], NewString, NULL);\r
     ASSERT (NewStringHelpToken != 0);\r
@@ -1058,7 +1058,7 @@ UpdatePrioritySelectPage (
     FakeNvData->DriOrder[Index] = (UINT8) OrderNO[MinNO];\r
     TempNO[MinNO] = MAX_CHOICE_NUM + 1;\r
   }\r
-  \r
+\r
   //\r
   // Create Order List OpCode\r
   //\r
@@ -1289,7 +1289,7 @@ PlatOverMngrRouteConfig (
   if (!HiiIsConfigHdrMatch (Configuration, &gPlatformOverridesManagerGuid, mVariableName)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   *Progress = Configuration + StrLen (Configuration);\r
   Private    = EFI_CALLBACK_INFO_FROM_THIS (This);\r
   FakeNvData = &Private->FakeNvData;\r
@@ -1365,7 +1365,7 @@ PlatOverMngrCallback (
     if (Value == NULL) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     if (KeyValue == KEY_VALUE_DRIVER_GOTO_PREVIOUS) {\r
       UpdateDeviceSelectPage (Private, KeyValue, FakeNvData);\r
       //\r
@@ -1426,7 +1426,7 @@ PlatOverMngrCallback (
           ASSERT (FALSE);\r
         }\r
       break;\r
-      \r
+\r
       case KEY_VALUE_ORDER_SAVE_AND_EXIT:\r
         Status = CommitChanges (Private, KeyValue, FakeNvData);\r
         *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;\r
@@ -1526,14 +1526,14 @@ GetDriver (
   This driver doesn't support this API.\r
 \r
   @param  This                  A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_\r
-                                PROTOCOL instance.                            \r
+                                PROTOCOL instance.\r
   @param  ControllerHandle      The device handle of the controller to check if a driver override\r
-                                exists.                                                          \r
+                                exists.\r
   @param  DriverImagePath       On input, a pointer to the previous driver device path returned by\r
                                 GetDriverPath(). On output, a pointer to the next driver\r
                                 device path. Passing in a pointer to NULL, will return the first\r
                                 driver device path for ControllerHandle.\r
-  \r
+\r
   @retval EFI_UNSUPPORTED\r
 **/\r
 EFI_STATUS\r
@@ -1550,18 +1550,18 @@ GetDriverPath (
 \r
 /**\r
   Used to associate a driver image handle with a device path that was returned on a prior call to the\r
-  GetDriverPath() service. This driver image handle will then be available through the               \r
+  GetDriverPath() service. This driver image handle will then be available through the\r
   GetDriver() service. This driver doesn't support this API.\r
 \r
   @param  This                  A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_\r
-                                PROTOCOL instance.                            \r
-  @param  ControllerHandle      The device handle of the controller.                                                             \r
+                                PROTOCOL instance.\r
+  @param  ControllerHandle      The device handle of the controller.\r
   @param  DriverImagePath       A pointer to the driver device path that was returned in a prior\r
-                                call to GetDriverPath().                                                                        \r
+                                call to GetDriverPath().\r
   @param  DriverImageHandle     The driver image handle that was returned by LoadImage()\r
-                                when the driver specified by DriverImagePath was loaded \r
-                                into memory. \r
-  \r
+                                when the driver specified by DriverImagePath was loaded\r
+                                into memory.\r
+\r
   @retval EFI_UNSUPPORTED\r
 **/\r
 EFI_STATUS\r
@@ -1597,7 +1597,7 @@ PlatDriOverrideDxeInit (
   EFI_STATUS                  Status;\r
   EFI_FORM_BROWSER2_PROTOCOL  *FormBrowser2;\r
   VOID                        *Instance;\r
-  \r
+\r
   //\r
   // There should only be one Form Configuration protocol\r
   //\r
@@ -1626,7 +1626,7 @@ PlatDriOverrideDxeInit (
   if (!EFI_ERROR (Status)) {\r
     return EFI_ALREADY_STARTED;\r
   }\r
-  \r
+\r
   mCallerImageHandle = ImageHandle;\r
   mCallbackInfo = AllocateZeroPool (sizeof (EFI_CALLBACK_INFO));\r
   if (mCallbackInfo == NULL) {\r
@@ -1691,7 +1691,7 @@ PlatDriOverrideDxeInit (
   //\r
   mDriverImageHandleCount = 0;\r
   mCurrentPage = 0;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 \r
 Finish:\r