diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 609ff2c..6ea165d 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -123,9 +123,8 @@
     return dbusDumpPath;
 }
 
-inline static int getJournalMetadata(sd_journal* journal,
-                                     std::string_view field,
-                                     std::string_view& contents)
+inline int getJournalMetadata(sd_journal* journal, std::string_view field,
+                              std::string_view& contents)
 {
     const char* data = nullptr;
     size_t length = 0;
@@ -145,9 +144,8 @@
     return ret;
 }
 
-inline static int getJournalMetadata(sd_journal* journal,
-                                     std::string_view field, const int& base,
-                                     long int& contents)
+inline int getJournalMetadata(sd_journal* journal, std::string_view field,
+                              const int& base, long int& contents)
 {
     int ret = 0;
     std::string_view metadata;
@@ -161,8 +159,7 @@
     return ret;
 }
 
-inline static bool getEntryTimestamp(sd_journal* journal,
-                                     std::string& entryTimestamp)
+inline bool getEntryTimestamp(sd_journal* journal, std::string& entryTimestamp)
 {
     int ret = 0;
     uint64_t timestamp = 0;
@@ -176,8 +173,8 @@
     return true;
 }
 
-inline static bool getUniqueEntryID(sd_journal* journal, std::string& entryID,
-                                    const bool firstEntry = true)
+inline bool getUniqueEntryID(sd_journal* journal, std::string& entryID,
+                             const bool firstEntry = true)
 {
     int ret = 0;
     static sd_id128_t prevBootID{};
@@ -269,7 +266,7 @@
 }
 
 // Entry is formed like "BootID_timestamp" or "BootID_timestamp_index"
-inline static bool
+inline bool
     getTimestampFromID(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                        std::string_view entryIDStrView, sd_id128_t& bootID,
                        uint64_t& timestamp, uint64_t& index)
@@ -1228,7 +1225,7 @@
         "xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
 }
 
-inline static void
+inline void
     parseCrashdumpParameters(const dbus::utility::DBusPropertiesMap& params,
                              std::string& filename, std::string& timestamp,
                              std::string& logfile)
@@ -3923,8 +3920,8 @@
  *
  * @return bool true if the parsing is successful, false the parsing fails
  */
-inline static bool parsePostCode(const std::string& postCodeID,
-                                 uint64_t& currentValue, uint16_t& index)
+inline bool parsePostCode(const std::string& postCodeID, uint64_t& currentValue,
+                          uint16_t& index)
 {
     std::vector<std::string> split;
     bmcweb::split(split, postCodeID, '-');
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index fa2dc9e..9ef8311 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -55,14 +55,15 @@
 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
 static std::unique_ptr<boost::asio::steady_timer> fwAvailableTimer;
 
-inline static void cleanUp()
+inline void cleanUp()
 {
     fwUpdateInProgress = false;
     fwUpdateMatcher = nullptr;
     fwUpdateErrorMatcher = nullptr;
 }
-inline static void activateImage(const std::string& objPath,
-                                 const std::string& service)
+
+inline void activateImage(const std::string& objPath,
+                          const std::string& service)
 {
     BMCWEB_LOG_DEBUG("Activate image for {} {}", objPath, service);
     sdbusplus::asio::setProperty(
