clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ia442cdc88aaeaab2f1384cc46a56f5cd5e40f2f5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/vpd-manager/bios_handler.cpp b/vpd-manager/bios_handler.cpp
index d4a5330..1130cd5 100644
--- a/vpd-manager/bios_handler.cpp
+++ b/vpd-manager/bios_handler.cpp
@@ -7,9 +7,10 @@
 #include "manager.hpp"
 #include "types.hpp"
 
+#include <sdbusplus/bus.hpp>
+
 #include <iostream>
 #include <memory>
-#include <sdbusplus/bus.hpp>
 #include <string>
 #include <tuple>
 #include <variant>
@@ -33,23 +34,22 @@
             sdbusplus::bus::match::rules::nameOwnerChanged(
                 "xyz.openbmc_project.PLDM"),
             [this](sdbusplus::message_t& msg) {
-                if (msg.is_method_error())
-                {
-                    std::cerr << "Error in reading name owner signal "
-                              << std::endl;
-                    return;
-                }
-                std::string name;
-                std::string newOwner;
-                std::string oldOwner;
+        if (msg.is_method_error())
+        {
+            std::cerr << "Error in reading name owner signal " << std::endl;
+            return;
+        }
+        std::string name;
+        std::string newOwner;
+        std::string oldOwner;
 
-                msg.read(name, oldOwner, newOwner);
-                if (newOwner != "" && name == "xyz.openbmc_project.PLDM")
-                {
-                    this->restoreBIOSAttribs();
-                    // We don't need the match anymore
-                    nameOwnerMatch.reset();
-                }
+        msg.read(name, oldOwner, newOwner);
+        if (newOwner != "" && name == "xyz.openbmc_project.PLDM")
+        {
+            this->restoreBIOSAttribs();
+            // We don't need the match anymore
+            nameOwnerMatch.reset();
+        }
             });
     // Check if PLDM is already running, if it is, we can go ahead and attempt
     // to sync BIOS attributes (since PLDM would have initialized them by the
@@ -550,8 +550,8 @@
     }
 
     // Need to write?
-    std::string toWrite =
-        (createDefaultLpar.at(0) & 0x02) ? "Enabled" : "Disabled";
+    std::string toWrite = (createDefaultLpar.at(0) & 0x02) ? "Enabled"
+                                                           : "Disabled";
     if (createDefaultLparInBIOS == toWrite)
     {
         std::cout << "Skip Create default LPAR BIOS write, value is already: "
@@ -623,8 +623,8 @@
     // VPD keywords with data taken from the BIOS.
     auto fcoInVPD = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS", "RG");
     auto ammInVPD = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D0");
-    auto keepAndClearInVPD =
-        readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D1");
+    auto keepAndClearInVPD = readBusProperty(SYSTEM_OBJECT,
+                                             "com.ibm.ipzvpd.UTIL", "D1");
     auto fcoInBIOS = readBIOSFCO();
     auto ammInBIOS = readBIOSAMM();
     auto keepAndClearInBIOS = readBIOSKeepAndClear();
@@ -655,13 +655,13 @@
     saveKeepAndClearToBIOS(keepAndClearInVPD, keepAndClearInBIOS);
     // Have to read D1 again because two attributes are stored in the same
     // keyword.
-    auto createDefaultLparInVPD =
-        readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D1");
+    auto createDefaultLparInVPD = readBusProperty(SYSTEM_OBJECT,
+                                                  "com.ibm.ipzvpd.UTIL", "D1");
     saveCreateDefaultLparToBIOS(createDefaultLparInVPD,
                                 createDefaultLparInBIOS);
 
-    auto clearNVRAMInVPD =
-        readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D1");
+    auto clearNVRAMInVPD = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL",
+                                           "D1");
     saveClearNVRAMToBIOS(clearNVRAMInVPD, clearNVRAMInBIOS);
 
     // Start listener now that we have done the restore
@@ -669,4 +669,4 @@
 }
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/bios_handler.hpp b/vpd-manager/bios_handler.hpp
index dda120c..ef4cfa4 100644
--- a/vpd-manager/bios_handler.hpp
+++ b/vpd-manager/bios_handler.hpp
@@ -5,6 +5,7 @@
 #include <stdint.h>
 
 #include <sdbusplus/asio/connection.hpp>
+
 #include <string>
 
 namespace openpower
@@ -252,4 +253,4 @@
 }; // class BiosHandler
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/editor_impl.cpp b/vpd-manager/editor_impl.cpp
index f95f4cf..f0cfa2d 100644
--- a/vpd-manager/editor_impl.cpp
+++ b/vpd-manager/editor_impl.cpp
@@ -2,6 +2,8 @@
 
 #include "editor_impl.hpp"
 
+#include "vpdecc/vpdecc.h"
+
 #include "common_utility.hpp"
 #include "ibm_vpd_utils.hpp"
 #include "ipz_parser.hpp"
@@ -11,8 +13,6 @@
 #include <phosphor-logging/elog-errors.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
-#include "vpdecc/vpdecc.h"
-
 using namespace openpower::vpd::parser::interface;
 using namespace openpower::vpd::constants;
 using namespace openpower::vpd::parser::factory;
@@ -470,17 +470,17 @@
 
     if (locationCodeType == "fcs")
     {
-        propertyFCorTM =
-            readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VCEN", "FC");
-        propertySE =
-            readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VCEN", "SE");
+        propertyFCorTM = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VCEN",
+                                         "FC");
+        propertySE = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VCEN",
+                                     "SE");
     }
     else if (locationCodeType == "mts")
     {
-        propertyFCorTM =
-            readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS", "TM");
-        propertySE =
-            readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS", "SE");
+        propertyFCorTM = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS",
+                                         "TM");
+        propertySE = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS",
+                                     "SE");
     }
 
     const nlohmann::json& groupFRUS =
@@ -711,4 +711,4 @@
 } // namespace editor
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/editor_impl.hpp b/vpd-manager/editor_impl.hpp
index 5beedba..3253332 100644
--- a/vpd-manager/editor_impl.hpp
+++ b/vpd-manager/editor_impl.hpp
@@ -3,9 +3,10 @@
 #include "const.hpp"
 #include "types.hpp"
 
+#include <nlohmann/json.hpp>
+
 #include <cstddef>
 #include <fstream>
-#include <nlohmann/json.hpp>
 #include <tuple>
 
 namespace openpower
@@ -26,9 +27,7 @@
     EditorImpl& operator=(const EditorImpl&) = delete;
     EditorImpl(EditorImpl&&) = delete;
     EditorImpl& operator=(EditorImpl&&) = delete;
-    ~EditorImpl()
-    {
-    }
+    ~EditorImpl() {}
 
     /** @brief Construct EditorImpl class
      *
@@ -40,8 +39,7 @@
                Binary&& vpd) :
         startOffset(0),
         thisRecord(record, kwd), vpdFile(std::move(vpd))
-    {
-    }
+    {}
 
     /** @brief Construct EditorImpl class
      *
@@ -57,8 +55,7 @@
         vpdFilePath(path),
         objPath(inventoryPath), startOffset(0), jsonFile(json),
         thisRecord(record, kwd)
-    {
-    }
+    {}
 
     /** @brief Construct EditorImpl class
      *
@@ -71,8 +68,7 @@
                const std::string& record, const std::string& kwd) :
         vpdFilePath(path),
         jsonFile(json), thisRecord(record, kwd)
-    {
-    }
+    {}
 
     /**
      * @brief Update data for keyword
@@ -208,8 +204,7 @@
         RecInfo(const std::string& rec, const std::string& kwd) :
             recName(rec), recKWd(kwd), recOffset(0), recECCoffset(0),
             recECCLength(0), kwdDataLength(0), recSize(0), kwDataOffset(0)
-        {
-        }
+        {}
     } thisRecord;
 
     Binary vpdFile;
@@ -221,4 +216,4 @@
 } // namespace editor
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/gpioMonitor.cpp b/vpd-manager/gpioMonitor.cpp
index 1affa62..90374d2 100644
--- a/vpd-manager/gpioMonitor.cpp
+++ b/vpd-manager/gpioMonitor.cpp
@@ -198,4 +198,4 @@
 
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/gpioMonitor.hpp b/vpd-manager/gpioMonitor.hpp
index 58fbf91..078902a 100644
--- a/vpd-manager/gpioMonitor.hpp
+++ b/vpd-manager/gpioMonitor.hpp
@@ -142,4 +142,4 @@
 
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/manager.cpp b/vpd-manager/manager.cpp
index 5fc415e..50c4b90 100644
--- a/vpd-manager/manager.cpp
+++ b/vpd-manager/manager.cpp
@@ -10,10 +10,11 @@
 #include "reader_impl.hpp"
 #include "vpd_exceptions.hpp"
 
-#include <filesystem>
 #include <phosphor-logging/elog-errors.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <filesystem>
+
 using namespace openpower::vpd::constants;
 using namespace openpower::vpd::inventory;
 using namespace openpower::vpd::manager::editor;
@@ -42,7 +43,7 @@
         [this](const sdbusplus::message::object_path& path,
                const std::string& recordName, const std::string& keyword,
                const Binary& value) {
-            this->writeKeyword(path, recordName, keyword, value);
+        this->writeKeyword(path, recordName, keyword, value);
         });
 
     interface->register_method(
@@ -786,4 +787,4 @@
 
 } // namespace manager
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower
diff --git a/vpd-manager/manager.hpp b/vpd-manager/manager.hpp
index a0a9ca6..f8b7cbc 100644
--- a/vpd-manager/manager.hpp
+++ b/vpd-manager/manager.hpp
@@ -4,9 +4,10 @@
 #include "editor_impl.hpp"
 #include "gpioMonitor.hpp"
 
-#include <map>
 #include <sdbusplus/asio/object_server.hpp>
 
+#include <map>
+
 namespace openpower
 {
 namespace vpd
diff --git a/vpd-manager/reader_impl.cpp b/vpd-manager/reader_impl.cpp
index b1f16b1..92f6a91 100644
--- a/vpd-manager/reader_impl.cpp
+++ b/vpd-manager/reader_impl.cpp
@@ -4,13 +4,14 @@
 
 #include "ibm_vpd_utils.hpp"
 
-#include <algorithm>
 #include <com/ibm/VPD/error.hpp>
-#include <map>
 #include <phosphor-logging/elog-errors.hpp>
-#include <vector>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <algorithm>
+#include <map>
+#include <vector>
+
 #ifdef ManagerTest
 #include "reader_test.hpp"
 #endif
@@ -112,8 +113,8 @@
     for_each(range.first, range.second,
              [&inventoryPaths](
                  const inventory::LocationCodeMap::value_type& mappedItem) {
-                 inventoryPaths.push_back(INVENTORY_PATH + mappedItem.second);
-             });
+        inventoryPaths.push_back(INVENTORY_PATH + mappedItem.second);
+    });
     return inventoryPaths;
 }
 
@@ -188,8 +189,8 @@
     {
         std::string tm{};
         // read TM kwd value
-        tm =
-            utilObj.readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS", "TM");
+        tm = utilObj.readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS",
+                                     "TM");
         ;
 
         // check if the substr matches to TM kwd
diff --git a/vpd-manager/reader_impl.hpp b/vpd-manager/reader_impl.hpp
index 4de3c9b..7525a4f 100644
--- a/vpd-manager/reader_impl.hpp
+++ b/vpd-manager/reader_impl.hpp
@@ -28,9 +28,7 @@
     ~ReaderImpl() = default;
 
 #ifdef ManagerTest
-    explicit ReaderImpl(IUtil& obj) : utilObj(obj)
-    {
-    }
+    explicit ReaderImpl(IUtil& obj) : utilObj(obj) {}
 #endif
 
     /** @brief An API to expand a given unexpanded location code.