clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I95f756bab7f403af49a94011bbb1fe4e51f985ad
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/common/test/mocked_utils.hpp b/common/test/mocked_utils.hpp
index 8e887a5..ad6f8dc 100644
--- a/common/test/mocked_utils.hpp
+++ b/common/test/mocked_utils.hpp
@@ -25,8 +25,8 @@
class GetManagedEmptyObject
{
public:
- static pldm::utils::ObjectValueTree
- getManagedObj(const char* /*service*/, const char* /*path*/)
+ static pldm::utils::ObjectValueTree getManagedObj(const char* /*service*/,
+ const char* /*path*/)
{
return pldm::utils::ObjectValueTree{};
}
@@ -35,8 +35,8 @@
class GetManagedObject
{
public:
- static pldm::utils::ObjectValueTree
- getManagedObj(const char* /*service*/, const char* /*path*/)
+ static pldm::utils::ObjectValueTree getManagedObj(const char* /*service*/,
+ const char* /*path*/)
{
return pldm::utils::ObjectValueTree{
{sdbusplus::message::object_path("/foo/bar"),
diff --git a/common/transport.cpp b/common/transport.cpp
index 9641c38..5c9678a 100644
--- a/common/transport.cpp
+++ b/common/transport.cpp
@@ -63,8 +63,8 @@
return pldmTransport;
}
-[[maybe_unused]] static struct pldm_transport*
- pldm_transport_impl_af_mctp_init(TransportImpl& impl, pollfd& pollfd)
+[[maybe_unused]] static struct pldm_transport* pldm_transport_impl_af_mctp_init(
+ TransportImpl& impl, pollfd& pollfd)
{
impl.af_mctp = nullptr;
pldm_transport_af_mctp_init(&impl.af_mctp);
diff --git a/common/utils.cpp b/common/utils.cpp
index 7d7751c..aee2a31 100644
--- a/common/utils.cpp
+++ b/common/utils.cpp
@@ -27,9 +27,9 @@
namespace utils
{
-std::vector<std::vector<uint8_t>>
- findStateEffecterPDR(uint8_t /*tid*/, uint16_t entityID,
- uint16_t stateSetId, const pldm_pdr* repo)
+std::vector<std::vector<uint8_t>> findStateEffecterPDR(
+ uint8_t /*tid*/, uint16_t entityID, uint16_t stateSetId,
+ const pldm_pdr* repo)
{
uint8_t* outData = nullptr;
uint32_t size{};
@@ -79,9 +79,9 @@
return pdrs;
}
-std::vector<std::vector<uint8_t>>
- findStateSensorPDR(uint8_t /*tid*/, uint16_t entityID, uint16_t stateSetId,
- const pldm_pdr* repo)
+std::vector<std::vector<uint8_t>> findStateSensorPDR(
+ uint8_t /*tid*/, uint16_t entityID, uint16_t stateSetId,
+ const pldm_pdr* repo)
{
uint8_t* outData = nullptr;
uint32_t size{};
@@ -248,9 +248,9 @@
return mapperResponse.begin()->first;
}
-GetSubTreeResponse
- DBusHandler::getSubtree(const std::string& searchPath, int depth,
- const std::vector<std::string>& ifaceList) const
+GetSubTreeResponse DBusHandler::getSubtree(
+ const std::string& searchPath, int depth,
+ const std::vector<std::string>& ifaceList) const
{
auto& bus = pldm::utils::DBusHandler::getBus();
auto method = bus.new_method_call(ObjectMapper::default_service,
@@ -739,8 +739,8 @@
return true;
}
-std::optional<std::string>
- fruFieldValuestring(const uint8_t* value, const uint8_t& length)
+std::optional<std::string> fruFieldValuestring(const uint8_t* value,
+ const uint8_t& length)
{
if (!value || !length)
{
diff --git a/common/utils.hpp b/common/utils.hpp
index 37765ba..cd02f6c 100644
--- a/common/utils.hpp
+++ b/common/utils.hpp
@@ -208,24 +208,24 @@
virtual std::string getService(const char* path,
const char* interface) const = 0;
- virtual GetSubTreeResponse
- getSubtree(const std::string& path, int depth,
- const std::vector<std::string>& ifaceList) const = 0;
+ virtual GetSubTreeResponse getSubtree(
+ const std::string& path, int depth,
+ const std::vector<std::string>& ifaceList) const = 0;
- virtual GetSubTreePathsResponse
- getSubTreePaths(const std::string& objectPath, int depth,
- const std::vector<std::string>& ifaceList) const = 0;
+ virtual GetSubTreePathsResponse getSubTreePaths(
+ const std::string& objectPath, int depth,
+ const std::vector<std::string>& ifaceList) const = 0;
virtual void setDbusProperty(const DBusMapping& dBusMap,
const PropertyValue& value) const = 0;
- virtual PropertyValue
- getDbusPropertyVariant(const char* objPath, const char* dbusProp,
- const char* dbusInterface) const = 0;
+ virtual PropertyValue getDbusPropertyVariant(
+ const char* objPath, const char* dbusProp,
+ const char* dbusInterface) const = 0;
- virtual PropertyMap
- getDbusPropertiesVariant(const char* serviceName, const char* objPath,
- const char* dbusInterface) const = 0;
+ virtual PropertyMap getDbusPropertiesVariant(
+ const char* serviceName, const char* objPath,
+ const char* dbusInterface) const = 0;
};
/**
@@ -272,9 +272,9 @@
*
* @throw sdbusplus::exception_t when it fails
*/
- GetSubTreeResponse
- getSubtree(const std::string& path, int depth,
- const std::vector<std::string>& ifaceList) const override;
+ GetSubTreeResponse getSubtree(
+ const std::string& path, int depth,
+ const std::vector<std::string>& ifaceList) const override;
/** @brief Get Subtree path response from the mapper
*
@@ -299,9 +299,9 @@
*
* @throw sdbusplus::exception_t when it fails
*/
- PropertyValue
- getDbusPropertyVariant(const char* objPath, const char* dbusProp,
- const char* dbusInterface) const override;
+ PropertyValue getDbusPropertyVariant(
+ const char* objPath, const char* dbusProp,
+ const char* dbusInterface) const override;
/** @brief Get All properties(type: variant) from the requested dbus
*
@@ -313,9 +313,9 @@
*
* @throw sdbusplus::exception_t when it fails
*/
- PropertyMap
- getDbusPropertiesVariant(const char* serviceName, const char* objPath,
- const char* dbusInterface) const override;
+ PropertyMap getDbusPropertiesVariant(
+ const char* serviceName, const char* objPath,
+ const char* dbusInterface) const override;
/** @brief The template function to get property from the requested dbus
* path
@@ -576,8 +576,8 @@
*
* @return Fru string or nullopt.
*/
-std::optional<std::string>
- fruFieldValuestring(const uint8_t* value, const uint8_t& length);
+std::optional<std::string> fruFieldValuestring(const uint8_t* value,
+ const uint8_t& length);
/** @brief Convert the Fru Uint32 raw data from PLDM Fru to uint32_t
*
diff --git a/fw-update/activation.cpp b/fw-update/activation.cpp
index d39cf9f..abafd96 100644
--- a/fw-update/activation.cpp
+++ b/fw-update/activation.cpp
@@ -7,8 +7,8 @@
namespace fw_update
{
-ActivationIntf::Activations
- Activation::activation(ActivationIntf::Activations value)
+ActivationIntf::Activations Activation::activation(
+ ActivationIntf::Activations value)
{
if (value == ActivationIntf::Activations::Activating)
{
diff --git a/fw-update/activation.hpp b/fw-update/activation.hpp
index 4af7c44..f072124 100644
--- a/fw-update/activation.hpp
+++ b/fw-update/activation.hpp
@@ -105,8 +105,8 @@
/** @brief Overriding RequestedActivations property setter function
*/
- RequestedActivations
- requestedActivation(RequestedActivations value) override
+ RequestedActivations requestedActivation(
+ RequestedActivations value) override
{
if ((value == RequestedActivations::Active) &&
(requestedActivation() != RequestedActivations::Active))
diff --git a/fw-update/update_manager.hpp b/fw-update/update_manager.hpp
index 61db3e7..c24af61 100644
--- a/fw-update/update_manager.hpp
+++ b/fw-update/update_manager.hpp
@@ -83,10 +83,10 @@
/** @brief
*
*/
- DeviceUpdaterInfos
- associatePkgToDevices(const FirmwareDeviceIDRecords& fwDeviceIDRecords,
- const DescriptorMap& descriptorMap,
- TotalComponentUpdates& totalNumComponentUpdates);
+ DeviceUpdaterInfos associatePkgToDevices(
+ const FirmwareDeviceIDRecords& fwDeviceIDRecords,
+ const DescriptorMap& descriptorMap,
+ TotalComponentUpdates& totalNumComponentUpdates);
const std::string swRootPath{"/xyz/openbmc_project/software/"};
Event& event; //!< reference to PLDM daemon's main event loop
diff --git a/host-bmc/dbus/custom_dbus.cpp b/host-bmc/dbus/custom_dbus.cpp
index 1277d7a..d0979e9 100644
--- a/host-bmc/dbus/custom_dbus.cpp
+++ b/host-bmc/dbus/custom_dbus.cpp
@@ -16,8 +16,8 @@
location.at(path)->locationCode(value);
}
-std::optional<std::string>
- CustomDBus::getLocationCode(const std::string& path) const
+std::optional<std::string> CustomDBus::getLocationCode(
+ const std::string& path) const
{
if (location.contains(path))
{
diff --git a/host-bmc/host_pdr_handler.hpp b/host-bmc/host_pdr_handler.hpp
index 6f3d008..cabe525 100644
--- a/host-bmc/host_pdr_handler.hpp
+++ b/host-bmc/host_pdr_handler.hpp
@@ -174,8 +174,8 @@
*
* @param[in] handler - oem platform handler
*/
- inline void
- setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
+ inline void setOemPlatformHandler(
+ pldm::responder::oem_platform::Handler* handler)
{
oemPlatformHandler = handler;
}
diff --git a/libpldmresponder/base.hpp b/libpldmresponder/base.hpp
index e46b32c..c9ac56c 100644
--- a/libpldmresponder/base.hpp
+++ b/libpldmresponder/base.hpp
@@ -88,8 +88,8 @@
*
* @param[in] handler - oem platform handler
*/
- inline void
- setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
+ inline void setOemPlatformHandler(
+ pldm::responder::oem_platform::Handler* handler)
{
oemPlatformHandler = handler;
}
diff --git a/libpldmresponder/bios_attribute.hpp b/libpldmresponder/bios_attribute.hpp
index fb593e4..8dd21aa 100644
--- a/libpldmresponder/bios_attribute.hpp
+++ b/libpldmresponder/bios_attribute.hpp
@@ -48,10 +48,10 @@
* attribute value entry
* @param[in] stringTable - The string table
*/
- virtual void
- setAttrValueOnDbus(const pldm_bios_attr_val_table_entry* attrValueEntry,
- const pldm_bios_attr_table_entry* attrEntry,
- const BIOSStringTable& stringTable) = 0;
+ virtual void setAttrValueOnDbus(
+ const pldm_bios_attr_val_table_entry* attrValueEntry,
+ const pldm_bios_attr_table_entry* attrEntry,
+ const BIOSStringTable& stringTable) = 0;
/** @brief Construct corresponding entries at the end of the attribute table
* and attribute value tables
diff --git a/libpldmresponder/bios_enum_attribute.hpp b/libpldmresponder/bios_enum_attribute.hpp
index e26a32a..4b641df 100644
--- a/libpldmresponder/bios_enum_attribute.hpp
+++ b/libpldmresponder/bios_enum_attribute.hpp
@@ -38,10 +38,10 @@
* attribute value entry
* @param[in] stringTable - The string table
*/
- void
- setAttrValueOnDbus(const pldm_bios_attr_val_table_entry* attrValueEntry,
- const pldm_bios_attr_table_entry* attrEntry,
- const BIOSStringTable& stringTable) override;
+ void setAttrValueOnDbus(
+ const pldm_bios_attr_val_table_entry* attrValueEntry,
+ const pldm_bios_attr_table_entry* attrEntry,
+ const BIOSStringTable& stringTable) override;
/** @brief Construct corresponding entries at the end of the attribute table
* and attribute value tables
@@ -85,9 +85,9 @@
* @param[in] pVs - The possible values
* @return The handles
*/
- std::vector<uint16_t>
- getPossibleValuesHandle(const BIOSStringTable& stringTable,
- const std::vector<std::string>& pVs);
+ std::vector<uint16_t> getPossibleValuesHandle(
+ const BIOSStringTable& stringTable,
+ const std::vector<std::string>& pVs);
/** @brief Method to populate the valueDisplayNamesMap
* @param[in] attrHandle - attribute handle
diff --git a/libpldmresponder/bios_integer_attribute.hpp b/libpldmresponder/bios_integer_attribute.hpp
index 114b24a..6ed9c6b 100644
--- a/libpldmresponder/bios_integer_attribute.hpp
+++ b/libpldmresponder/bios_integer_attribute.hpp
@@ -34,10 +34,10 @@
* attribute value entry
* @param[in] stringTable - The string table
*/
- void
- setAttrValueOnDbus(const pldm_bios_attr_val_table_entry* attrValueEntry,
- const pldm_bios_attr_table_entry* attrEntry,
- const BIOSStringTable& stringTable) override;
+ void setAttrValueOnDbus(
+ const pldm_bios_attr_val_table_entry* attrValueEntry,
+ const pldm_bios_attr_table_entry* attrEntry,
+ const BIOSStringTable& stringTable) override;
/** @brief Construct corresponding entries at the end of the attribute table
* and attribute value tables
diff --git a/libpldmresponder/bios_string_attribute.hpp b/libpldmresponder/bios_string_attribute.hpp
index 33726d5..5e65595 100644
--- a/libpldmresponder/bios_string_attribute.hpp
+++ b/libpldmresponder/bios_string_attribute.hpp
@@ -57,10 +57,10 @@
* attribute value entry
* @param[in] stringTable - The string table
*/
- void
- setAttrValueOnDbus(const pldm_bios_attr_val_table_entry* attrValueEntry,
- const pldm_bios_attr_table_entry* attrEntry,
- const BIOSStringTable& stringTable) override;
+ void setAttrValueOnDbus(
+ const pldm_bios_attr_val_table_entry* attrValueEntry,
+ const pldm_bios_attr_table_entry* attrEntry,
+ const BIOSStringTable& stringTable) override;
/** @brief Construct corresponding entries at the end of the attribute table
* and attribute value tables
diff --git a/libpldmresponder/bios_table.cpp b/libpldmresponder/bios_table.cpp
index 17bb79b..9aab3e8 100644
--- a/libpldmresponder/bios_table.cpp
+++ b/libpldmresponder/bios_table.cpp
@@ -106,8 +106,8 @@
buffer.size());
return std::string(buffer.data(), buffer.data() + strLength);
}
-const pldm_bios_string_table_entry*
- constructEntry(Table& table, const std::string& str)
+const pldm_bios_string_table_entry* constructEntry(Table& table,
+ const std::string& str)
{
auto tableSize = table.size();
auto entryLength = pldm_bios_table_string_entry_encode_length(str.length());
@@ -131,15 +131,15 @@
return {attrHandle, attrType, stringHandle};
}
-const pldm_bios_attr_table_entry*
- findByHandle(const Table& table, uint16_t handle)
+const pldm_bios_attr_table_entry* findByHandle(const Table& table,
+ uint16_t handle)
{
return pldm_bios_table_attr_find_by_handle(table.data(), table.size(),
handle);
}
-const pldm_bios_attr_table_entry*
- findByStringHandle(const Table& table, uint16_t handle)
+const pldm_bios_attr_table_entry* findByStringHandle(const Table& table,
+ uint16_t handle)
{
return pldm_bios_table_attr_find_by_string_handle(table.data(),
table.size(), handle);
@@ -219,8 +219,8 @@
return {lower, upper, scalar, def};
}
-const pldm_bios_attr_table_entry*
- constructEnumEntry(Table& table, pldm_bios_table_attr_entry_enum_info* info)
+const pldm_bios_attr_table_entry* constructEnumEntry(
+ Table& table, pldm_bios_table_attr_entry_enum_info* info)
{
auto entryLength = pldm_bios_table_attr_entry_enum_encode_length(
info->pv_num, info->def_num);
@@ -285,8 +285,8 @@
return pldm_bios_table_attr_value_entry_integer_decode_cv(entry);
}
-std::vector<uint8_t>
- decodeEnumEntry(const pldm_bios_attr_val_table_entry* entry)
+std::vector<uint8_t> decodeEnumEntry(
+ const pldm_bios_attr_val_table_entry* entry)
{
auto number = pldm_bios_table_attr_value_entry_enum_decode_number(entry);
std::vector<uint8_t> currHdls(number, 0);
@@ -339,9 +339,9 @@
table.data() + tableSize);
}
-const pldm_bios_attr_val_table_entry*
- constructEnumEntry(Table& table, uint16_t attrHandle, uint8_t attrType,
- const std::vector<uint8_t>& handleIndices)
+const pldm_bios_attr_val_table_entry* constructEnumEntry(
+ Table& table, uint16_t attrHandle, uint8_t attrType,
+ const std::vector<uint8_t>& handleIndices)
{
auto entryLength = pldm_bios_table_attr_value_entry_encode_enum_length(
handleIndices.size());
diff --git a/libpldmresponder/bios_table.hpp b/libpldmresponder/bios_table.hpp
index 40839ae..61af79d 100644
--- a/libpldmresponder/bios_table.hpp
+++ b/libpldmresponder/bios_table.hpp
@@ -164,8 +164,8 @@
* @param[in] str - string itself
* @return pointer to the constructed entry
*/
-const pldm_bios_string_table_entry*
- constructEntry(Table& table, const std::string& str);
+const pldm_bios_string_table_entry* constructEntry(Table& table,
+ const std::string& str);
} // namespace string
@@ -193,16 +193,16 @@
* @param[in] handle - attribute handle
* @return Pointer to the attribute table entry
*/
-const pldm_bios_attr_table_entry*
- findByHandle(const Table& table, uint16_t handle);
+const pldm_bios_attr_table_entry* findByHandle(const Table& table,
+ uint16_t handle);
/** @brief Find attribute entry by string handle
* @param[in] table - attribute table
* @param[in] handle - string handle
* @return Pointer to the attribute table entry
*/
-const pldm_bios_attr_table_entry*
- findByStringHandle(const Table& table, uint16_t handle);
+const pldm_bios_attr_table_entry* findByStringHandle(const Table& table,
+ uint16_t handle);
/** @struct StringField
* @brief String field of attribute table
@@ -317,8 +317,8 @@
* @param[in] entry - Pointer to an attribute value table entry
* @return Current value string handle indices
*/
-std::vector<uint8_t>
- decodeEnumEntry(const pldm_bios_attr_val_table_entry* entry);
+std::vector<uint8_t> decodeEnumEntry(
+ const pldm_bios_attr_val_table_entry* entry);
/** @brief Construct string entry of attribute value table at the end of the
* given table
@@ -328,9 +328,9 @@
* @param[in] str - The string
* @return Pointer to the constructed entry
*/
-const pldm_bios_attr_val_table_entry*
- constructStringEntry(Table& table, uint16_t attrHandle, uint8_t attrType,
- const std::string& str);
+const pldm_bios_attr_val_table_entry* constructStringEntry(
+ Table& table, uint16_t attrHandle, uint8_t attrType,
+ const std::string& str);
/** @brief Construct integer entry of attribute value table at the end of
* the given table
@@ -351,9 +351,9 @@
* @param[in] handleIndices - handle indices
* @return Pointer to the constructed entry
*/
-const pldm_bios_attr_val_table_entry*
- constructEnumEntry(Table& table, uint16_t attrHandle, uint8_t attrType,
- const std::vector<uint8_t>& handleIndices);
+const pldm_bios_attr_val_table_entry* constructEnumEntry(
+ Table& table, uint16_t attrHandle, uint8_t attrType,
+ const std::vector<uint8_t>& handleIndices);
/** @brief construct a table with an new entry
* @param[in] table - the table need to be updated
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index 19909b1..5a5cec9 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -22,8 +22,8 @@
constexpr auto root = "/xyz/openbmc_project/inventory/";
-std::optional<pldm_entity>
- FruImpl::getEntityByObjectPath(const dbus::InterfaceMap& intfMaps)
+std::optional<pldm_entity> FruImpl::getEntityByObjectPath(
+ const dbus::InterfaceMap& intfMaps)
{
for (const auto& intfMap : intfMaps)
{
diff --git a/libpldmresponder/fru.hpp b/libpldmresponder/fru.hpp
index af55f92..490f5d1 100644
--- a/libpldmresponder/fru.hpp
+++ b/libpldmresponder/fru.hpp
@@ -156,8 +156,8 @@
*
* @return pldm_entity
*/
- std::optional<pldm_entity>
- getEntityByObjectPath(const dbus::InterfaceMap& intfMaps);
+ std::optional<pldm_entity> getEntityByObjectPath(
+ const dbus::InterfaceMap& intfMaps);
/** @brief Update pldm entity to association tree
*
@@ -320,8 +320,8 @@
*
* @return std::map<ObjectPath, pldm_entity>
*/
- const pldm::responder::dbus::AssociatedEntityMap&
- getAssociateEntityMap() const
+ const pldm::responder::dbus::AssociatedEntityMap& getAssociateEntityMap()
+ const
{
return impl.getAssociateEntityMap();
}
diff --git a/libpldmresponder/fru_parser.hpp b/libpldmresponder/fru_parser.hpp
index 9e59f11..828bb52 100644
--- a/libpldmresponder/fru_parser.hpp
+++ b/libpldmresponder/fru_parser.hpp
@@ -96,14 +96,14 @@
* @return return the info create the PLDM FRU records from inventory D-Bus
* objects
*/
- const FruRecordInfos&
- getRecordInfo(const pldm::responder::dbus::Interface& intf) const
+ const FruRecordInfos& getRecordInfo(
+ const pldm::responder::dbus::Interface& intf) const
{
return recordMap.at(intf);
}
- pldm::responder::dbus::EntityType
- getEntityType(const pldm::responder::dbus::Interface& intf) const
+ pldm::responder::dbus::EntityType getEntityType(
+ const pldm::responder::dbus::Interface& intf) const
{
return intfToEntityType.at(intf);
}
diff --git a/libpldmresponder/pdr.hpp b/libpldmresponder/pdr.hpp
index edd8810..18fd6a6 100644
--- a/libpldmresponder/pdr.hpp
+++ b/libpldmresponder/pdr.hpp
@@ -34,10 +34,10 @@
*
* @return pldm_pdr_record - Instance of pdr::RepoInterface
*/
-const pldm_pdr_record*
- getRecordByHandle(const pldm::responder::pdr_utils::RepoInterface& pdrRepo,
- pldm::responder::pdr_utils::RecordHandle recordHandle,
- pldm::responder::pdr_utils::PdrEntry& pdrEntry);
+const pldm_pdr_record* getRecordByHandle(
+ const pldm::responder::pdr_utils::RepoInterface& pdrRepo,
+ pldm::responder::pdr_utils::RecordHandle recordHandle,
+ pldm::responder::pdr_utils::PdrEntry& pdrEntry);
} // namespace pdr
} // namespace responder
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index 7d87c67..5a1d08c 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -158,8 +158,8 @@
return valueMap;
}
-std::tuple<TerminusHandle, SensorID, SensorInfo>
- parseStateSensorPDR(const std::vector<uint8_t>& stateSensorPdr)
+std::tuple<TerminusHandle, SensorID, SensorInfo> parseStateSensorPDR(
+ const std::vector<uint8_t>& stateSensorPdr)
{
auto pdr =
reinterpret_cast<const pldm_state_sensor_pdr*>(stateSensorPdr.data());
@@ -209,8 +209,8 @@
std::move(sensorInfo));
}
-std::vector<FruRecordDataFormat>
- parseFruRecordTable(const uint8_t* fruData, size_t fruLen)
+std::vector<FruRecordDataFormat> parseFruRecordTable(const uint8_t* fruData,
+ size_t fruLen)
{
// Refer: DSP0257_1.0.0 Table 2
// 7: uint16_t(FRU Record Set Identifier), uint8_t(FRU Record Type),
diff --git a/libpldmresponder/pdr_utils.hpp b/libpldmresponder/pdr_utils.hpp
index e56cc24..8167ea7 100644
--- a/libpldmresponder/pdr_utils.hpp
+++ b/libpldmresponder/pdr_utils.hpp
@@ -238,8 +238,8 @@
* @return std::vector<FruRecordDataFormat> - the vector of the FRU record data
* format structure
*/
-std::vector<FruRecordDataFormat>
- parseFruRecordTable(const uint8_t* fruData, size_t fruLen);
+std::vector<FruRecordDataFormat> parseFruRecordTable(const uint8_t* fruData,
+ size_t fruLen);
/** @brief Return the size of data type based on the effecterDataSize enum value
*
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index 9c45ef8..2422e3c 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -213,8 +213,8 @@
*
* @param[in] handler - oem platform handler
*/
- inline void
- setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
+ inline void setOemPlatformHandler(
+ pldm::responder::oem_platform::Handler* handler)
{
oemPlatformHandler = handler;
}
diff --git a/libpldmresponder/platform_numeric_effecter.hpp b/libpldmresponder/platform_numeric_effecter.hpp
index 79a746f..a38863b 100644
--- a/libpldmresponder/platform_numeric_effecter.hpp
+++ b/libpldmresponder/platform_numeric_effecter.hpp
@@ -32,9 +32,9 @@
* failure, PropertyValue: The value to be set
*/
template <typename T>
-std::pair<int, std::optional<pldm::utils::PropertyValue>>
- getEffecterRawValue(const pldm_numeric_effecter_value_pdr* pdr,
- T& effecterValue, std::string propertyType)
+std::pair<int, std::optional<pldm::utils::PropertyValue>> getEffecterRawValue(
+ const pldm_numeric_effecter_value_pdr* pdr, T& effecterValue,
+ std::string propertyType)
{
// X = Round [ (Y - B) / m ]
// refer to DSP0248_1.2.0 27.8
diff --git a/oem/ampere/event/oem_event_manager.cpp b/oem/ampere/event/oem_event_manager.cpp
index 7a2acff..479c789 100644
--- a/oem/ampere/event/oem_event_manager.cpp
+++ b/oem/ampere/event/oem_event_manager.cpp
@@ -221,8 +221,8 @@
{{1, {log_level::OK, "Normal"}},
{2, {log_level::CRITICAL, "Timer Expired"}}}}}}};
-std::string
- OemEventManager::prefixMsgStrCreation(pldm_tid_t tid, uint16_t sensorId)
+std::string OemEventManager::prefixMsgStrCreation(pldm_tid_t tid,
+ uint16_t sensorId)
{
std::string description;
if (!tidToSocketNameMap.contains(tid))
diff --git a/oem/ibm/libpldmresponder/collect_slot_vpd.cpp b/oem/ibm/libpldmresponder/collect_slot_vpd.cpp
index ff5e705..3e62aff 100644
--- a/oem/ibm/libpldmresponder/collect_slot_vpd.cpp
+++ b/oem/ibm/libpldmresponder/collect_slot_vpd.cpp
@@ -131,8 +131,8 @@
}
}
-std::optional<std::string>
- SlotHandler::getAdapterObjPath(const std::string& slotObjPath)
+std::optional<std::string> SlotHandler::getAdapterObjPath(
+ const std::string& slotObjPath)
{
static constexpr auto searchpath = "/xyz/openbmc_project/inventory";
int depth = 0;
diff --git a/oem/ibm/libpldmresponder/collect_slot_vpd.hpp b/oem/ibm/libpldmresponder/collect_slot_vpd.hpp
index 0d398ce..104a473 100644
--- a/oem/ibm/libpldmresponder/collect_slot_vpd.hpp
+++ b/oem/ibm/libpldmresponder/collect_slot_vpd.hpp
@@ -104,8 +104,8 @@
* @param[in] slotObjPath - The slot dbus object path
* @return - if Successfull, returns the adapter dbus object path
*/
- std::optional<std::string>
- getAdapterObjPath(const std::string& slotObjPath);
+ std::optional<std::string> getAdapterObjPath(
+ const std::string& slotObjPath);
/** @brief Method to call VPD collection & VPD removal API's
* @param[in] adapterObjectPath - The adapter D-Bus object path
diff --git a/oem/ibm/libpldmresponder/file_io_by_type.cpp b/oem/ibm/libpldmresponder/file_io_by_type.cpp
index 388f866..e233160 100644
--- a/oem/ibm/libpldmresponder/file_io_by_type.cpp
+++ b/oem/ibm/libpldmresponder/file_io_by_type.cpp
@@ -123,8 +123,8 @@
return transferFileData(fd(), upstream, offset, length, address);
}
-std::unique_ptr<FileHandler>
- getHandlerByType(uint16_t fileType, uint32_t fileHandle)
+std::unique_ptr<FileHandler> getHandlerByType(uint16_t fileType,
+ uint32_t fileHandle)
{
switch (fileType)
{
diff --git a/oem/ibm/libpldmresponder/file_io_by_type.hpp b/oem/ibm/libpldmresponder/file_io_by_type.hpp
index cf4a82c..c9056e9 100644
--- a/oem/ibm/libpldmresponder/file_io_by_type.hpp
+++ b/oem/ibm/libpldmresponder/file_io_by_type.hpp
@@ -130,7 +130,7 @@
* @param[in] fileHandle - file handle
*/
-std::unique_ptr<FileHandler>
- getHandlerByType(uint16_t fileType, uint32_t fileHandle);
+std::unique_ptr<FileHandler> getHandlerByType(uint16_t fileType,
+ uint32_t fileHandle);
} // namespace responder
} // namespace pldm
diff --git a/oem/ibm/libpldmresponder/utils.hpp b/oem/ibm/libpldmresponder/utils.hpp
index 4e849f5..bb111a4 100644
--- a/oem/ibm/libpldmresponder/utils.hpp
+++ b/oem/ibm/libpldmresponder/utils.hpp
@@ -73,9 +73,9 @@
* @param[in] entityMaps - the mapping of entity to DBus string
*
*/
- virtual int
- setCoreCount(const pldm::utils::EntityAssociations& associations,
- const pldm::utils::EntityMaps entityMaps);
+ virtual int setCoreCount(
+ const pldm::utils::EntityAssociations& associations,
+ const pldm::utils::EntityMaps entityMaps);
virtual ~Handler() = default;
diff --git a/platform-mc/platform_manager.cpp b/platform-mc/platform_manager.cpp
index 2b11ef6..9a053fc 100644
--- a/platform-mc/platform_manager.cpp
+++ b/platform-mc/platform_manager.cpp
@@ -604,8 +604,8 @@
co_return completionCode;
}
-exec::task<int>
- PlatformManager::getFRURecordTableMetadata(pldm_tid_t tid, uint16_t* total)
+exec::task<int> PlatformManager::getFRURecordTableMetadata(pldm_tid_t tid,
+ uint16_t* total)
{
Request request(
sizeof(pldm_msg_hdr) + PLDM_GET_FRU_RECORD_TABLE_METADATA_REQ_BYTES);
diff --git a/platform-mc/platform_manager.hpp b/platform-mc/platform_manager.hpp
index d16af75..c555452 100644
--- a/platform-mc/platform_manager.hpp
+++ b/platform-mc/platform_manager.hpp
@@ -72,13 +72,13 @@
* @param[out] transferCrc - CRC value when record data is last part of PDR
* @return coroutine return_value - PLDM completion code
*/
- exec::task<int>
- getPDR(const pldm_tid_t tid, const uint32_t recordHndl,
- const uint32_t dataTransferHndl, const uint8_t transferOpFlag,
- const uint16_t requestCnt, const uint16_t recordChgNum,
- uint32_t& nextRecordHndl, uint32_t& nextDataTransferHndl,
- uint8_t& transferFlag, uint16_t& responseCnt,
- std::vector<uint8_t>& recordData, uint8_t& transferCrc);
+ exec::task<int> getPDR(
+ const pldm_tid_t tid, const uint32_t recordHndl,
+ const uint32_t dataTransferHndl, const uint8_t transferOpFlag,
+ const uint16_t requestCnt, const uint16_t recordChgNum,
+ uint32_t& nextRecordHndl, uint32_t& nextDataTransferHndl,
+ uint8_t& transferFlag, uint16_t& responseCnt,
+ std::vector<uint8_t>& recordData, uint8_t& transferCrc);
/** @brief get PDR repository information.
*
diff --git a/platform-mc/sensor_manager.cpp b/platform-mc/sensor_manager.cpp
index 95dd422..5924106 100644
--- a/platform-mc/sensor_manager.cpp
+++ b/platform-mc/sensor_manager.cpp
@@ -248,8 +248,8 @@
co_return PLDM_SUCCESS;
}
-exec::task<int>
- SensorManager::getSensorReading(std::shared_ptr<NumericSensor> sensor)
+exec::task<int> SensorManager::getSensorReading(
+ std::shared_ptr<NumericSensor> sensor)
{
if (!sensor)
{
diff --git a/platform-mc/terminus.cpp b/platform-mc/terminus.cpp
index 99ba92b..03f1ba4 100644
--- a/platform-mc/terminus.cpp
+++ b/platform-mc/terminus.cpp
@@ -239,8 +239,8 @@
}
}
-std::shared_ptr<SensorAuxiliaryNames>
- Terminus::getSensorAuxiliaryNames(SensorId id)
+std::shared_ptr<SensorAuxiliaryNames> Terminus::getSensorAuxiliaryNames(
+ SensorId id)
{
auto it = std::find_if(
sensorAuxiliaryNamesTbl.begin(), sensorAuxiliaryNamesTbl.end(),
@@ -258,8 +258,8 @@
return nullptr;
};
-std::shared_ptr<SensorAuxiliaryNames>
- Terminus::parseSensorAuxiliaryNamesPDR(const std::vector<uint8_t>& pdrData)
+std::shared_ptr<SensorAuxiliaryNames> Terminus::parseSensorAuxiliaryNamesPDR(
+ const std::vector<uint8_t>& pdrData)
{
constexpr uint8_t nullTerminator = 0;
auto pdr = reinterpret_cast<const struct pldm_sensor_auxiliary_names_pdr*>(
@@ -313,8 +313,8 @@
pdr->sensor_id, pdr->sensor_count, std::move(sensorAuxNames));
}
-std::shared_ptr<EntityAuxiliaryNames>
- Terminus::parseEntityAuxiliaryNamesPDR(const std::vector<uint8_t>& pdrData)
+std::shared_ptr<EntityAuxiliaryNames> Terminus::parseEntityAuxiliaryNamesPDR(
+ const std::vector<uint8_t>& pdrData)
{
auto names_offset = sizeof(struct pldm_pdr_hdr) +
PLDM_PDR_ENTITY_AUXILIARY_NAME_PDR_MIN_LENGTH;
@@ -376,8 +376,8 @@
return std::make_shared<EntityAuxiliaryNames>(key, nameStrings);
}
-std::shared_ptr<pldm_numeric_sensor_value_pdr>
- Terminus::parseNumericSensorPDR(const std::vector<uint8_t>& pdr)
+std::shared_ptr<pldm_numeric_sensor_value_pdr> Terminus::parseNumericSensorPDR(
+ const std::vector<uint8_t>& pdr)
{
const uint8_t* ptr = pdr.data();
auto parsedPdr = std::make_shared<pldm_numeric_sensor_value_pdr>();
@@ -438,8 +438,8 @@
}
}
-std::shared_ptr<SensorAuxiliaryNames>
- Terminus::parseCompactNumericSensorNames(const std::vector<uint8_t>& sPdr)
+std::shared_ptr<SensorAuxiliaryNames> Terminus::parseCompactNumericSensorNames(
+ const std::vector<uint8_t>& sPdr)
{
std::vector<std::vector<std::pair<NameLanguageTag, SensorName>>>
sensorAuxNames{};
diff --git a/platform-mc/terminus.hpp b/platform-mc/terminus.hpp
index 10a8f55..da3d919 100644
--- a/platform-mc/terminus.hpp
+++ b/platform-mc/terminus.hpp
@@ -223,24 +223,24 @@
* @param[in] pdrData - the response PDRs from GetPDR command
* @return pointer to numeric sensor info struct
*/
- std::shared_ptr<pldm_numeric_sensor_value_pdr>
- parseNumericSensorPDR(const std::vector<uint8_t>& pdrData);
+ std::shared_ptr<pldm_numeric_sensor_value_pdr> parseNumericSensorPDR(
+ const std::vector<uint8_t>& pdrData);
/** @brief Parse the sensor Auxiliary name PDRs
*
* @param[in] pdrData - the response PDRs from GetPDR command
* @return pointer to sensor Auxiliary name info struct
*/
- std::shared_ptr<SensorAuxiliaryNames>
- parseSensorAuxiliaryNamesPDR(const std::vector<uint8_t>& pdrData);
+ std::shared_ptr<SensorAuxiliaryNames> parseSensorAuxiliaryNamesPDR(
+ const std::vector<uint8_t>& pdrData);
/** @brief Parse the Entity Auxiliary name PDRs
*
* @param[in] pdrData - the response PDRs from GetPDR command
* @return pointer to Entity Auxiliary name info struct
*/
- std::shared_ptr<EntityAuxiliaryNames>
- parseEntityAuxiliaryNamesPDR(const std::vector<uint8_t>& pdrData);
+ std::shared_ptr<EntityAuxiliaryNames> parseEntityAuxiliaryNamesPDR(
+ const std::vector<uint8_t>& pdrData);
/** @brief Construct the NumericSensor sensor class for the compact numeric
* PLDM sensor.
@@ -263,8 +263,8 @@
* @param[in] pdrData - the response PDRs from GetPDR command
* @return pointer to sensor Auxiliary name info struct
*/
- std::shared_ptr<SensorAuxiliaryNames>
- parseCompactNumericSensorNames(const std::vector<uint8_t>& pdrData);
+ std::shared_ptr<SensorAuxiliaryNames> parseCompactNumericSensorNames(
+ const std::vector<uint8_t>& pdrData);
/** @brief Create the terminus inventory path to
* /xyz/openbmc_project/inventory/Item/Board/.
diff --git a/platform-mc/terminus_manager.cpp b/platform-mc/terminus_manager.cpp
index 56902ad..dd5ee7f 100644
--- a/platform-mc/terminus_manager.cpp
+++ b/platform-mc/terminus_manager.cpp
@@ -52,8 +52,8 @@
return mctpInfoTableIt->first;
}
-std::optional<pldm_tid_t>
- TerminusManager::storeTerminusInfo(const MctpInfo& mctpInfo, pldm_tid_t tid)
+std::optional<pldm_tid_t> TerminusManager::storeTerminusInfo(
+ const MctpInfo& mctpInfo, pldm_tid_t tid)
{
if (tid == PLDM_TID_UNASSIGNED || tid == PLDM_TID_RESERVED)
{
@@ -144,8 +144,8 @@
exec::default_task_context<void>(exec::inline_scheduler{}));
}
-TerminiMapper::iterator
- TerminusManager::findTerminusPtr(const MctpInfo& mctpInfo)
+TerminiMapper::iterator TerminusManager::findTerminusPtr(
+ const MctpInfo& mctpInfo)
{
auto foundIter = std::find_if(
termini.begin(), termini.end(), [&](const auto& terminusPair) {
@@ -501,8 +501,8 @@
co_return responseMsg->payload[0];
}
-exec::task<int>
- TerminusManager::getPLDMTypes(pldm_tid_t tid, uint64_t& supportedTypes)
+exec::task<int> TerminusManager::getPLDMTypes(pldm_tid_t tid,
+ uint64_t& supportedTypes)
{
Request request(sizeof(pldm_msg_hdr));
auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
diff --git a/platform-mc/terminus_manager.hpp b/platform-mc/terminus_manager.hpp
index 8b7cd15..c37d74d 100644
--- a/platform-mc/terminus_manager.hpp
+++ b/platform-mc/terminus_manager.hpp
@@ -133,8 +133,8 @@
*
* @return tid - Terminus tid
*/
- std::optional<pldm_tid_t>
- storeTerminusInfo(const MctpInfo& mctpInfo, pldm_tid_t tid);
+ std::optional<pldm_tid_t> storeTerminusInfo(const MctpInfo& mctpInfo,
+ pldm_tid_t tid);
/** @brief Member functions to remove the TID from the transportLayer and
* mctpInfo table
diff --git a/pldmd/dbus_impl_pdr.cpp b/pldmd/dbus_impl_pdr.cpp
index ac39d9d..3fe0ab1 100644
--- a/pldmd/dbus_impl_pdr.cpp
+++ b/pldmd/dbus_impl_pdr.cpp
@@ -27,8 +27,8 @@
return pdrs;
}
-std::vector<std::vector<uint8_t>>
- Pdr::findStateSensorPDR(uint8_t tid, uint16_t entityID, uint16_t stateSetId)
+std::vector<std::vector<uint8_t>> Pdr::findStateSensorPDR(
+ uint8_t tid, uint16_t entityID, uint16_t stateSetId)
{
auto pdrs =
pldm::utils::findStateSensorPDR(tid, entityID, stateSetId, pdrRepo);
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index 0b6d129..ad86afe 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -100,10 +100,10 @@
}
}
-static std::optional<Response>
- processRxMsg(const std::vector<uint8_t>& requestMsg, Invoker& invoker,
- requester::Handler<requester::Request>& handler,
- fw_update::Manager* fwManager, pldm_tid_t tid)
+static std::optional<Response> processRxMsg(
+ const std::vector<uint8_t>& requestMsg, Invoker& invoker,
+ requester::Handler<requester::Request>& handler,
+ fw_update::Manager* fwManager, pldm_tid_t tid)
{
uint8_t eid = tid;
diff --git a/pldmtool/pldm_bios_cmd.cpp b/pldmtool/pldm_bios_cmd.cpp
index 160afd7..3b76b68 100644
--- a/pldmtool/pldm_bios_cmd.cpp
+++ b/pldmtool/pldm_bios_cmd.cpp
@@ -239,9 +239,9 @@
return std::make_optional<Table>(tableData, tableData + tableSize);
}
- const pldm_bios_attr_table_entry*
- findAttrEntryByName(const std::string& name, const Table& attrTable,
- const Table& stringTable)
+ const pldm_bios_attr_table_entry* findAttrEntryByName(
+ const std::string& name, const Table& attrTable,
+ const Table& stringTable)
{
auto stringEntry = pldm_bios_table_string_find_by_string(
stringTable.data(), stringTable.size(), name.c_str());
@@ -266,9 +266,9 @@
return nullptr;
}
- std::optional<uint16_t>
- findAttrHandleByName(const std::string& name, const Table& attrTable,
- const Table& stringTable)
+ std::optional<uint16_t> findAttrHandleByName(const std::string& name,
+ const Table& attrTable,
+ const Table& stringTable)
{
auto attribute = findAttrEntryByName(name, attrTable, stringTable);
if (attribute == nullptr)
@@ -677,10 +677,10 @@
const GetBIOSAttributeCurrentValueByHandle&) = delete;
GetBIOSAttributeCurrentValueByHandle(
GetBIOSAttributeCurrentValueByHandle&&) = delete;
- GetBIOSAttributeCurrentValueByHandle&
- operator=(const GetBIOSAttributeCurrentValueByHandle&) = delete;
- GetBIOSAttributeCurrentValueByHandle&
- operator=(GetBIOSAttributeCurrentValueByHandle&&) = delete;
+ GetBIOSAttributeCurrentValueByHandle& operator=(
+ const GetBIOSAttributeCurrentValueByHandle&) = delete;
+ GetBIOSAttributeCurrentValueByHandle& operator=(
+ GetBIOSAttributeCurrentValueByHandle&&) = delete;
explicit GetBIOSAttributeCurrentValueByHandle(
const char* type, const char* name, CLI::App* app) :
@@ -767,10 +767,10 @@
SetBIOSAttributeCurrentValue() = delete;
SetBIOSAttributeCurrentValue(const SetBIOSAttributeCurrentValue&) = delete;
SetBIOSAttributeCurrentValue(SetBIOSAttributeCurrentValue&&) = delete;
- SetBIOSAttributeCurrentValue&
- operator=(const SetBIOSAttributeCurrentValue&) = delete;
- SetBIOSAttributeCurrentValue&
- operator=(SetBIOSAttributeCurrentValue&&) = delete;
+ SetBIOSAttributeCurrentValue& operator=(
+ const SetBIOSAttributeCurrentValue&) = delete;
+ SetBIOSAttributeCurrentValue& operator=(SetBIOSAttributeCurrentValue&&) =
+ delete;
explicit SetBIOSAttributeCurrentValue(const char* type, const char* name,
CLI::App* app) :
diff --git a/pldmtool/pldm_fru_cmd.cpp b/pldmtool/pldm_fru_cmd.cpp
index b67d1bd..aeb6f09 100644
--- a/pldmtool/pldm_fru_cmd.cpp
+++ b/pldmtool/pldm_fru_cmd.cpp
@@ -33,8 +33,8 @@
GetFruRecordTableMetadata() = delete;
GetFruRecordTableMetadata(const GetFruRecordTableMetadata&) = delete;
GetFruRecordTableMetadata(GetFruRecordTableMetadata&&) = default;
- GetFruRecordTableMetadata&
- operator=(const GetFruRecordTableMetadata&) = delete;
+ GetFruRecordTableMetadata& operator=(const GetFruRecordTableMetadata&) =
+ delete;
GetFruRecordTableMetadata& operator=(GetFruRecordTableMetadata&&) = delete;
using CommandInterface::CommandInterface;
diff --git a/requester/handler.hpp b/requester/handler.hpp
index 4bbd170..33d9cb9 100644
--- a/requester/handler.hpp
+++ b/requester/handler.hpp
@@ -407,8 +407,8 @@
* Return [PLDM_ERROR_NOT_READY, nullptr, 0] if timed out.
* Return [PLDM_SUCCESS, resp, len] if succeeded
*/
- stdexec::sender_of<stdexec::set_value_t(SendRecvCoResp)> auto
- sendRecvMsg(mctp_eid_t eid, pldm::Request&& request);
+ stdexec::sender_of<stdexec::set_value_t(SendRecvCoResp)> auto sendRecvMsg(
+ mctp_eid_t eid, pldm::Request&& request);
private:
PldmTransport* pldmTransport; //!< PLDM transport object
diff --git a/requester/test/handler_test.cpp b/requester/test/handler_test.cpp
index 327817c..86e2717 100644
--- a/requester/test/handler_test.cpp
+++ b/requester/test/handler_test.cpp
@@ -236,9 +236,9 @@
{
struct _
{
- static exec::task<uint8_t>
- getTIDTask(Handler<MockRequest>& handler, mctp_eid_t eid,
- uint8_t instanceId, uint8_t& tid)
+ static exec::task<uint8_t> getTIDTask(Handler<MockRequest>& handler,
+ mctp_eid_t eid,
+ uint8_t instanceId, uint8_t& tid)
{
pldm::Request request(sizeof(pldm_msg_hdr), 0);
auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());