diff --git a/libipmid/utils.cpp b/libipmid/utils.cpp
index 81cc4c4..fb96ea6 100644
--- a/libipmid/utils.cpp
+++ b/libipmid/utils.cpp
@@ -39,10 +39,9 @@
 //  Currently mapper doesn't give the readable busname(gives busid) so we can't
 //  use busname to find the object,will do later once the support is there.
 
-DbusObjectInfo getDbusObject(sdbusplus::bus_t& bus,
-                             const std::string& interface,
-                             const std::string& serviceRoot,
-                             const std::string& match)
+DbusObjectInfo
+    getDbusObject(sdbusplus::bus_t& bus, const std::string& interface,
+                  const std::string& serviceRoot, const std::string& match)
 {
     std::vector<DbusInterface> interfaces;
     interfaces.emplace_back(interface);
@@ -67,10 +66,10 @@
     }
 
     // else search the match string in the object path
-    auto found = std::find_if(objectTree.begin(), objectTree.end(),
-                              [&match](const auto& object) {
-        return (object.first.find(match) != std::string::npos);
-    });
+    auto found = std::find_if(
+        objectTree.begin(), objectTree.end(), [&match](const auto& object) {
+            return (object.first.find(match) != std::string::npos);
+        });
 
     if (found == objectTree.end())
     {
@@ -101,11 +100,10 @@
     return value;
 }
 
-PropertyMap getAllDbusProperties(sdbusplus::bus_t& bus,
-                                 const std::string& service,
-                                 const std::string& objPath,
-                                 const std::string& interface,
-                                 std::chrono::microseconds timeout)
+PropertyMap getAllDbusProperties(
+    sdbusplus::bus_t& bus, const std::string& service,
+    const std::string& objPath, const std::string& interface,
+    std::chrono::microseconds timeout)
 {
     PropertyMap properties;
 
@@ -181,9 +179,8 @@
     cachedService = std::nullopt;
 }
 
-sdbusplus::message_t ServiceCache::newMethodCall(sdbusplus::bus_t& bus,
-                                                 const char* intf,
-                                                 const char* method)
+sdbusplus::message_t ServiceCache::newMethodCall(
+    sdbusplus::bus_t& bus, const char* intf, const char* method)
 {
     return bus.new_method_call(getService(bus).c_str(), path.c_str(), intf,
                                method);
@@ -197,10 +194,10 @@
 std::string getService(sdbusplus::bus_t& bus, const std::string& intf,
                        const std::string& path)
 {
-    auto mapperCall = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
-                                          "/xyz/openbmc_project/object_mapper",
-                                          "xyz.openbmc_project.ObjectMapper",
-                                          "GetObject");
+    auto mapperCall =
+        bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+                            "/xyz/openbmc_project/object_mapper",
+                            "xyz.openbmc_project.ObjectMapper", "GetObject");
 
     mapperCall.append(path);
     mapperCall.append(std::vector<std::string>({intf}));
@@ -233,10 +230,9 @@
     return objectTree;
 }
 
-ipmi::ObjectTree getAllDbusObjects(sdbusplus::bus_t& bus,
-                                   const std::string& serviceRoot,
-                                   const std::string& interface,
-                                   const std::string& match)
+ipmi::ObjectTree
+    getAllDbusObjects(sdbusplus::bus_t& bus, const std::string& serviceRoot,
+                      const std::string& interface, const std::string& match)
 {
     std::vector<std::string> interfaces;
     interfaces.emplace_back(interface);
@@ -331,9 +327,9 @@
 
 /********* Begin co-routine yielding alternatives ***************/
 
-boost::system::error_code getService(Context::ptr ctx, const std::string& intf,
-                                     const std::string& path,
-                                     std::string& service)
+boost::system::error_code
+    getService(Context::ptr ctx, const std::string& intf,
+               const std::string& path, std::string& service)
 {
     boost::system::error_code ec;
     std::map<std::string, std::vector<std::string>> mapperResponse =
@@ -350,10 +346,9 @@
     return ec;
 }
 
-boost::system::error_code getSubTree(Context::ptr ctx,
-                                     const InterfaceList& interfaces,
-                                     const std::string& subtreePath,
-                                     int32_t depth, ObjectTree& objectTree)
+boost::system::error_code getSubTree(
+    Context::ptr ctx, const InterfaceList& interfaces,
+    const std::string& subtreePath, int32_t depth, ObjectTree& objectTree)
 {
     boost::system::error_code ec;
     objectTree = ctx->bus->yield_method_call<ObjectTree>(
@@ -363,19 +358,18 @@
     return ec;
 }
 
-boost::system::error_code getDbusObject(Context::ptr ctx,
-                                        const std::string& interface,
-                                        const std::string& subtreePath,
-                                        const std::string& match,
-                                        DbusObjectInfo& dbusObject)
+boost::system::error_code
+    getDbusObject(Context::ptr ctx, const std::string& interface,
+                  const std::string& subtreePath, const std::string& match,
+                  DbusObjectInfo& dbusObject)
 {
     std::vector<DbusInterface> interfaces;
     interfaces.emplace_back(interface);
 
     auto depth = 0;
     ObjectTree objectTree;
-    boost::system::error_code ec = getSubTree(ctx, interfaces, subtreePath,
-                                              depth, objectTree);
+    boost::system::error_code ec =
+        getSubTree(ctx, interfaces, subtreePath, depth, objectTree);
 
     if (ec)
     {
@@ -402,10 +396,10 @@
     }
 
     // else search the match string in the object path
-    auto found = std::find_if(objectTree.begin(), objectTree.end(),
-                              [&match](const auto& object) {
-        return (object.first.find(match) != std::string::npos);
-    });
+    auto found = std::find_if(
+        objectTree.begin(), objectTree.end(), [&match](const auto& object) {
+            return (object.first.find(match) != std::string::npos);
+        });
 
     if (found == objectTree.end())
     {
@@ -423,11 +417,9 @@
     return ec;
 }
 
-boost::system::error_code getAllDbusProperties(Context::ptr ctx,
-                                               const std::string& service,
-                                               const std::string& objPath,
-                                               const std::string& interface,
-                                               PropertyMap& properties)
+boost::system::error_code getAllDbusProperties(
+    Context::ptr ctx, const std::string& service, const std::string& objPath,
+    const std::string& interface, PropertyMap& properties)
 {
     boost::system::error_code ec;
     properties = ctx->bus->yield_method_call<PropertyMap>(
@@ -448,18 +440,17 @@
     return ec;
 }
 
-boost::system::error_code getAllDbusObjects(Context::ptr ctx,
-                                            const std::string& serviceRoot,
-                                            const std::string& interface,
-                                            const std::string& match,
-                                            ObjectTree& objectTree)
+boost::system::error_code
+    getAllDbusObjects(Context::ptr ctx, const std::string& serviceRoot,
+                      const std::string& interface, const std::string& match,
+                      ObjectTree& objectTree)
 {
     std::vector<std::string> interfaces;
     interfaces.emplace_back(interface);
 
     auto depth = 0;
-    boost::system::error_code ec = getSubTree(ctx, interfaces, serviceRoot,
-                                              depth, objectTree);
+    boost::system::error_code ec =
+        getSubTree(ctx, interfaces, serviceRoot, depth, objectTree);
     if (ec)
     {
         return ec;
@@ -480,10 +471,9 @@
     return ec;
 }
 
-boost::system::error_code deleteAllDbusObjects(Context::ptr ctx,
-                                               const std::string& serviceRoot,
-                                               const std::string& interface,
-                                               const std::string& match)
+boost::system::error_code
+    deleteAllDbusObjects(Context::ptr ctx, const std::string& serviceRoot,
+                         const std::string& interface, const std::string& match)
 {
     ObjectTree objectTree;
     boost::system::error_code ec =
@@ -512,10 +502,9 @@
     return ec;
 }
 
-boost::system::error_code getManagedObjects(Context::ptr ctx,
-                                            const std::string& service,
-                                            const std::string& objPath,
-                                            ObjectValueTree& objects)
+boost::system::error_code
+    getManagedObjects(Context::ptr ctx, const std::string& service,
+                      const std::string& objPath, ObjectValueTree& objects)
 {
     boost::system::error_code ec;
     objects = ctx->bus->yield_method_call<ipmi::ObjectValueTree>(
@@ -524,10 +513,9 @@
     return ec;
 }
 
-boost::system::error_code getAllAncestors(Context::ptr ctx,
-                                          const std::string& path,
-                                          const InterfaceList& interfaces,
-                                          ObjectTree& objectTree)
+boost::system::error_code
+    getAllAncestors(Context::ptr ctx, const std::string& path,
+                    const InterfaceList& interfaces, ObjectTree& objectTree)
 {
     std::string interfaceList = convertToString(interfaces);
 
@@ -552,11 +540,9 @@
     return ec;
 }
 
-boost::system::error_code callDbusMethod(Context::ptr ctx,
-                                         const std::string& service,
-                                         const std::string& objPath,
-                                         const std::string& interface,
-                                         const std::string& method)
+boost::system::error_code callDbusMethod(
+    Context::ptr ctx, const std::string& service, const std::string& objPath,
+    const std::string& interface, const std::string& method)
 {
     boost::system::error_code ec;
     ctx->bus->yield_method_call(ctx->yield, ec, service, objPath, interface,
