fix code format for clang-format

Google-Bug-Id: 367716722
Change-Id: Idda2f597215a4608199fd81a3ec46482764f92b5
Signed-off-by: Muhammad Usama <muhammadusama@google.com>
diff --git a/src/ChassisIntrusionSensor.cpp b/src/ChassisIntrusionSensor.cpp
index 6123490..e0a7a97 100644
--- a/src/ChassisIntrusionSensor.cpp
+++ b/src/ChassisIntrusionSensor.cpp
@@ -303,8 +303,7 @@
 }
 
 ChassisIntrusionSensor::ChassisIntrusionSensor(
-    sdbusplus::asio::object_server& objServer) :
-    mObjServer(objServer)
+    sdbusplus::asio::object_server& objServer) : mObjServer(objServer)
 {
     mIface = mObjServer.add_interface("/xyz/openbmc_project/Chassis/Intrusion",
                                       "xyz.openbmc_project.Chassis.Intrusion");
@@ -313,8 +312,7 @@
 ChassisIntrusionPchSensor::ChassisIntrusionPchSensor(
     boost::asio::io_context& io, sdbusplus::asio::object_server& objServer,
     int busId, int slaveAddr) :
-    ChassisIntrusionSensor(objServer),
-    mPollTimer(io)
+    ChassisIntrusionSensor(objServer), mPollTimer(io)
 {
     if (busId < 0 || slaveAddr <= 0)
     {
@@ -357,8 +355,7 @@
 ChassisIntrusionGpioSensor::ChassisIntrusionGpioSensor(
     boost::asio::io_context& io, sdbusplus::asio::object_server& objServer,
     bool gpioInverted) :
-    ChassisIntrusionSensor(objServer),
-    mGpioInverted(gpioInverted), mGpioFd(io)
+    ChassisIntrusionSensor(objServer), mGpioInverted(gpioInverted), mGpioFd(io)
 {
     mGpioLine = gpiod::find_line(mPinName);
     if (!mGpioLine)
@@ -382,8 +379,8 @@
 ChassisIntrusionHwmonSensor::ChassisIntrusionHwmonSensor(
     boost::asio::io_context& io, sdbusplus::asio::object_server& objServer,
     std::string hwmonName) :
-    ChassisIntrusionSensor(objServer),
-    mHwmonName(std::move(hwmonName)), mPollTimer(io)
+    ChassisIntrusionSensor(objServer), mHwmonName(std::move(hwmonName)),
+    mPollTimer(io)
 {
     std::vector<fs::path> paths;
 
diff --git a/src/DeviceMgmt.hpp b/src/DeviceMgmt.hpp
index c8c76f1..122d88e 100644
--- a/src/DeviceMgmt.hpp
+++ b/src/DeviceMgmt.hpp
@@ -28,7 +28,7 @@
 struct I2CDeviceParams
 {
     I2CDeviceParams(const I2CDeviceType& type, uint64_t bus, uint64_t address) :
-        type(&type), bus(bus), address(address){};
+        type(&type), bus(bus), address(address) {};
 
     const I2CDeviceType* type;
     uint64_t bus;
diff --git a/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index f235c26..7fe6de9 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -140,8 +140,7 @@
                         std::cerr << "Error setting pid class\n";
                         return;
                     }
-                },
-                    owner, path, "org.freedesktop.DBus.Properties", "Set",
+                }, owner, path, "org.freedesktop.DBus.Properties", "Set",
                     pidConfigurationType, "OutLimitMax",
                     std::variant<double>(value));
             },
@@ -626,8 +625,7 @@
                     properties::get, sensorValueInterface, "Value");
             }
         }
-    },
-        mapper::busName, mapper::path, mapper::interface, mapper::subtree,
+    }, mapper::busName, mapper::path, mapper::interface, mapper::subtree,
         "/xyz/openbmc_project/sensors/power", 0,
         std::array<const char*, 1>{sensorValueInterface});
 }
diff --git a/src/FileHandle.cpp b/src/FileHandle.cpp
index d36911c..265d92d 100644
--- a/src/FileHandle.cpp
+++ b/src/FileHandle.cpp
@@ -17,7 +17,7 @@
     }
 }
 
-FileHandle::FileHandle(int fdIn) : fd(fdIn){};
+FileHandle::FileHandle(int fdIn) : fd(fdIn) {};
 
 FileHandle::FileHandle(FileHandle&& in) noexcept : fd(in.fd)
 {
diff --git a/src/IntelCPUSensorMain.cpp b/src/IntelCPUSensorMain.cpp
index 1fc75af..089edbd 100644
--- a/src/IntelCPUSensorMain.cpp
+++ b/src/IntelCPUSensorMain.cpp
@@ -69,8 +69,7 @@
 {
     CPUConfig(const uint64_t& bus, const uint64_t& addr,
               const std::string& name, const State& state) :
-        bus(bus),
-        addr(addr), name(name), state(state)
+        bus(bus), addr(addr), name(name), state(state)
     {}
     int bus;
     int addr;
diff --git a/src/IpmbSDRSensor.cpp b/src/IpmbSDRSensor.cpp
index 72a2cdb..bfdf5d0 100644
--- a/src/IpmbSDRSensor.cpp
+++ b/src/IpmbSDRSensor.cpp
@@ -9,8 +9,7 @@
 IpmbSDRDevice::IpmbSDRDevice(
     std::shared_ptr<sdbusplus::asio::connection>& dbusConnection,
     uint8_t cmdAddr) :
-    commandAddress(cmdAddr << 2),
-    hostIndex(cmdAddr + 1), conn(dbusConnection)
+    commandAddress(cmdAddr << 2), hostIndex(cmdAddr + 1), conn(dbusConnection)
 {}
 
 bool validateStatus(boost::system::error_code ec,
diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
index 4e2f5f8..58b65dc 100644
--- a/src/IpmbSensor.cpp
+++ b/src/IpmbSensor.cpp
@@ -597,8 +597,7 @@
                 sensor->init();
             }
         }
-    },
-        entityManagerName, "/xyz/openbmc_project/inventory",
+    }, entityManagerName, "/xyz/openbmc_project/inventory",
         "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
 }
 
diff --git a/src/NVMeBasic.cpp b/src/NVMeBasic.cpp
index 911d88a..618aa01 100644
--- a/src/NVMeBasic.cpp
+++ b/src/NVMeBasic.cpp
@@ -186,8 +186,7 @@
 NVMeBasicIO::NVMeBasicIO(
     boost::asio::io_context& io,
     std::function<ssize_t(FileHandle& in, FileHandle& out)>&& procFunc) :
-    reqStream(io),
-    respStream(io)
+    reqStream(io), respStream(io)
 {
     std::array<int, 2> responsePipe{};
     std::array<int, 2> requestPipe{};
diff --git a/src/NVMeController.cpp b/src/NVMeController.cpp
index fb6c1a5..1f429b8 100644
--- a/src/NVMeController.cpp
+++ b/src/NVMeController.cpp
@@ -465,9 +465,8 @@
     std::shared_ptr<sdbusplus::asio::connection> conn, std::string path,
     std::shared_ptr<NVMeMiIntf> nvmeIntf, nvme_mi_ctrl_t ctrl,
     std::weak_ptr<NVMeSubsystem> subsys) :
-    isPrimary(true),
-    io(io), objServer(objServer), conn(conn), path(path), nvmeIntf(nvmeIntf),
-    nvmeCtrl(ctrl), subsys(subsys)
+    isPrimary(true), io(io), objServer(objServer), conn(conn), path(path),
+    nvmeIntf(nvmeIntf), nvmeCtrl(ctrl), subsys(subsys)
 {}
 
 NVMeController::~NVMeController()
@@ -647,8 +646,7 @@
             [h](const std::error_code& err, int nvme_status) mutable {
             h(std::make_tuple(err, nvme_status));
         });
-    },
-            yield);
+    }, yield);
 
     // exception must be thrown outside of the async block
     checkLibNVMeError(err, nvme_status, "attachVolume");
@@ -700,8 +698,7 @@
             [h](const std::error_code& err, int nvme_status) mutable {
             h(std::make_tuple(err, nvme_status));
         });
-    },
-            yield);
+    }, yield);
 
     // exception must be thrown outside of the async block
     checkLibNVMeError(err, nvme_status, "detachVolume");
diff --git a/src/NVMeError.cpp b/src/NVMeError.cpp
index a538424..e538da3 100644
--- a/src/NVMeError.cpp
+++ b/src/NVMeError.cpp
@@ -11,16 +11,14 @@
 }
 
 NVMeSdBusPlusError::NVMeSdBusPlusError(
-    std::shared_ptr<sdbusplus::exception_t> specific) :
-    specific(specific)
+    std::shared_ptr<sdbusplus::exception_t> specific) : specific(specific)
 {
     init();
 }
 
 NVMeSdBusPlusError::NVMeSdBusPlusError(
     std::string_view desc, std::shared_ptr<sdbusplus::exception_t> specific) :
-    desc(desc),
-    specific(specific)
+    desc(desc), specific(specific)
 {
     init();
 }
diff --git a/src/NVMeFakePlugin.hpp b/src/NVMeFakePlugin.hpp
index c0d1678..883905c 100644
--- a/src/NVMeFakePlugin.hpp
+++ b/src/NVMeFakePlugin.hpp
@@ -5,8 +5,7 @@
 {
   public:
     FakePlugin(std::shared_ptr<NVMeSubsystem> subsys,
-               const SensorData& config) :
-        NVMePlugin(subsys, config)
+               const SensorData& config) : NVMePlugin(subsys, config)
     {
         try
         {
diff --git a/src/NVMeMi.cpp b/src/NVMeMi.cpp
index d8b6cf0..2aff3df 100644
--- a/src/NVMeMi.cpp
+++ b/src/NVMeMi.cpp
@@ -25,10 +25,9 @@
 NVMeMi::NVMeMi(boost::asio::io_context& io,
                std::shared_ptr<sdbusplus::asio::connection> conn, int bus,
                int addr, bool singleThreadMode, PowerState readState) :
-    io(io),
-    conn(conn), dbus(*conn.get()), bus(bus), addr(addr), readState(readState),
-    nvmeEP(nullptr), nid(-1), eid(0), mtu(64), startLoopRunning(false),
-    mctpStatus(Status::Reset)
+    io(io), conn(conn), dbus(*conn.get()), bus(bus), addr(addr),
+    readState(readState), nvmeEP(nullptr), nid(-1), eid(0), mtu(64),
+    startLoopRunning(false), mctpStatus(Status::Reset)
 {
     // set update the worker thread
     if (!nvmeRoot)
diff --git a/src/NVMePlugin.hpp b/src/NVMePlugin.hpp
index 035d850..2717436 100644
--- a/src/NVMePlugin.hpp
+++ b/src/NVMePlugin.hpp
@@ -32,8 +32,7 @@
 
     // The controller plugin can only be created from NVMePlugin
     NVMeControllerPlugin(std::shared_ptr<NVMeController> cntl,
-                         const SensorData&) :
-        nvmeController(cntl)
+                         const SensorData&) : nvmeController(cntl)
     {}
 
     virtual ~NVMeControllerPlugin() {}
@@ -98,8 +97,7 @@
 {
   public:
     NVMePlugin(std::shared_ptr<NVMeSubsystem> subsys,
-               const SensorData& /*config*/) :
-        subsystem(std::move(subsys)){};
+               const SensorData& /*config*/) : subsystem(std::move(subsys)) {};
 
     virtual ~NVMePlugin() {}
 
diff --git a/src/NVMeProgress.cpp b/src/NVMeProgress.cpp
index 8a18377..9a3e457 100644
--- a/src/NVMeProgress.cpp
+++ b/src/NVMeProgress.cpp
@@ -41,9 +41,7 @@
 
 NVMeCreateVolumeProgress::NVMeCreateVolumeProgress(
     std::shared_ptr<sdbusplus::asio::connection> conn,
-    const std::string& path) :
-    NVMeProgress(conn, path),
-    path(path), conn(conn)
+    const std::string& path) : NVMeProgress(conn, path), path(path), conn(conn)
 {}
 
 NVMeCreateVolumeProgress::~NVMeCreateVolumeProgress()
diff --git a/src/NVMeStorage.cpp b/src/NVMeStorage.cpp
index 7239dc8..ea6227a 100644
--- a/src/NVMeStorage.cpp
+++ b/src/NVMeStorage.cpp
@@ -19,8 +19,7 @@
 
 NVMeStorage::NVMeStorage(sdbusplus::asio::object_server& objServer,
                          sdbusplus::bus_t& bus, const char* path) :
-    StorageBase(bus, path),
-    objServer(objServer), path(path)
+    StorageBase(bus, path), objServer(objServer), path(path)
 {}
 
 NVMeStorage::~NVMeStorage()
diff --git a/src/NVMeSubsys.cpp b/src/NVMeSubsys.cpp
index c155d09..31136cb 100644
--- a/src/NVMeSubsys.cpp
+++ b/src/NVMeSubsys.cpp
@@ -1209,8 +1209,7 @@
             [h](const std::error_code& err, int nvme_status) mutable {
             h(std::make_tuple(err, nvme_status));
         });
-    },
-            yield);
+    }, yield);
 
     // exception must be thrown outside of the async block
     checkLibNVMeError(err, nvme_status, "Delete");
diff --git a/src/PSUEvent.cpp b/src/PSUEvent.cpp
index c5ad0fe..0cbdf82 100644
--- a/src/PSUEvent.cpp
+++ b/src/PSUEvent.cpp
@@ -145,10 +145,9 @@
     std::shared_ptr<std::set<std::string>> asserts,
     std::shared_ptr<std::set<std::string>> combineEvent,
     std::shared_ptr<bool> state, const std::string& psuName, double pollRate) :
-    eventInterface(std::move(eventInterface)),
-    asserts(std::move(asserts)), combineEvent(std::move(combineEvent)),
-    assertState(std::move(state)), path(path), eventName(eventName),
-    readState(powerState), waitTimer(io),
+    eventInterface(std::move(eventInterface)), asserts(std::move(asserts)),
+    combineEvent(std::move(combineEvent)), assertState(std::move(state)),
+    path(path), eventName(eventName), readState(powerState), waitTimer(io),
 
     inputDev(io, path, boost::asio::random_access_file::read_only),
     psuName(psuName), groupEventName(groupEventName), systemBus(conn)
diff --git a/src/PSUSensor.hpp b/src/PSUSensor.hpp
index 49e181e..9f8966a 100644
--- a/src/PSUSensor.hpp
+++ b/src/PSUSensor.hpp
@@ -57,9 +57,8 @@
   public:
     PSUProperty(std::string name, double max, double min, unsigned int factor,
                 double offset) :
-        labelTypeName(std::move(name)),
-        maxReading(max), minReading(min), sensorScaleFactor(factor),
-        sensorOffset(offset)
+        labelTypeName(std::move(name)), maxReading(max), minReading(min),
+        sensorScaleFactor(factor), sensorOffset(offset)
     {}
     ~PSUProperty() = default;
 
diff --git a/src/PwmSensor.cpp b/src/PwmSensor.cpp
index c3c14a3..c1eb24d 100644
--- a/src/PwmSensor.cpp
+++ b/src/PwmSensor.cpp
@@ -35,8 +35,7 @@
                      sdbusplus::asio::object_server& objectServer,
                      const std::string& sensorConfiguration,
                      const std::string& sensorType, bool isValueMutable) :
-    sysPath(sysPath),
-    objectServer(objectServer), name(name)
+    sysPath(sysPath), objectServer(objectServer), name(name)
 {
     // add interface under sensor and Control.FanPwm as Control is used
     // in obmc project, also add sensor so it can be viewed as a sensor
@@ -60,9 +59,8 @@
         setValue(pwmValue);
     }
     double fValue = 100.0 * (static_cast<double>(pwmValue) / pwmMax);
-    sensorInterface->register_property(
-        "Value", fValue,
-        [this](const double& req, double& resp) {
+    sensorInterface->register_property("Value", fValue,
+                                       [this](const double& req, double& resp) {
         if (!std::isfinite(req))
         {
             // Reject attempted change, if to NaN or other non-numeric
@@ -91,8 +89,7 @@
         controlInterface->signal_property("Target");
 
         return 1;
-    },
-        [this](double& curVal) {
+    }, [this](double& curVal) {
         double currScaled = (curVal / 100.0) * pwmMax;
         auto currInt = static_cast<uint32_t>(std::round(currScaled));
         auto getInt = getValue();
@@ -134,8 +131,7 @@
         sensorInterface->signal_property("Value");
 
         return 1;
-    },
-        [this](uint64_t& curVal) {
+    }, [this](uint64_t& curVal) {
         auto getInt = getValue();
         auto scaledValue = static_cast<double>(getInt) / pwmMax;
         auto roundValue = std::round(scaledValue * targetIfaceMax);
diff --git a/src/TachSensor.cpp b/src/TachSensor.cpp
index cd9a892..cbf2f22 100644
--- a/src/TachSensor.cpp
+++ b/src/TachSensor.cpp
@@ -212,8 +212,7 @@
 PresenceSensor::PresenceSensor(const std::string& gpioName, bool inverted,
                                boost::asio::io_context& io,
                                const std::string& name) :
-    gpioLine(gpiod::find_line(gpioName)),
-    gpioFd(io), name(name)
+    gpioLine(gpiod::find_line(gpioName)), gpioFd(io), name(name)
 {
     if (!gpioLine)
     {
@@ -298,10 +297,9 @@
                                    const std::vector<std::string>& children,
                                    sdbusplus::asio::object_server& objectServer,
                                    const std::string& sensorConfiguration) :
-    count(count),
-    iface(objectServer.add_interface(
-        "/xyz/openbmc_project/control/FanRedundancy/Tach",
-        "xyz.openbmc_project.Control.FanRedundancy")),
+    count(count), iface(objectServer.add_interface(
+                      "/xyz/openbmc_project/control/FanRedundancy/Tach",
+                      "xyz.openbmc_project.Control.FanRedundancy")),
     association(objectServer.add_interface(
         "/xyz/openbmc_project/control/FanRedundancy/Tach",
         association::interface)),
diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp
index 6829041..2aaad2d 100644
--- a/src/Thresholds.cpp
+++ b/src/Thresholds.cpp
@@ -188,8 +188,7 @@
                 {
                     std::cerr << "Error setting threshold " << ec << "\n";
                 }
-            },
-                entityManagerName, path, "org.freedesktop.DBus.Properties",
+            }, entityManagerName, path, "org.freedesktop.DBus.Properties",
                 "Set", thresholdInterface, "Value", value);
         },
             entityManagerName, path, "org.freedesktop.DBus.Properties",
diff --git a/src/Thresholds.hpp b/src/Thresholds.hpp
index fa7ce0c..049e8fb 100644
--- a/src/Thresholds.hpp
+++ b/src/Thresholds.hpp
@@ -36,8 +36,8 @@
         const Level& lev, const Direction& dir, const double& val,
         const double hysteresis = std::numeric_limits<double>::quiet_NaN(),
         bool write = true) :
-        level(lev),
-        direction(dir), value(val), hysteresis(hysteresis), writeable(write)
+        level(lev), direction(dir), value(val), hysteresis(hysteresis),
+        writeable(write)
     {}
     Level level;
     Direction direction;
diff --git a/src/Utils.hpp b/src/Utils.hpp
index 63c2dbe..3227fb9 100644
--- a/src/Utils.hpp
+++ b/src/Utils.hpp
@@ -272,8 +272,7 @@
         {
             std::cerr << "Failed to set LED " << name << "\n";
         }
-    },
-        "xyz.openbmc_project.LED.GroupManager",
+    }, "xyz.openbmc_project.LED.GroupManager",
         "/xyz/openbmc_project/led/groups/" + name, properties::interface,
         properties::set, "xyz.openbmc_project.Led.Group", "Asserted",
         std::variant<bool>(on));
@@ -290,8 +289,7 @@
     GetSensorConfiguration(
         std::shared_ptr<sdbusplus::asio::connection> connection,
         std::function<void(ManagedObjectType& resp)>&& callbackFunc) :
-        dbusConnection(std::move(connection)),
-        callback(std::move(callbackFunc))
+        dbusConnection(std::move(connection)), callback(std::move(callbackFunc))
     {}
 
     void getPath(const std::string& path, const std::string& interface,
diff --git a/tests/test_nvme_mi.cpp b/tests/test_nvme_mi.cpp
index 250c234..164edc7 100644
--- a/tests/test_nvme_mi.cpp
+++ b/tests/test_nvme_mi.cpp
@@ -291,8 +291,7 @@
                     std::vector<std::string>{"xyz.openbmc_project.Inventory."
                                              "Item.StorageController"});
             });
-        },
-            "xyz.openbmc_project.ObjectMapper",
+        }, "xyz.openbmc_project.ObjectMapper",
             "/xyz/openbmc_project/object_mapper",
             "xyz.openbmc_project.ObjectMapper", "GetSubTree", subsys_path, 0,
             std::vector<std::string>{
@@ -408,8 +407,7 @@
                     std::vector<std::string>{"xyz.openbmc_project.Inventory."
                                              "Item.StorageController"});
             });
-        },
-            "xyz.openbmc_project.ObjectMapper",
+        }, "xyz.openbmc_project.ObjectMapper",
             "/xyz/openbmc_project/object_mapper",
             "xyz.openbmc_project.ObjectMapper", "GetSubTree", subsys_path, 0,
             std::vector<std::string>{
@@ -522,8 +520,7 @@
                     std::vector<std::string>{"xyz.openbmc_project.Inventory."
                                              "Item.StorageController"});
             });
-        },
-            "xyz.openbmc_project.ObjectMapper",
+        }, "xyz.openbmc_project.ObjectMapper",
             "/xyz/openbmc_project/object_mapper",
             "xyz.openbmc_project.ObjectMapper", "GetSubTree", subsys_path, 0,
             std::vector<std::string>{