ManageabilityPkg: Follow pragma once coding convention

Update recent changes in ManageabilityPkg to follow the latest EDK II
C Coding Standards Specification (5.3) to use '#pragma once' instead
of traditional macro-based include guards in header files.

https://tianocore-docs.github.io/edk2-CCodingStandardsSpecification/draft/5_source_files/53_include_files.html#53-include-files

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
Michael Kubacki 2026-06-18 11:50:14 -04:00 committed by mergify[bot]
parent 8a6cd66acb
commit 96e2af4cc4
19 changed files with 22 additions and 79 deletions

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef EDKII_PLDM_PROTOCOL_LIB_H_
#define EDKII_PLDM_PROTOCOL_LIB_H_
#pragma once
/**
This function sets the PLDM source terminus and destination terminus
@ -53,5 +52,3 @@ PldmSubmitCommand (
OUT UINT8 *ResponseData,
IN OUT UINT32 *ResponseDataSize
);
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_HELPER_LIB_H_
#define MANAGEABILITY_TRANSPORT_HELPER_LIB_H_
#pragma once
#include <Library/ManageabilityTransportLib.h>
@ -211,5 +210,3 @@ IpmiHelperCheckCompletionCode (
OUT CHAR16 **CompletionCodeStr,
OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *AdditionalStatus
);
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_IPMI_LIB_H_
#define MANAGEABILITY_TRANSPORT_IPMI_LIB_H_
#pragma once
#include <Library/ManageabilityTransportLib.h>
@ -37,5 +36,3 @@ typedef struct {
CHAR16 *CompletionCodeString;
MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS AdditionalStatus;
} MANAGEABILITY_IPMI_COMPLETTION_CODE_MAPPING;
#endif

View file

@ -7,8 +7,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_LIB_H_
#define MANAGEABILITY_TRANSPORT_LIB_H_
#pragma once
#define MANAGEABILITY_TRANSPORT_TOKEN_VERSION_MAJOR 1
#define MANAGEABILITY_TRANSPORT_TOKEN_VERSION_MINOR 0
@ -372,5 +371,3 @@ struct _MANAGEABILITY_TRANSPORT_FUNCTION_V1_0 {
///< transport and get the
///< response back.
};
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_MCTP_LIB_H_
#define MANAGEABILITY_TRANSPORT_MCTP_LIB_H_
#pragma once
#include <Library/ManageabilityTransportLib.h>
@ -55,5 +54,3 @@ typedef struct {
#define MCTP_MESSAGE_TAG_OWNER_RESPONSE 0
#define MCTP_PACKET_SEQUENCE_MASK 0x3
#endif // MANAGEABILITY_TRANSPORT_MCTP_LIB_H_

View file

@ -6,8 +6,7 @@
**/
#ifndef PLATFORM_BMC_READY_LIB_H_
#define PLATFORM_BMC_READY_LIB_H_
#pragma once
/**
This function checks whether BMC is ready for transaction or not.
@ -21,5 +20,3 @@ EFIAPI
PlatformBmcReady (
VOID
);
#endif /* PLATFORM_BMC_READY_LIB_H_ */

View file

@ -9,8 +9,7 @@
@par https://github.com/openbmc/phosphor-ipmi-blobs/blob/master/README.md
**/
#ifndef EDKII_IPMI_BLOB_TRANSFER_H_
#define EDKII_IPMI_BLOB_TRANSFER_H_
#pragma once
#include <Library/IpmiLib.h>
#include <Library/UefiBootServicesTableLib.h>
@ -260,5 +259,3 @@ struct _EDKII_IPMI_BLOB_TRANSFER_PROTOCOL {
typedef struct _EDKII_IPMI_BLOB_TRANSFER_PROTOCOL EDKII_IPMI_BLOB_TRANSFER_PROTOCOL;
extern EFI_GUID gEdkiiIpmiBlobTransferProtocolGuid;
#endif

View file

@ -6,8 +6,7 @@
**/
#ifndef EDKII_MCTP_PROTOCOL_H_
#define EDKII_MCTP_PROTOCOL_H_
#pragma once
#include <IndustryStandard/Mctp.h>
@ -102,5 +101,3 @@ struct _EDKII_MCTP_PROTOCOL {
};
extern EFI_GUID gEdkiiMctpProtocolGuid;
#endif // EDKII_MCTP_PROTOCOL_H_

View file

@ -6,8 +6,7 @@
**/
#ifndef EDKII_PLDM_PROTOCOL_H_
#define EDKII_PLDM_PROTOCOL_H_
#pragma once
#include <IndustryStandard/Pldm.h>
@ -87,5 +86,3 @@ struct _EDKII_PLDM_PROTOCOL {
};
extern EFI_GUID gEdkiiPldmProtocolGuid;
#endif // EDKII_PLDM_PROTOCOL_H_

View file

@ -6,8 +6,7 @@
**/
#ifndef EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL_H_
#define EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL_H_
#pragma once
#include <IndustryStandard/Pldm.h>
@ -206,5 +205,3 @@ struct _EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL {
};
extern EFI_GUID gEdkiiPldmSmbiosTransferProtocolGuid;
#endif // EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL_H_

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_KCS_LIB_H_
#define MANAGEABILITY_TRANSPORT_KCS_LIB_H_
#pragma once
#include <Library/ManageabilityTransportLib.h>
@ -107,5 +106,3 @@ KcsRegisterWrite8 (
MANAGEABILITY_TRANSPORT_HARDWARE_IO Address,
UINT8 Value
);
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_MCTP_LIB_INTERNAL_H_
#define MANAGEABILITY_TRANSPORT_MCTP_LIB_INTERNAL_H_
#pragma once
#include <Library/ManageabilityTransportLib.h>
@ -22,5 +21,3 @@ typedef struct {
} MANAGEABILITY_TRANSPORT_MCTP;
#define MANAGEABILITY_TRANSPORT_MCTP_FROM_LINK(a) CR (a, MANAGEABILITY_TRANSPORT_MCTP, Token, MANAGEABILITY_TRANSPORT_MCTP_SIGNATURE)
#endif // MANAGEABILITY_TRANSPORT_MCTP_LIB_INTERNAL_H_

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_SERIAL_LIB_H_
#define MANAGEABILITY_TRANSPORT_SERIAL_LIB_H_
#pragma once
#include <IndustryStandard/IpmiNetFnApp.h>
#include <Library/ManageabilityTransportIpmiLib.h>
@ -89,5 +88,3 @@ SerialTransportSendCommand (
IN OUT UINT32 *ResponseDataSize OPTIONAL,
OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *AdditionalStatus
);
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_TRANSPORT_SSIF_LIB_H_
#define MANAGEABILITY_TRANSPORT_SSIF_LIB_H_
#pragma once
#include <IndustryStandard/IpmiNetFnApp.h>
#include <Library/ManageabilityTransportIpmiLib.h>
@ -90,5 +89,3 @@ SsifTransportSendCommand (
IN OUT UINT32 *ResponseDataSize OPTIONAL,
OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *AdditionalStatus
);
#endif

View file

@ -8,6 +8,8 @@
**/
#pragma once
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
@ -15,9 +17,6 @@
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#ifndef INTERNAL_IPMI_BLOB_TRANSFER_H_
#define INTERNAL_IPMI_BLOB_TRANSFER_H_
#define PROTOCOL_RESPONSE_OVERHEAD (4 * sizeof (UINT8)) // 1 byte completion code + 3 bytes OEN
// Subcommands for this protocol
@ -35,7 +34,7 @@ typedef enum {
IpmiBlobTransferSubcommandWriteMeta,
} IPMI_BLOB_TRANSFER_SUBCOMMANDS;
#pragma pack(1)
#pragma pack(1)
typedef struct {
UINT8 Oen[3];
@ -176,7 +175,7 @@ typedef struct {
#define IPMI_BLOB_TRANSFER_BLOB_WRITE_META_RESPONSE NULL
#pragma pack()
#pragma pack()
/**
Calculate CRC-16-CCITT with poly of 0x1021
@ -416,5 +415,3 @@ IpmiBlobTransferWriteMeta (
IN UINT8 *Data,
IN UINT32 WriteLength
);
#endif

View file

@ -7,8 +7,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_IPMI_COMMON_H_
#define MANAGEABILITY_IPMI_COMMON_H_
#pragma once
#include <IndustryStandard/IpmiKcs.h>
#include <Library/ManageabilityTransportLib.h>
@ -122,5 +121,3 @@ CommonIpmiSubmitCommand (
OUT UINT8 *ResponseData OPTIONAL,
IN OUT UINT32 *ResponseDataSize OPTIONAL
);
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_IPMI_PPI_INTERNAL_H_
#define MANAGEABILITY_IPMI_PPI_INTERNAL_H_
#pragma once
#include <Library/ManageabilityTransportLib.h>
#include <Ppi/IpmiPpi.h>
@ -27,5 +26,3 @@ typedef struct {
UINT32 TransportMaximumPayload;
PEI_IPMI_PPI PeiIpmiPpi;
} PEI_IPMI_PPI_INTERNAL;
#endif // MANAGEABILITY_IPMI_PPI_INTERNAL_H_

View file

@ -5,8 +5,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_MCTP_COMMON_H_
#define MANAGEABILITY_MCTP_COMMON_H_
#pragma once
#include <IndustryStandard/IpmiKcs.h>
#include <Library/ManageabilityTransportLib.h>
@ -135,5 +134,3 @@ CommonMctpSubmitMessage (
IN UINT32 ResponseTimeout,
OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *AdditionalTransferError
);
#endif

View file

@ -6,8 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MANAGEABILITY_EDKII_PLDM_COMMON_H_
#define MANAGEABILITY_EDKII_PLDM_COMMON_H_
#pragma once
#include <IndustryStandard/Pldm.h>
#include <Library/ManageabilityTransportLib.h>
@ -116,5 +115,3 @@ CommonPldmSubmitCommand (
OUT UINT8 *ResponseData OPTIONAL,
IN OUT UINT32 *ResponseDataSize
);
#endif // MANAGEABILITY_EDKII_PLDM_COMMON_H_