clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I7b90380845efee6bf6a1fe342a793d71aa9ff181
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/phosphor-power-supply/power_supply.cpp b/phosphor-power-supply/power_supply.cpp
index 1f65fb2..68b2c7c 100644
--- a/phosphor-power-supply/power_supply.cpp
+++ b/phosphor-power-supply/power_supply.cpp
@@ -24,14 +24,13 @@
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Device::Error;
-PowerSupply::PowerSupply(sdbusplus::bus_t& bus, const std::string& invpath,
- std::uint8_t i2cbus, std::uint16_t i2caddr,
- const std::string& driver,
- const std::string& gpioLineName,
- std::function<bool()>&& callback) :
- bus(bus),
- inventoryPath(invpath), bindPath("/sys/bus/i2c/drivers/" + driver),
- isPowerOn(std::move(callback)), driverName(driver)
+PowerSupply::PowerSupply(
+ sdbusplus::bus_t& bus, const std::string& invpath, std::uint8_t i2cbus,
+ std::uint16_t i2caddr, const std::string& driver,
+ const std::string& gpioLineName, std::function<bool()>&& callback) :
+ bus(bus), inventoryPath(invpath),
+ bindPath("/sys/bus/i2c/drivers/" + driver), isPowerOn(std::move(callback)),
+ driverName(driver)
{
if (inventoryPath.empty())
{
@@ -383,13 +382,13 @@
{
if (statusWord != statusWordOld)
{
- log<level::ERR>(std::format("{} FANS fault/warning: "
- "STATUS_WORD = {:#06x}, "
- "STATUS_MFR_SPECIFIC = {:#04x}, "
- "STATUS_FANS_1_2 = {:#04x}",
- shortName, statusWord, statusMFR,
- statusFans12)
- .c_str());
+ log<level::ERR>(
+ std::format("{} FANS fault/warning: "
+ "STATUS_WORD = {:#06x}, "
+ "STATUS_MFR_SPECIFIC = {:#04x}, "
+ "STATUS_FANS_1_2 = {:#04x}",
+ shortName, statusWord, statusMFR, statusFans12)
+ .c_str());
}
fanFault++;
}
@@ -589,8 +588,8 @@
statusVout = pmbusIntf->read(status0Vout, Type::Debug);
statusIout = pmbusIntf->read(STATUS_IOUT, Type::Debug);
statusFans12 = pmbusIntf->read(STATUS_FANS_1_2, Type::Debug);
- statusTemperature = pmbusIntf->read(STATUS_TEMPERATURE,
- Type::Debug);
+ statusTemperature =
+ pmbusIntf->read(STATUS_TEMPERATURE, Type::Debug);
analyzeCMLFault();
@@ -859,8 +858,8 @@
const std::size_t& vpdSize)
{
std::string vpdValue;
- const std::regex illegalVPDRegex = std::regex("[^[:alnum:]]",
- std::regex::basic);
+ const std::regex illegalVPDRegex =
+ std::regex("[^[:alnum:]]", std::regex::basic);
try
{
@@ -1013,8 +1012,8 @@
try
{
- auto service = util::getService(INVENTORY_OBJ_PATH,
- INVENTORY_MGR_IFACE, bus);
+ auto service =
+ util::getService(INVENTORY_OBJ_PATH, INVENTORY_MGR_IFACE, bus);
if (service.empty())
{
@@ -1022,9 +1021,9 @@
return;
}
- auto method = bus.new_method_call(service.c_str(),
- INVENTORY_OBJ_PATH,
- INVENTORY_MGR_IFACE, "Notify");
+ auto method =
+ bus.new_method_call(service.c_str(), INVENTORY_OBJ_PATH,
+ INVENTORY_MGR_IFACE, "Notify");
method.append(std::move(object));
@@ -1051,8 +1050,8 @@
try
{
// Read max_power_out, should be direct format
- auto maxPowerOutStr = pmbusIntf->readString(MFR_POUT_MAX,
- Type::HwmonDeviceDebug);
+ auto maxPowerOutStr =
+ pmbusIntf->readString(MFR_POUT_MAX, Type::HwmonDeviceDebug);
log<level::INFO>(std::format("{} MFR_POUT_MAX read {}", shortName,
maxPowerOutStr)
.c_str());