diff --git a/pldmd/dbus_impl_pdr.cpp b/pldmd/dbus_impl_pdr.cpp
index 231f64d..ac39d9d 100644
--- a/pldmd/dbus_impl_pdr.cpp
+++ b/pldmd/dbus_impl_pdr.cpp
@@ -13,12 +13,11 @@
 namespace dbus_api
 {
 
-std::vector<std::vector<uint8_t>> Pdr::findStateEffecterPDR(uint8_t tid,
-                                                            uint16_t entityID,
-                                                            uint16_t stateSetId)
+std::vector<std::vector<uint8_t>> Pdr::findStateEffecterPDR(
+    uint8_t tid, uint16_t entityID, uint16_t stateSetId)
 {
-    auto pdrs = pldm::utils::findStateEffecterPDR(tid, entityID, stateSetId,
-                                                  pdrRepo);
+    auto pdrs =
+        pldm::utils::findStateEffecterPDR(tid, entityID, stateSetId, pdrRepo);
 
     if (pdrs.empty())
     {
@@ -31,8 +30,8 @@
 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);
+    auto pdrs =
+        pldm::utils::findStateSensorPDR(tid, entityID, stateSetId, pdrRepo);
     if (pdrs.empty())
     {
         throw ResourceNotFound();
diff --git a/pldmd/dbus_impl_pdr.hpp b/pldmd/dbus_impl_pdr.hpp
index b4614dd..39f411b 100644
--- a/pldmd/dbus_impl_pdr.hpp
+++ b/pldmd/dbus_impl_pdr.hpp
@@ -39,25 +39,23 @@
      *  @param[in] repo - pointer to BMC's primary PDR repo
      */
     Pdr(sdbusplus::bus_t& bus, const std::string& path, const pldm_pdr* repo) :
-        PdrIntf(bus, path.c_str()), pdrRepo(repo){};
+        PdrIntf(bus, path.c_str()), pdrRepo(repo) {};
 
     /** @brief Implementation for PdrIntf.FindStateEffecterPDR
      *  @param[in] tid - PLDM terminus ID.
      *  @param[in] entityID - entity that can be associated with PLDM State set.
      *  @param[in] stateSetId - value that identifies PLDM State set.
      */
-    std::vector<std::vector<uint8_t>>
-        findStateEffecterPDR(uint8_t tid, uint16_t entityID,
-                             uint16_t stateSetId) override;
+    std::vector<std::vector<uint8_t>> findStateEffecterPDR(
+        uint8_t tid, uint16_t entityID, uint16_t stateSetId) override;
 
     /** @brief Implementation for PdrIntf.FindStateSensorPDR
      *  @param[in] tid - PLDM terminus ID.
      *  @param[in] entityID - entity that can be associated with PLDM State set.
      *  @param[in] stateSetId - value that identifies PLDM State set.
      */
-    std::vector<std::vector<uint8_t>>
-        findStateSensorPDR(uint8_t tid, uint16_t entityID,
-                           uint16_t stateSetId) override;
+    std::vector<std::vector<uint8_t>> findStateSensorPDR(
+        uint8_t tid, uint16_t entityID, uint16_t stateSetId) override;
 
   private:
     /** @brief pointer to BMC's primary PDR repo */
diff --git a/pldmd/dbus_impl_requester.hpp b/pldmd/dbus_impl_requester.hpp
index 84e861b..1f1cc96 100644
--- a/pldmd/dbus_impl_requester.hpp
+++ b/pldmd/dbus_impl_requester.hpp
@@ -42,8 +42,7 @@
      */
     Requester(sdbusplus::bus_t& bus, const std::string& path,
               InstanceIdDb& db) :
-        RequesterIntf(bus, path.c_str()),
-        pldmInstanceIdDb(db){};
+        RequesterIntf(bus, path.c_str()), pldmInstanceIdDb(db) {};
 
     /** @brief Implementation for RequesterIntf.GetInstanceId */
     uint8_t getInstanceId(uint8_t eid) override
diff --git a/pldmd/handler.hpp b/pldmd/handler.hpp
index b742519..b677e47 100644
--- a/pldmd/handler.hpp
+++ b/pldmd/handler.hpp
@@ -49,9 +49,9 @@
     {
         Response response(sizeof(pldm_msg), 0);
         auto ptr = reinterpret_cast<pldm_msg*>(response.data());
-        auto rc = encode_cc_only_resp(request->hdr.instance_id,
-                                      request->hdr.type, request->hdr.command,
-                                      cc, ptr);
+        auto rc =
+            encode_cc_only_resp(request->hdr.instance_id, request->hdr.type,
+                                request->hdr.command, cc, ptr);
         assert(rc == PLDM_SUCCESS);
         return response;
     }
diff --git a/pldmd/oem_ibm.hpp b/pldmd/oem_ibm.hpp
index 8063efb..67ad482 100644
--- a/pldmd/oem_ibm.hpp
+++ b/pldmd/oem_ibm.hpp
@@ -64,8 +64,7 @@
         responder::fru::Handler* fruHandler,
         responder::base::Handler* baseHandler,
         pldm::requester::Handler<pldm::requester::Request>* reqHandler) :
-        dBusIntf(dBusIntf),
-        mctp_fd(mctp_fd), mctp_eid(mctp_eid), repo(repo),
+        dBusIntf(dBusIntf), mctp_fd(mctp_fd), mctp_eid(mctp_eid), repo(repo),
         instanceIdDb(instanceIdDb), event(event), invoker(invoker),
         reqHandler(reqHandler)
     {
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index 39e1213..13d28f2 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -120,9 +120,9 @@
         {
             if (hdrFields.pldm_type != PLDM_FWUP)
             {
-                response = invoker.handle(tid, hdrFields.pldm_type,
-                                          hdrFields.command, request,
-                                          requestLen);
+                response =
+                    invoker.handle(tid, hdrFields.pldm_type, hdrFields.command,
+                                   request, requestLen);
             }
             else
             {
@@ -281,11 +281,11 @@
     auto baseHandler = std::make_unique<base::Handler>(event);
 
 #ifdef OEM_IBM
-    pldm::oem_ibm::OemIBM oemIBM(&dbusHandler, pldmTransport.getEventSource(),
-                                 hostEID, pdrRepo.get(), instanceIdDb, event,
-                                 invoker, hostPDRHandler.get(),
-                                 platformHandler.get(), fruHandler.get(),
-                                 baseHandler.get(), &reqHandler);
+    pldm::oem_ibm::OemIBM oemIBM(
+        &dbusHandler, pldmTransport.getEventSource(), hostEID, pdrRepo.get(),
+        instanceIdDb, event, invoker, hostPDRHandler.get(),
+        platformHandler.get(), fruHandler.get(), baseHandler.get(),
+        &reqHandler);
 #endif
 
     invoker.registerHandler(PLDM_BIOS, std::move(biosHandler));
