]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/Tcg2ConfigPei: trivial coding style updates
authorLaszlo Ersek <lersek@redhat.com>
Fri, 9 Mar 2018 18:54:20 +0000 (19:54 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Sat, 10 Mar 2018 15:27:29 +0000 (16:27 +0100)
- the @file comment block should match between INF and main C file

- rewrap / refill columns to 79 characters

- insert space before opening paren

- prefix and suffix //-style comment block with empty // lines

- fix indentation of arguments in multi-line function call

- general tab spacing (indent step) is 2 in edk2, unlike QEMU's 4

No functional changes.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c

index 234cdd6cb40c96ef9a6eb0efd8aaa83ef9b06329..8c2d5863ea6cce8f1efc0971aaf3d579cd5c70ea 100644 (file)
@@ -1,20 +1,20 @@
 ## @file\r
 ## @file\r
-#  Set TPM device type\r
+# Set TPM device type\r
 #\r
 #\r
-#  In SecurityPkg, this module initializes the TPM device type based on\r
-#  a UEFI variable and/or hardware detection. In OvmfPkg, the module\r
-#  only performs TPM2 hardware detection.\r
+# In SecurityPkg, this module initializes the TPM device type based on a UEFI\r
+# variable and/or hardware detection. In OvmfPkg, the module only performs TPM2\r
+# hardware detection.\r
 #\r
 # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 # Copyright (C) 2018, Red Hat, Inc.\r
 #\r
 #\r
 # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 # Copyright (C) 2018, Red Hat, Inc.\r
 #\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
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 # http://opensource.org/licenses/bsd-license.php\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 #\r
 #\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+# WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 ##\r
 \r
 [Defines]\r
 ##\r
 \r
 [Defines]\r
@@ -40,7 +40,7 @@
   Tpm2DeviceLib\r
 \r
 [Guids]\r
   Tpm2DeviceLib\r
 \r
 [Guids]\r
-  gEfiTpmDeviceSelectedGuid           ## PRODUCES             ## GUID    # Used as a PPI GUID\r
+  gEfiTpmDeviceSelectedGuid           ## PRODUCES ## GUID # Used as a PPI GUID\r
   gEfiTpmDeviceInstanceTpm20DtpmGuid  ## SOMETIMES_CONSUMES\r
 \r
 [Ppis]\r
   gEfiTpmDeviceInstanceTpm20DtpmGuid  ## SOMETIMES_CONSUMES\r
 \r
 [Ppis]\r
index 8bee1926b3c45c2c0e2f86601150199692868560..0befc6c54c8706ce22460adfd3b4ba22fcbf23ad 100644 (file)
@@ -1,17 +1,20 @@
 /** @file\r
 /** @file\r
-  The module entry point for Tcg2 configuration module.\r
+  Set TPM device type\r
 \r
 \r
-Copyright (c) 2018, Red Hat, Inc.\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  In SecurityPkg, this module initializes the TPM device type based on a UEFI\r
+  variable and/or hardware detection. In OvmfPkg, the module only performs TPM2\r
+  hardware detection.\r
 \r
 \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
-http://opensource.org/licenses/bsd-license.php\r
+  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (C) 2018, Red Hat, Inc.\r
 \r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  distribution. The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
 \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 **/\r
 \r
 \r
 **/\r
 \r
 \r
@@ -55,23 +58,25 @@ Tcg2ConfigPeimEntryPoint (
 \r
   Status = Tpm2RequestUseTpm ();\r
   if (!EFI_ERROR (Status)) {\r
 \r
   Status = Tpm2RequestUseTpm ();\r
   if (!EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__));\r
-      Size = sizeof(gEfiTpmDeviceInstanceTpm20DtpmGuid);\r
-      Status = PcdSetPtrS (\r
-          PcdTpmInstanceGuid,\r
-          &Size,\r
-          &gEfiTpmDeviceInstanceTpm20DtpmGuid\r
-          );\r
-      ASSERT_EFI_ERROR (Status);\r
+    DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__));\r
+    Size = sizeof (gEfiTpmDeviceInstanceTpm20DtpmGuid);\r
+    Status = PcdSetPtrS (\r
+               PcdTpmInstanceGuid,\r
+               &Size,\r
+               &gEfiTpmDeviceInstanceTpm20DtpmGuid\r
+               );\r
+    ASSERT_EFI_ERROR (Status);\r
   } else {\r
   } else {\r
-      DEBUG ((DEBUG_INFO, "%a: no TPM2 detected\n", __FUNCTION__));\r
-      // If no TPM2 was detected, we still need to install\r
-      // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon\r
-      // seeing the default (all-bits-zero) contents of\r
-      // PcdTpmInstanceGuid, thus we have to install the PPI in its place,\r
-      // in order to unblock any dependent PEIMs.\r
-      Status = PeiServicesInstallPpi (&mTpmInitializationDonePpiList);\r
-      ASSERT_EFI_ERROR (Status);\r
+    DEBUG ((DEBUG_INFO, "%a: no TPM2 detected\n", __FUNCTION__));\r
+    //\r
+    // If no TPM2 was detected, we still need to install\r
+    // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon seeing\r
+    // the default (all-bits-zero) contents of PcdTpmInstanceGuid, thus we have\r
+    // to install the PPI in its place, in order to unblock any dependent\r
+    // PEIMs.\r
+    //\r
+    Status = PeiServicesInstallPpi (&mTpmInitializationDonePpiList);\r
+    ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
   //\r
   }\r
 \r
   //\r