diff --git a/fw-update/device_updater.cpp b/fw-update/device_updater.cpp
index 50456eb..c8f58b1 100644
--- a/fw-update/device_updater.cpp
+++ b/fw-update/device_updater.cpp
@@ -35,9 +35,9 @@
     compImgSetVerStrInfo.length =
         static_cast<uint8_t>(compImageSetVersion.size());
 
-    Request request(sizeof(pldm_msg_hdr) +
-                    sizeof(struct pldm_request_update_req) +
-                    compImgSetVerStrInfo.length);
+    Request request(
+        sizeof(pldm_msg_hdr) + sizeof(struct pldm_request_update_req) +
+        compImgSetVerStrInfo.length);
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_request_update_req(
@@ -165,9 +165,9 @@
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVersion.data());
     compVerStrInfo.length = static_cast<uint8_t>(compVersion.size());
 
-    Request request(sizeof(pldm_msg_hdr) +
-                    sizeof(struct pldm_pass_component_table_req) +
-                    compVerStrInfo.length);
+    Request request(
+        sizeof(pldm_msg_hdr) + sizeof(struct pldm_pass_component_table_req) +
+        compVerStrInfo.length);
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
     auto rc = encode_pass_component_table_req(
         instanceId, transferFlag, compClassification, compIdentifier,
@@ -212,9 +212,9 @@
     uint8_t compResponse = 0;
     uint8_t compResponseCode = 0;
 
-    auto rc = decode_pass_component_table_resp(response, respMsgLen,
-                                               &completionCode, &compResponse,
-                                               &compResponseCode);
+    auto rc =
+        decode_pass_component_table_resp(response, respMsgLen, &completionCode,
+                                         &compResponse, &compResponseCode);
     if (rc)
     {
         // Handle error scenario
@@ -293,9 +293,9 @@
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVersion.data());
     compVerStrInfo.length = static_cast<uint8_t>(compVersion.size());
 
-    Request request(sizeof(pldm_msg_hdr) +
-                    sizeof(struct pldm_update_component_req) +
-                    compVerStrInfo.length);
+    Request request(
+        sizeof(pldm_msg_hdr) + sizeof(struct pldm_update_component_req) +
+        compVerStrInfo.length);
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_update_component_req(
@@ -436,13 +436,13 @@
     response.resize(sizeof(pldm_msg_hdr) + sizeof(completionCode) + length);
     responseMsg = reinterpret_cast<pldm_msg*>(response.data());
     package.seekg(compOffset + offset);
-    package.read(reinterpret_cast<char*>(response.data() +
-                                         sizeof(pldm_msg_hdr) +
-                                         sizeof(completionCode)),
-                 length - padBytes);
-    rc = encode_request_firmware_data_resp(request->hdr.instance_id,
-                                           completionCode, responseMsg,
-                                           sizeof(completionCode));
+    package.read(
+        reinterpret_cast<char*>(
+            response.data() + sizeof(pldm_msg_hdr) + sizeof(completionCode)),
+        length - padBytes);
+    rc = encode_request_firmware_data_resp(
+        request->hdr.instance_id, completionCode, responseMsg,
+        sizeof(completionCode));
     if (rc)
     {
         error(
@@ -462,8 +462,8 @@
     auto responseMsg = reinterpret_cast<pldm_msg*>(response.data());
 
     uint8_t transferResult = 0;
-    auto rc = decode_transfer_complete_req(request, payloadLength,
-                                           &transferResult);
+    auto rc =
+        decode_transfer_complete_req(request, payloadLength, &transferResult);
     if (rc)
     {
         error(
@@ -652,8 +652,8 @@
 {
     pldmRequest.reset();
     auto instanceId = updateManager->instanceIdDb.next(eid);
-    Request request(sizeof(pldm_msg_hdr) +
-                    sizeof(struct pldm_activate_firmware_req));
+    Request request(
+        sizeof(pldm_msg_hdr) + sizeof(struct pldm_activate_firmware_req));
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_activate_firmware_req(
diff --git a/fw-update/device_updater.hpp b/fw-update/device_updater.hpp
index 6d96da8..4613a7c 100644
--- a/fw-update/device_updater.hpp
+++ b/fw-update/device_updater.hpp
@@ -53,8 +53,7 @@
                            const ComponentInfo& compInfo,
                            uint32_t maxTransferSize,
                            UpdateManager* updateManager) :
-        eid(eid),
-        package(package), fwDeviceIDRecord(fwDeviceIDRecord),
+        eid(eid), package(package), fwDeviceIDRecord(fwDeviceIDRecord),
         compImageInfos(compImageInfos), compInfo(compInfo),
         maxTransferSize(maxTransferSize), updateManager(updateManager)
     {}
diff --git a/fw-update/inventory_manager.cpp b/fw-update/inventory_manager.cpp
index b466984..43508a7 100644
--- a/fw-update/inventory_manager.cpp
+++ b/fw-update/inventory_manager.cpp
@@ -20,8 +20,8 @@
     for (const auto& eid : eids)
     {
         auto instanceId = instanceIdDb.next(eid);
-        Request requestMsg(sizeof(pldm_msg_hdr) +
-                           PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES);
+        Request requestMsg(
+            sizeof(pldm_msg_hdr) + PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES);
         auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
         auto rc = encode_query_device_identifiers_req(
             instanceId, PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES, request);
@@ -47,9 +47,8 @@
     }
 }
 
-void InventoryManager::queryDeviceIdentifiers(mctp_eid_t eid,
-                                              const pldm_msg* response,
-                                              size_t respMsgLen)
+void InventoryManager::queryDeviceIdentifiers(
+    mctp_eid_t eid, const pldm_msg* response, size_t respMsgLen)
 {
     if (response == nullptr || !respMsgLen)
     {
@@ -152,8 +151,8 @@
 void InventoryManager::sendGetFirmwareParametersRequest(mctp_eid_t eid)
 {
     auto instanceId = instanceIdDb.next(eid);
-    Request requestMsg(sizeof(pldm_msg_hdr) +
-                       PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES);
+    Request requestMsg(
+        sizeof(pldm_msg_hdr) + PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES);
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_get_firmware_parameters_req(
         instanceId, PLDM_GET_FIRMWARE_PARAMETERS_REQ_BYTES, request);
@@ -178,9 +177,8 @@
     }
 }
 
-void InventoryManager::getFirmwareParameters(mctp_eid_t eid,
-                                             const pldm_msg* response,
-                                             size_t respMsgLen)
+void InventoryManager::getFirmwareParameters(
+    mctp_eid_t eid, const pldm_msg* response, size_t respMsgLen)
 {
     if (response == nullptr || !respMsgLen)
     {
diff --git a/fw-update/inventory_manager.hpp b/fw-update/inventory_manager.hpp
index 1ea4685..953d7a4 100644
--- a/fw-update/inventory_manager.hpp
+++ b/fw-update/inventory_manager.hpp
@@ -41,9 +41,8 @@
         pldm::requester::Handler<pldm::requester::Request>& handler,
         InstanceIdDb& instanceIdDb, DescriptorMap& descriptorMap,
         ComponentInfoMap& componentInfoMap) :
-        handler(handler),
-        instanceIdDb(instanceIdDb), descriptorMap(descriptorMap),
-        componentInfoMap(componentInfoMap)
+        handler(handler), instanceIdDb(instanceIdDb),
+        descriptorMap(descriptorMap), componentInfoMap(componentInfoMap)
     {}
 
     /** @brief Discover the firmware identifiers and component details of FDs
diff --git a/fw-update/package_parser.cpp b/fw-update/package_parser.cpp
index e13a8d5..6acb7ba 100644
--- a/fw-update/package_parser.cpp
+++ b/fw-update/package_parser.cpp
@@ -130,9 +130,9 @@
         fwDeviceIDRecords.emplace_back(std::make_tuple(
             deviceUpdateOptionFlags, componentsList,
             utils::toString(compImageSetVersionStr), std::move(descriptors),
-            FirmwareDevicePackageData{fwDevicePkgData.ptr,
-                                      fwDevicePkgData.ptr +
-                                          fwDevicePkgData.length}));
+            FirmwareDevicePackageData{
+                fwDevicePkgData.ptr,
+                fwDevicePkgData.ptr + fwDevicePkgData.length}));
         offset += deviceIdRecHeader.record_length;
         pkgHdrRemainingSize -= deviceIdRecHeader.record_length;
     }
@@ -151,9 +151,9 @@
         pldm_component_image_information compImageInfo{};
         variable_field compVersion{};
 
-        auto rc = decode_pldm_comp_image_info(pkgHdr.data() + offset,
-                                              pkgHdrRemainingSize,
-                                              &compImageInfo, &compVersion);
+        auto rc = decode_pldm_comp_image_info(
+            pkgHdr.data() + offset, pkgHdrRemainingSize, &compImageInfo,
+            &compVersion);
         if (rc)
         {
             error(
diff --git a/fw-update/package_parser.hpp b/fw-update/package_parser.hpp
index 2192acc..5578916 100644
--- a/fw-update/package_parser.hpp
+++ b/fw-update/package_parser.hpp
@@ -47,8 +47,7 @@
     explicit PackageParser(PackageHeaderSize pkgHeaderSize,
                            const PackageVersion& pkgVersion,
                            ComponentBitmapBitLength componentBitmapBitLength) :
-        pkgHeaderSize(pkgHeaderSize),
-        pkgVersion(pkgVersion),
+        pkgHeaderSize(pkgHeaderSize), pkgVersion(pkgVersion),
         componentBitmapBitLength(componentBitmapBitLength)
     {}
 
diff --git a/fw-update/update_manager.hpp b/fw-update/update_manager.hpp
index 26a1de9..61db3e7 100644
--- a/fw-update/update_manager.hpp
+++ b/fw-update/update_manager.hpp
@@ -46,8 +46,7 @@
         pldm::requester::Handler<pldm::requester::Request>& handler,
         InstanceIdDb& instanceIdDb, const DescriptorMap& descriptorMap,
         const ComponentInfoMap& componentInfoMap) :
-        event(event),
-        handler(handler), instanceIdDb(instanceIdDb),
+        event(event), handler(handler), instanceIdDb(instanceIdDb),
         descriptorMap(descriptorMap), componentInfoMap(componentInfoMap),
         watch(event.get(),
               std::bind_front(&UpdateManager::processPackage, this)),
diff --git a/fw-update/watch.cpp b/fw-update/watch.cpp
index 208d818..60f18fc 100644
--- a/fw-update/watch.cpp
+++ b/fw-update/watch.cpp
@@ -35,8 +35,8 @@
         // Store a copy of errno, because the string creation below will
         // invalidate errno due to one more system calls.
         auto error = errno;
-        throw std::runtime_error("inotify_init1 failed, errno="s +
-                                 std::strerror(error));
+        throw std::runtime_error(
+            "inotify_init1 failed, errno="s + std::strerror(error));
     }
 
     wd = inotify_add_watch(fd, "/tmp/images", IN_CLOSE_WRITE);
@@ -44,15 +44,15 @@
     {
         auto error = errno;
         close(fd);
-        throw std::runtime_error("inotify_add_watch failed, errno="s +
-                                 std::strerror(error));
+        throw std::runtime_error(
+            "inotify_add_watch failed, errno="s + std::strerror(error));
     }
 
     auto rc = sd_event_add_io(loop, nullptr, fd, EPOLLIN, callback, this);
     if (0 > rc)
     {
-        throw std::runtime_error("failed to add to event loop, rc="s +
-                                 std::strerror(-rc));
+        throw std::runtime_error(
+            "failed to add to event loop, rc="s + std::strerror(-rc));
     }
 }
 
@@ -82,8 +82,8 @@
     if (0 > bytes)
     {
         auto error = errno;
-        throw std::runtime_error("failed to read inotify event, errno="s +
-                                 std::strerror(error));
+        throw std::runtime_error(
+            "failed to read inotify event, errno="s + std::strerror(error));
     }
 
     auto offset = 0;
