MdePkg: Change OPTIONAL keyword usage style

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael D Kinney
2021-12-02 18:00:50 -08:00
committed by mergify[bot]
parent e3917e22e7
commit d0e2f8232a
87 changed files with 450 additions and 469 deletions

View File

@@ -128,7 +128,7 @@ EFI_STATUS
IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This,
IN BOOLEAN ReScan,
IN UINT32 Timeout,
IN EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER *ScanParameter, OPTIONAL
IN EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER *ScanParameter OPTIONAL,
IN EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION Callback,
IN VOID *Context
);
@@ -197,7 +197,7 @@ EFI_STATUS
IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This,
IN BOOLEAN AutoReconnect,
IN BOOLEAN DoBonding,
IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER *ConnectParameter, OPTIONAL
IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER *ConnectParameter OPTIONAL,
IN BLUETOOTH_LE_ADDRESS *BD_ADDR
);
@@ -627,4 +627,3 @@ struct _EFI_BLUETOOTH_LE_CONFIG_PROTOCOL {
extern EFI_GUID gEfiBluetoothLeConfigProtocolGuid;
#endif

View File

@@ -102,9 +102,9 @@ EFI_STATUS
IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
IN EFI_HII_HANDLE *Handle,
IN UINTN HandleCount,
IN EFI_GUID *FormSetGuid, OPTIONAL
IN EFI_FORM_ID FormId, OPTIONAL
IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
IN EFI_GUID *FormSetGuid OPTIONAL,
IN EFI_FORM_ID FormId OPTIONAL,
IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL,
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
);
@@ -155,7 +155,7 @@ EFI_STATUS
IN OUT UINTN *ResultsDataSize,
IN OUT EFI_STRING ResultsData,
IN CONST BOOLEAN RetrieveData,
IN CONST EFI_GUID *VariableGuid, OPTIONAL
IN CONST EFI_GUID *VariableGuid OPTIONAL,
IN CONST CHAR16 *VariableName OPTIONAL
);
@@ -171,4 +171,3 @@ struct _EFI_FORM_BROWSER2_PROTOCOL {
extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
#endif

View File

@@ -210,7 +210,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT)(
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,

View File

@@ -175,8 +175,8 @@ typedef
EFI_STATUS
(EFIAPI *EFI_CONFIG_KEYWORD_HANDLER_GET_DATA) (
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
IN CONST EFI_STRING NameSpaceId, OPTIONAL
IN CONST EFI_STRING KeywordString, OPTIONAL
IN CONST EFI_STRING NameSpaceId OPTIONAL,
IN CONST EFI_STRING KeywordString OPTIONAL,
OUT EFI_STRING *Progress,
OUT UINT32 *ProgressErr,
OUT EFI_STRING *Results
@@ -196,4 +196,3 @@ struct _EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL {
extern EFI_GUID gEfiConfigKeywordHandlerProtocolGuid;
#endif

View File

@@ -103,7 +103,7 @@ EFI_STATUS
(EFIAPI *EFI_HII_DATABASE_NEW_PACK)(
IN CONST EFI_HII_DATABASE_PROTOCOL *This,
IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
IN EFI_HANDLE DriverHandle, OPTIONAL
IN EFI_HANDLE DriverHandle OPTIONAL,
OUT EFI_HII_HANDLE *Handle
);
@@ -524,5 +524,3 @@ struct _EFI_HII_DATABASE_PROTOCOL {
extern EFI_GUID gEfiHiiDatabaseProtocolGuid;
#endif

View File

@@ -447,7 +447,7 @@ EFI_STATUS
(EFIAPI *EFI_HII_GET_FONT_INFO)(
IN CONST EFI_HII_FONT_PROTOCOL *This,
IN OUT EFI_FONT_HANDLE *FontHandle,
IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn OPTIONAL,
OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
IN CONST EFI_STRING String OPTIONAL
);
@@ -466,4 +466,3 @@ extern EFI_GUID gEfiHiiFontProtocolGuid;
#endif

View File

@@ -58,7 +58,7 @@ EFI_STATUS
IN EFI_HII_HANDLE PackageList,
OUT EFI_STRING_ID *StringId,
IN CONST CHAR8 *Language,
IN CONST CHAR16 *LanguageName, OPTIONAL
IN CONST CHAR16 *LanguageName OPTIONAL,
IN CONST EFI_STRING String,
IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
);
@@ -235,4 +235,3 @@ struct _EFI_HII_STRING_PROTOCOL {
extern EFI_GUID gEfiHiiStringProtocolGuid;
#endif

View File

@@ -60,11 +60,11 @@ EFI_STATUS
(EFIAPI *EFI_HTTP_UTILS_BUILD) (
IN EFI_HTTP_UTILITIES_PROTOCOL *This,
IN UINTN SeedMessageSize,
IN VOID *SeedMessage, OPTIONAL
IN VOID *SeedMessage OPTIONAL,
IN UINTN DeleteCount,
IN CHAR8 *DeleteList[], OPTIONAL
IN CHAR8 *DeleteList[] OPTIONAL,
IN UINTN AppendCount,
IN EFI_HTTP_HEADER *AppendList[], OPTIONAL
IN EFI_HTTP_HEADER *AppendList[] OPTIONAL,
OUT UINTN *NewMessageSize,
OUT VOID **NewMessage
);

View File

@@ -707,7 +707,7 @@ EFI_STATUS
typedef
VOID
(EFIAPI *PCD_PROTOCOL_CALLBACK)(
IN CONST EFI_GUID *CallBackGuid, OPTIONAL
IN CONST EFI_GUID *CallBackGuid OPTIONAL,
IN UINTN CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
@@ -730,7 +730,7 @@ VOID
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_CALLBACK_ONSET)(
IN CONST EFI_GUID *Guid, OPTIONAL
IN CONST EFI_GUID *Guid OPTIONAL,
IN UINTN TokenNumber,
IN PCD_PROTOCOL_CALLBACK CallBackFunction
);
@@ -752,7 +752,7 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_CANCEL_CALLBACK)(
IN CONST EFI_GUID *Guid, OPTIONAL
IN CONST EFI_GUID *Guid OPTIONAL,
IN UINTN TokenNumber,
IN PCD_PROTOCOL_CALLBACK CallBackFunction
);
@@ -788,7 +788,7 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_GET_NEXT_TOKEN)(
IN CONST EFI_GUID *Guid, OPTIONAL
IN CONST EFI_GUID *Guid OPTIONAL,
IN OUT UINTN *TokenNumber
);

View File

@@ -200,7 +200,7 @@ EFI_STATUS
IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
IN UINT64 HpcPciAddress,
IN EFI_EVENT Event, OPTIONAL
IN EFI_EVENT Event OPTIONAL,
OUT EFI_HPC_STATE *HpcState
);

View File

@@ -468,7 +468,7 @@ EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES)(
IN EFI_PCI_IO_PROTOCOL *This,
IN UINT8 BarIndex,
OUT UINT64 *Supports, OPTIONAL
OUT UINT64 *Supports OPTIONAL,
OUT VOID **Resources OPTIONAL
);

View File

@@ -371,7 +371,7 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PCD_PROTOCOL_GET_NEXT_TOKEN)(
IN CONST EFI_GUID *Guid, OPTIONAL
IN CONST EFI_GUID *Guid OPTIONAL,
IN UINTN *TokenNumber
);

View File

@@ -621,11 +621,11 @@ EFI_STATUS
IN UINT16 OpFlags,
IN EFI_IP_ADDRESS *DestIp,
IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,
IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
IN UINTN *HeaderSize, OPTIONAL
IN VOID *HeaderPtr, OPTIONAL
IN EFI_IP_ADDRESS *GatewayIp OPTIONAL,
IN EFI_IP_ADDRESS *SrcIp OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL,
IN UINTN *HeaderSize OPTIONAL,
IN VOID *HeaderPtr OPTIONAL,
IN UINTN *BufferSize,
IN VOID *BufferPtr
);
@@ -673,12 +673,12 @@ EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ)(
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN UINT16 OpFlags,
IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort, OPTIONAL
IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
IN UINTN *HeaderSize, OPTIONAL
IN VOID *HeaderPtr, OPTIONAL
IN OUT EFI_IP_ADDRESS *DestIp OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort OPTIONAL,
IN OUT EFI_IP_ADDRESS *SrcIp OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL,
IN UINTN *HeaderSize OPTIONAL,
IN VOID *HeaderPtr OPTIONAL,
IN OUT UINTN *BufferSize,
IN VOID *BufferPtr
);
@@ -795,10 +795,10 @@ typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS)(
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN BOOLEAN *NewAutoArp, OPTIONAL
IN BOOLEAN *NewSendGUID, OPTIONAL
IN UINT8 *NewTTL, OPTIONAL
IN UINT8 *NewToS, OPTIONAL
IN BOOLEAN *NewAutoArp OPTIONAL,
IN BOOLEAN *NewSendGUID OPTIONAL,
IN UINT8 *NewTTL OPTIONAL,
IN UINT8 *NewToS OPTIONAL,
IN BOOLEAN *NewMakeCallback OPTIONAL
);
@@ -829,7 +829,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP)(
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL
IN EFI_IP_ADDRESS *NewStationIp OPTIONAL,
IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL
);
@@ -868,17 +868,17 @@ typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS)(
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
BOOLEAN *NewDhcpDiscoverValid, OPTIONAL
BOOLEAN *NewDhcpAckReceived, OPTIONAL
BOOLEAN *NewProxyOfferReceived, OPTIONAL
BOOLEAN *NewPxeDiscoverValid, OPTIONAL
BOOLEAN *NewPxeReplyReceived, OPTIONAL
BOOLEAN *NewPxeBisReplyReceived, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply, OPTIONAL
BOOLEAN *NewDhcpDiscoverValid OPTIONAL,
BOOLEAN *NewDhcpAckReceived OPTIONAL,
BOOLEAN *NewProxyOfferReceived OPTIONAL,
BOOLEAN *NewPxeDiscoverValid OPTIONAL,
BOOLEAN *NewPxeReplyReceived OPTIONAL,
BOOLEAN *NewPxeBisReplyReceived OPTIONAL,
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover OPTIONAL,
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck OPTIONAL,
IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer OPTIONAL,
IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover OPTIONAL,
IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply OPTIONAL,
IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL
);

View File

@@ -143,9 +143,9 @@ EFI_STATUS
IN EFI_REGULAR_EXPRESSION_PROTOCOL *This,
IN CHAR16 *String,
IN CHAR16 *Pattern,
IN EFI_REGEX_SYNTAX_TYPE *SyntaxType, OPTIONAL
IN EFI_REGEX_SYNTAX_TYPE *SyntaxType OPTIONAL,
OUT BOOLEAN *Result,
OUT EFI_REGEX_CAPTURE **Captures, OPTIONAL
OUT EFI_REGEX_CAPTURE **Captures OPTIONAL,
OUT UINTN *CapturesCount
);

View File

@@ -125,7 +125,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_RNG_GET_RNG) (
IN EFI_RNG_PROTOCOL *This,
IN EFI_RNG_ALGORITHM *RNGAlgorithm, OPTIONAL
IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL,
IN UINTN RNGValueLength,
OUT UINT8 *RNGValue
);

View File

@@ -80,7 +80,7 @@ typedef struct _EFI_SECURITY2_ARCH_PROTOCOL EFI_SECURITY2_ARCH_PROTOCOL;
**/
typedef EFI_STATUS (EFIAPI *EFI_SECURITY2_FILE_AUTHENTICATION) (
IN CONST EFI_SECURITY2_ARCH_PROTOCOL *This,
IN CONST EFI_DEVICE_PATH_PROTOCOL *File, OPTIONAL
IN CONST EFI_DEVICE_PATH_PROTOCOL *File OPTIONAL,
IN VOID *FileBuffer,
IN UINTN FileSize,
IN BOOLEAN BootPolicy

View File

@@ -184,7 +184,7 @@ EFI_STATUS
(EFIAPI *EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE)(
IN CONST EFI_SMBUS_HC_PROTOCOL *This,
IN BOOLEAN ArpAll,
IN EFI_SMBUS_UDID *SmbusUdid, OPTIONAL
IN EFI_SMBUS_UDID *SmbusUdid OPTIONAL,
IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL
);
@@ -286,4 +286,3 @@ struct _EFI_SMBUS_HC_PROTOCOL {
extern EFI_GUID gEfiSmbusHcProtocolGuid;
#endif

View File

@@ -335,8 +335,8 @@ typedef
EFI_STATUS
(EFIAPI *EFI_SUPPLICANT_BUILD_RESPONSE_PACKET) (
IN EFI_SUPPLICANT_PROTOCOL *This,
IN UINT8 *RequestBuffer, OPTIONAL
IN UINTN RequestBufferSize, OPTIONAL
IN UINT8 *RequestBuffer OPTIONAL,
IN UINTN RequestBufferSize OPTIONAL,
OUT UINT8 *Buffer,
IN OUT UINTN *BufferSize
);
@@ -435,7 +435,7 @@ EFI_STATUS
(EFIAPI *EFI_SUPPLICANT_GET_DATA) (
IN EFI_SUPPLICANT_PROTOCOL *This,
IN EFI_SUPPLICANT_DATA_TYPE DataType,
OUT UINT8 *Data, OPTIONAL
OUT UINT8 *Data OPTIONAL,
IN OUT UINTN *DataSize
);

View File

@@ -398,7 +398,7 @@ EFI_STATUS
(EFIAPI *EFI_TLS_GET_SESSION_DATA) (
IN EFI_TLS_PROTOCOL *This,
IN EFI_TLS_SESSION_DATA_TYPE DataType,
IN OUT VOID *Data, OPTIONAL
IN OUT VOID *Data OPTIONAL,
IN OUT UINTN *DataSize
);
@@ -444,9 +444,9 @@ typedef
EFI_STATUS
(EFIAPI *EFI_TLS_BUILD_RESPONSE_PACKET) (
IN EFI_TLS_PROTOCOL *This,
IN UINT8 *RequestBuffer, OPTIONAL
IN UINTN RequestSize, OPTIONAL
OUT UINT8 *Buffer, OPTIONAL
IN UINT8 *RequestBuffer OPTIONAL,
IN UINTN RequestSize OPTIONAL,
OUT UINT8 *Buffer OPTIONAL,
IN OUT UINTN *BufferSize
);
@@ -508,4 +508,3 @@ extern EFI_GUID gEfiTlsServiceBindingProtocolGuid;
extern EFI_GUID gEfiTlsProtocolGuid;
#endif // __EFI_TLS_PROTOCOL_H__

View File

@@ -108,7 +108,7 @@ EFI_STATUS
(EFIAPI *EFI_TLS_CONFIGURATION_GET_DATA)(
IN EFI_TLS_CONFIGURATION_PROTOCOL *This,
IN EFI_TLS_CONFIG_DATA_TYPE DataType,
IN OUT VOID *Data, OPTIONAL
IN OUT VOID *Data OPTIONAL,
IN OUT UINTN *DataSize
);
@@ -124,4 +124,3 @@ struct _EFI_TLS_CONFIGURATION_PROTOCOL {
extern EFI_GUID gEfiTlsConfigurationProtocolGuid;
#endif //__EFI_TLS_CONFIGURATION_PROTOCOL_H__

View File

@@ -134,7 +134,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)(
IN EFI_UGA_DRAW_PROTOCOL * This,
IN EFI_UGA_PIXEL * BltBuffer, OPTIONAL
IN EFI_UGA_PIXEL * BltBuffer OPTIONAL,
IN EFI_UGA_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,