clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I22459d78b3749df12c9fdba1e22d864cf4b2f98a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index a75a2c2..e5530e6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -104,7 +104,7 @@
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyReturnTypeOnItsOwnLine: 150
PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
diff --git a/peci.c b/peci.c
index ce6661a..d52913d 100644
--- a/peci.c
+++ b/peci.c
@@ -774,10 +774,10 @@
* This function provides read access to the local PCI configuration space in
* the specified domain
*------------------------------------------------------------------------*/
-EPECIStatus
- peci_RdPCIConfigLocal_dom(uint8_t target, uint8_t domainId, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t u8ReadLen, uint8_t* pPCIReg, uint8_t* cc)
+EPECIStatus peci_RdPCIConfigLocal_dom(
+ uint8_t target, uint8_t domainId, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen, uint8_t* pPCIReg,
+ uint8_t* cc)
{
int peci_fd = -1;
EPECIStatus ret = PECI_CC_SUCCESS;
@@ -809,10 +809,10 @@
* This function allows sequential RdPCIConfigLocal with the provided
* peci file descriptor.
*------------------------------------------------------------------------*/
-EPECIStatus
- peci_RdPCIConfigLocal_seq(uint8_t target, uint8_t u8Bus, uint8_t u8Device,
- uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen,
- uint8_t* pPCIReg, int peci_fd, uint8_t* cc)
+EPECIStatus peci_RdPCIConfigLocal_seq(
+ uint8_t target, uint8_t u8Bus, uint8_t u8Device, uint8_t u8Fcn,
+ uint16_t u16Reg, uint8_t u8ReadLen, uint8_t* pPCIReg, int peci_fd,
+ uint8_t* cc)
{
// Default to domain ID 0
return peci_RdPCIConfigLocal_seq_dom(
@@ -890,10 +890,10 @@
* This function provides write access to the local PCI configuration space in
* the specified domain
*------------------------------------------------------------------------*/
-EPECIStatus
- peci_WrPCIConfigLocal_dom(uint8_t target, uint8_t domainId, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t DataLen, uint32_t DataVal, uint8_t* cc)
+EPECIStatus peci_WrPCIConfigLocal_dom(
+ uint8_t target, uint8_t domainId, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t DataLen, uint32_t DataVal,
+ uint8_t* cc)
{
int peci_fd = -1;
struct peci_wr_pci_cfg_local_msg cmd = {0};
@@ -996,10 +996,10 @@
* This function provides read access to the PCI configuration space at
* the requested PCI configuration address.
*------------------------------------------------------------------------*/
-EPECIStatus
- peci_RdEndPointConfigPci(uint8_t target, uint8_t u8Seg, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t u8ReadLen, uint8_t* pPCIData, uint8_t* cc)
+EPECIStatus peci_RdEndPointConfigPci(
+ uint8_t target, uint8_t u8Seg, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen, uint8_t* pPCIData,
+ uint8_t* cc)
{
// Default to domain ID 0
return peci_RdEndPointConfigPci_dom(target, 0, u8Seg, u8Bus, u8Device,
@@ -1409,10 +1409,10 @@
/*-------------------------------------------------------------------------
* This function provides write access to the EP local PCI configuration space
*------------------------------------------------------------------------*/
-EPECIStatus
- peci_WrEndPointPCIConfig(uint8_t target, uint8_t u8Seg, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t DataLen, uint32_t DataVal, uint8_t* cc)
+EPECIStatus peci_WrEndPointPCIConfig(
+ uint8_t target, uint8_t u8Seg, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t DataLen, uint32_t DataVal,
+ uint8_t* cc)
{
// Default to domain ID 0
return peci_WrEndPointPCIConfig_dom(target, 0, u8Seg, u8Bus, u8Device,
diff --git a/peci.h b/peci.h
index 2fad797..6bcab0b 100644
--- a/peci.h
+++ b/peci.h
@@ -177,10 +177,10 @@
// Allows sequential RdPCIConfig with the provided peci file descriptor in
// the specified domain
-EPECIStatus
- peci_RdPCIConfig_seq_dom(uint8_t target, uint8_t domainId, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t* pPCIData, int peci_fd, uint8_t* cc);
+EPECIStatus peci_RdPCIConfig_seq_dom(
+ uint8_t target, uint8_t domainId, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t* pPCIData, int peci_fd,
+ uint8_t* cc);
// Provides read access to the local PCI Configuration space
EPECIStatus peci_RdPCIConfigLocal(
@@ -189,16 +189,16 @@
// Provides read access to the local PCI Configuration space in the
// specified domain
-EPECIStatus
- peci_RdPCIConfigLocal_dom(uint8_t target, uint8_t domainId, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t u8ReadLen, uint8_t* pPCIReg, uint8_t* cc);
+EPECIStatus peci_RdPCIConfigLocal_dom(
+ uint8_t target, uint8_t domainId, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen, uint8_t* pPCIReg,
+ uint8_t* cc);
// Allows sequential RdPCIConfigLocal with the provided peci file descriptor
-EPECIStatus
- peci_RdPCIConfigLocal_seq(uint8_t target, uint8_t u8Bus, uint8_t u8Device,
- uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen,
- uint8_t* pPCIReg, int peci_fd, uint8_t* cc);
+EPECIStatus peci_RdPCIConfigLocal_seq(
+ uint8_t target, uint8_t u8Bus, uint8_t u8Device, uint8_t u8Fcn,
+ uint16_t u16Reg, uint8_t u8ReadLen, uint8_t* pPCIReg, int peci_fd,
+ uint8_t* cc);
// Allows sequential RdPCIConfigLocal with the provided peci file descriptor
// in the specified domain
@@ -214,16 +214,16 @@
// Provides write access to the local PCI Configuration space in the
// specified domain
-EPECIStatus
- peci_WrPCIConfigLocal_dom(uint8_t target, uint8_t domainId, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t DataLen, uint32_t DataVal, uint8_t* cc);
+EPECIStatus peci_WrPCIConfigLocal_dom(
+ uint8_t target, uint8_t domainId, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t DataLen, uint32_t DataVal,
+ uint8_t* cc);
// Provides read access to PCI configuration space
-EPECIStatus
- peci_RdEndPointConfigPci(uint8_t target, uint8_t u8Seg, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t u8ReadLen, uint8_t* pPCIData, uint8_t* cc);
+EPECIStatus peci_RdEndPointConfigPci(
+ uint8_t target, uint8_t u8Seg, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen, uint8_t* pPCIData,
+ uint8_t* cc);
// Provides read access to PCI configuration space in the specified domain
EPECIStatus peci_RdEndPointConfigPci_dom(
@@ -310,10 +310,10 @@
uint32_t DataVal, uint8_t* cc);
// Provides write access to the EP PCI Configuration space
-EPECIStatus
- peci_WrEndPointPCIConfig(uint8_t target, uint8_t u8Seg, uint8_t u8Bus,
- uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg,
- uint8_t DataLen, uint32_t DataVal, uint8_t* cc);
+EPECIStatus peci_WrEndPointPCIConfig(
+ uint8_t target, uint8_t u8Seg, uint8_t u8Bus, uint8_t u8Device,
+ uint8_t u8Fcn, uint16_t u16Reg, uint8_t DataLen, uint32_t DataVal,
+ uint8_t* cc);
// Provides write access to the EP PCI Configuration space in the specified
// domain