clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I013bc2f7001925df45d023333be75d4a59500a12
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/src/appcommands.cpp b/src/appcommands.cpp
index 4c7b229..ac1784b 100644
--- a/src/appcommands.cpp
+++ b/src/appcommands.cpp
@@ -223,8 +223,8 @@
// Get System GUID (CMD_APP_GET_SYS_GUID)
//----------------------------------------------------------------------
#if BIC_ENABLED
-ipmi::RspType<std::vector<uint8_t>>
- ipmiAppGetSysGUID(ipmi::Context::ptr ctx, std::vector<uint8_t> reqData)
+ipmi::RspType<std::vector<uint8_t>> ipmiAppGetSysGUID(
+ ipmi::Context::ptr ctx, std::vector<uint8_t> reqData)
{
std::vector<uint8_t> respData;
@@ -323,8 +323,8 @@
//----------------------------------------------------------------------
// Set Sys Info Params (IPMI/Sec 22.14a) (CMD_APP_SET_SYS_INFO_PARAMS)
//----------------------------------------------------------------------
-ipmi::RspType<uint8_t>
- ipmiAppSetSysInfoParams(ipmi::Context::ptr ctx, std::vector<uint8_t> req)
+ipmi::RspType<uint8_t> ipmiAppSetSysInfoParams(ipmi::Context::ptr ctx,
+ std::vector<uint8_t> req)
{
uint8_t param = req[0];
uint8_t req_len = req.size();
diff --git a/src/biccommands.cpp b/src/biccommands.cpp
index 6da886e..7ee177c 100644
--- a/src/biccommands.cpp
+++ b/src/biccommands.cpp
@@ -154,9 +154,9 @@
// netfn=0x38 and cmd=0x08 or 0x33 send the response back to the sender.
//----------------------------------------------------------------------
-ipmi::RspType<IanaType>
- ipmiOemPostCodeHandler(ipmi::Context::ptr ctx, IanaType reqIana,
- uint8_t dataLen, std::vector<uint8_t> data)
+ipmi::RspType<IanaType> ipmiOemPostCodeHandler(
+ ipmi::Context::ptr ctx, IanaType reqIana, uint8_t dataLen,
+ std::vector<uint8_t> data)
{
// creating bus connection
auto conn = getSdBus();
@@ -211,8 +211,8 @@
// netfn=0x38 and cmd=0x03 send the response back to the sender.
//----------------------------------------------------------------------
-ipmi::RspType<IanaType, std::vector<uint8_t>>
- ipmiOemGetBicGpioState(ipmi::Context::ptr ctx, std::vector<uint8_t> reqIana)
+ipmi::RspType<IanaType, std::vector<uint8_t>> ipmiOemGetBicGpioState(
+ ipmi::Context::ptr ctx, std::vector<uint8_t> reqIana)
{
std::vector<uint8_t> respData;
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 080c340..10011e0 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -1028,8 +1028,8 @@
//----------------------------------------------------------------------
// Get port 80 record (CMD_OEM_GET_80PORT_RECORD)
//----------------------------------------------------------------------
-ipmi::RspType<std::vector<uint8_t>>
- ipmiOemGet80PortRecord(ipmi::Context::ptr ctx)
+ipmi::RspType<std::vector<uint8_t>> ipmiOemGet80PortRecord(
+ ipmi::Context::ptr ctx)
{
auto postCodeService = "xyz.openbmc_project.State.Boot.PostCode" +
std::to_string(ctx->hostIdx + 1);
@@ -1091,8 +1091,8 @@
//----------------------------------------------------------------------
// Set Boot Order (CMD_OEM_SET_BOOT_ORDER)
//----------------------------------------------------------------------
-ipmi::RspType<std::vector<uint8_t>>
- ipmiOemSetBootOrder(ipmi::Context::ptr ctx, std::vector<uint8_t> bootSeq)
+ipmi::RspType<std::vector<uint8_t>> ipmiOemSetBootOrder(
+ ipmi::Context::ptr ctx, std::vector<uint8_t> bootSeq)
{
size_t len = bootSeq.size();
@@ -1677,9 +1677,9 @@
// Byte 6..7 – Revision
//
-ipmi::RspType<std::vector<uint8_t>>
- ipmiOemQGetProcInfo(ipmi::Context::ptr ctx, uint8_t, uint8_t, uint8_t,
- uint8_t procIndex, uint8_t paramSel)
+ipmi::RspType<std::vector<uint8_t>> ipmiOemQGetProcInfo(
+ ipmi::Context::ptr ctx, uint8_t, uint8_t, uint8_t, uint8_t procIndex,
+ uint8_t paramSel)
{
uint8_t numParam = sizeof(cpuInfoKey) / sizeof(uint8_t*);
std::stringstream ss;
@@ -1864,9 +1864,9 @@
// Byte 1 - Module Manufacturer ID, LSB
// Byte 2 - Module Manufacturer ID, MSB
//
-ipmi::RspType<std::vector<uint8_t>>
- ipmiOemQGetDimmInfo(ipmi::Context::ptr ctx, uint8_t, uint8_t, uint8_t,
- uint8_t dimmIndex, uint8_t paramSel)
+ipmi::RspType<std::vector<uint8_t>> ipmiOemQGetDimmInfo(
+ ipmi::Context::ptr ctx, uint8_t, uint8_t, uint8_t, uint8_t dimmIndex,
+ uint8_t paramSel)
{
uint8_t numParam = sizeof(dimmInfoKey) / sizeof(uint8_t*);
uint8_t res[MAX_BUF];
@@ -2085,9 +2085,9 @@
/* Helper function for sending DCMI commands to ME/BIC and
* getting response back
*/
-ipmi::RspType<std::vector<uint8_t>>
- sendDCMICmd([[maybe_unused]] ipmi::Context::ptr ctx,
- [[maybe_unused]] uint8_t cmd, std::vector<uint8_t>& cmdData)
+ipmi::RspType<std::vector<uint8_t>> sendDCMICmd(
+ [[maybe_unused]] ipmi::Context::ptr ctx, [[maybe_unused]] uint8_t cmd,
+ std::vector<uint8_t>& cmdData)
{
std::vector<uint8_t> respData;
@@ -2348,9 +2348,9 @@
}
template <size_t N>
-static ipmi_ret_t
- handleHwAssertBank(const char* name, std::span<const uint8_t> data,
- CrdState& currState, std::stringstream& ss)
+static ipmi_ret_t handleHwAssertBank(const char* name,
+ std::span<const uint8_t> data,
+ CrdState& currState, std::stringstream& ss)
{
if (data.size() < sizeof(CrdHwAssertBank<N>))
return IPMI_CC_REQ_DATA_LEN_INVALID;
diff --git a/src/selcommands.cpp b/src/selcommands.cpp
index 9fb3ced..515c241 100644
--- a/src/selcommands.cpp
+++ b/src/selcommands.cpp
@@ -1539,8 +1539,8 @@
info.operationSupport);
}
-ipmi::RspType<uint16_t, std::vector<uint8_t>>
- ipmiStorageGetSELEntry(std::vector<uint8_t> data)
+ipmi::RspType<uint16_t, std::vector<uint8_t>> ipmiStorageGetSELEntry(
+ std::vector<uint8_t> data)
{
if (data.size() != sizeof(fb_oem::ipmi::sel::GetSELEntryRequest))
{
@@ -1669,8 +1669,8 @@
}
// Main function to add SEL entry
-ipmi::RspType<uint16_t>
- ipmiStorageAddSELEntry(ipmi::Context::ptr ctx, std::vector<uint8_t> data)
+ipmi::RspType<uint16_t> ipmiStorageAddSELEntry(ipmi::Context::ptr ctx,
+ std::vector<uint8_t> data)
{
/* Per the IPMI spec, need to cancel any reservation when a
* SEL entry is added