diff --git a/fan_speed.cpp b/fan_speed.cpp
index 9e297bc..db683a2 100644
--- a/fan_speed.cpp
+++ b/fan_speed.cpp
@@ -1,12 +1,14 @@
-#include <phosphor-logging/elog-errors.hpp>
-#include <xyz/openbmc_project/Control/Device/error.hpp>
-#include "sensorset.hpp"
-#include "env.hpp"
 #include "fan_speed.hpp"
+
+#include "env.hpp"
 #include "hwmon.hpp"
 #include "hwmonio.hpp"
+#include "sensorset.hpp"
 #include "sysfs.hpp"
 
+#include <phosphor-logging/elog-errors.hpp>
+#include <xyz/openbmc_project/Control/Device/error.hpp>
+
 using namespace phosphor::logging;
 
 namespace hwmon
@@ -18,36 +20,27 @@
 
     if (curValue != value)
     {
-        //Write target out to sysfs
+        // Write target out to sysfs
         try
         {
-            ioAccess->write(
-                    value,
-                    type,
-                    id,
-                    entry::target,
-                    hwmonio::retries,
-                    hwmonio::delay);
-
+            ioAccess->write(value, type, id, entry::target, hwmonio::retries,
+                            hwmonio::delay);
         }
         catch (const std::system_error& e)
         {
-            using namespace sdbusplus::xyz::openbmc_project::Control::
-                Device::Error;
+            using namespace sdbusplus::xyz::openbmc_project::Control::Device::
+                Error;
             report<WriteFailure>(
-                    xyz::openbmc_project::Control::Device::
-                        WriteFailure::CALLOUT_ERRNO(e.code().value()),
-                    xyz::openbmc_project::Control::Device::
-                        WriteFailure::CALLOUT_DEVICE_PATH(devPath.c_str()));
+                xyz::openbmc_project::Control::Device::WriteFailure::
+                    CALLOUT_ERRNO(e.code().value()),
+                xyz::openbmc_project::Control::Device::WriteFailure::
+                    CALLOUT_DEVICE_PATH(devPath.c_str()));
 
-            auto file = sysfs::make_sysfs_path(
-                    ioAccess->path(),
-                    type,
-                    id,
-                    entry::target);
+            auto file = sysfs::make_sysfs_path(ioAccess->path(), type, id,
+                                               entry::target);
 
             log<level::INFO>("Logging failing sysfs file",
-                    phosphor::logging::entry("FILE=%s", file.c_str()));
+                             phosphor::logging::entry("FILE=%s", file.c_str()));
 
             exit(EXIT_FAILURE);
         }
@@ -56,7 +49,6 @@
     return FanSpeedObject::target(value);
 }
 
-
 void FanSpeed::enable()
 {
     auto enable = env::getEnv("ENABLE", type, id);
@@ -66,37 +58,29 @@
 
         try
         {
-            ioAccess->write(
-                    val,
-                    type::pwm,
-                    id,
-                    entry::enable,
-                    hwmonio::retries,
-                    hwmonio::delay);
+            ioAccess->write(val, type::pwm, id, entry::enable, hwmonio::retries,
+                            hwmonio::delay);
         }
         catch (const std::system_error& e)
         {
-            using namespace sdbusplus::xyz::openbmc_project::Control::
-                Device::Error;
+            using namespace sdbusplus::xyz::openbmc_project::Control::Device::
+                Error;
             phosphor::logging::report<WriteFailure>(
-                    xyz::openbmc_project::Control::Device::
-                        WriteFailure::CALLOUT_ERRNO(e.code().value()),
-                    xyz::openbmc_project::Control::Device::
-                        WriteFailure::CALLOUT_DEVICE_PATH(devPath.c_str()));
+                xyz::openbmc_project::Control::Device::WriteFailure::
+                    CALLOUT_ERRNO(e.code().value()),
+                xyz::openbmc_project::Control::Device::WriteFailure::
+                    CALLOUT_DEVICE_PATH(devPath.c_str()));
 
-            auto fullPath = sysfs::make_sysfs_path(
-                    ioAccess->path(),
-                    type::pwm,
-                    id,
-                    entry::enable);
+            auto fullPath = sysfs::make_sysfs_path(ioAccess->path(), type::pwm,
+                                                   id, entry::enable);
 
-            log<level::INFO>("Logging failing sysfs file",
-                    phosphor::logging::entry("FILE=%s", fullPath.c_str()));
+            log<level::INFO>(
+                "Logging failing sysfs file",
+                phosphor::logging::entry("FILE=%s", fullPath.c_str()));
 
             exit(EXIT_FAILURE);
         }
     }
 }
 
-
 } // namespace hwmon
