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: If66f68c96df4baf8dc07abf8729a3cb7657e932d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/phosphor-regulators/src/actions/i2c_write_bytes_action.cpp b/phosphor-regulators/src/actions/i2c_write_bytes_action.cpp
index 21b31f1..e9a02f3 100644
--- a/phosphor-regulators/src/actions/i2c_write_bytes_action.cpp
+++ b/phosphor-regulators/src/actions/i2c_write_bytes_action.cpp
@@ -51,8 +51,8 @@
             // Combine values to write with current values
             for (unsigned int i = 0; i < values.size(); ++i)
             {
-                valuesToWrite[i] =
-                    (values[i] & masks[i]) | (currentValues[i] & (~masks[i]));
+                valuesToWrite[i] = (values[i] & masks[i]) |
+                                   (currentValues[i] & (~masks[i]));
             }
         }
 
diff --git a/phosphor-regulators/src/actions/log_phase_fault_action.hpp b/phosphor-regulators/src/actions/log_phase_fault_action.hpp
index 70c4cd0..b587699 100644
--- a/phosphor-regulators/src/actions/log_phase_fault_action.hpp
+++ b/phosphor-regulators/src/actions/log_phase_fault_action.hpp
@@ -47,8 +47,7 @@
      *
      * @param type phase fault type
      */
-    explicit LogPhaseFaultAction(PhaseFaultType type) : type{type}
-    {}
+    explicit LogPhaseFaultAction(PhaseFaultType type) : type{type} {}
 
     /**
      * Executes this action.
diff --git a/phosphor-regulators/src/actions/pmbus_read_sensor_action.cpp b/phosphor-regulators/src/actions/pmbus_read_sensor_action.cpp
index 896830c..a94775d 100644
--- a/phosphor-regulators/src/actions/pmbus_read_sensor_action.cpp
+++ b/phosphor-regulators/src/actions/pmbus_read_sensor_action.cpp
@@ -49,8 +49,8 @@
                 break;
             case pmbus_utils::SensorDataFormat::linear_16:
                 int8_t exponentValue = getExponentValue(environment, interface);
-                sensorValue =
-                    pmbus_utils::convertFromVoutLinear(value, exponentValue);
+                sensorValue = pmbus_utils::convertFromVoutLinear(value,
+                                                                 exponentValue);
                 break;
         }
 
diff --git a/phosphor-regulators/src/actions/pmbus_write_vout_command_action.cpp b/phosphor-regulators/src/actions/pmbus_write_vout_command_action.cpp
index ca1756f..55ed89d 100644
--- a/phosphor-regulators/src/actions/pmbus_write_vout_command_action.cpp
+++ b/phosphor-regulators/src/actions/pmbus_write_vout_command_action.cpp
@@ -41,8 +41,8 @@
         int8_t exponentValue = getExponentValue(environment, interface);
 
         // Convert volts value to linear data format
-        uint16_t linearValue =
-            pmbus_utils::convertToVoutLinear(voltsValue, exponentValue);
+        uint16_t linearValue = pmbus_utils::convertToVoutLinear(voltsValue,
+                                                                exponentValue);
 
         // Write linear format value to VOUT_COMMAND.  I2CInterface method
         // writes low-order byte first as required by PMBus.
diff --git a/phosphor-regulators/src/actions/run_rule_action.hpp b/phosphor-regulators/src/actions/run_rule_action.hpp
index 87cd0c4..568f9f0 100644
--- a/phosphor-regulators/src/actions/run_rule_action.hpp
+++ b/phosphor-regulators/src/actions/run_rule_action.hpp
@@ -47,8 +47,7 @@
      *
      * @param ruleID rule ID
      */
-    explicit RunRuleAction(const std::string& ruleID) : ruleID{ruleID}
-    {}
+    explicit RunRuleAction(const std::string& ruleID) : ruleID{ruleID} {}
 
     /**
      * Executes this action.
diff --git a/phosphor-regulators/src/config_file_parser.cpp b/phosphor-regulators/src/config_file_parser.cpp
index 4bb8bd8..ede608b 100644
--- a/phosphor-regulators/src/config_file_parser.cpp
+++ b/phosphor-regulators/src/config_file_parser.cpp
@@ -214,8 +214,8 @@
     ++propertyCount;
 
     // Required inventory_path property
-    const json& inventoryPathElement =
-        getRequiredProperty(element, "inventory_path");
+    const json& inventoryPathElement = getRequiredProperty(element,
+                                                           "inventory_path");
     std::string inventoryPath = parseInventoryPath(inventoryPathElement);
     ++propertyCount;
 
@@ -356,8 +356,8 @@
     ++propertyCount;
 
     // Required is_regulator property
-    const json& isRegulatorElement =
-        getRequiredProperty(element, "is_regulator");
+    const json& isRegulatorElement = getRequiredProperty(element,
+                                                         "is_regulator");
     bool isRegulator = parseBoolean(isRegulatorElement);
     ++propertyCount;
 
@@ -367,8 +367,8 @@
     ++propertyCount;
 
     // Required i2c_interface property
-    const json& i2cInterfaceElement =
-        getRequiredProperty(element, "i2c_interface");
+    const json& i2cInterfaceElement = getRequiredProperty(element,
+                                                          "i2c_interface");
     std::unique_ptr<i2c::I2CInterface> i2cInterface =
         parseI2CInterface(i2cInterfaceElement);
     ++propertyCount;
diff --git a/phosphor-regulators/src/device.hpp b/phosphor-regulators/src/device.hpp
index 352daeb..1815680 100644
--- a/phosphor-regulators/src/device.hpp
+++ b/phosphor-regulators/src/device.hpp
@@ -74,11 +74,11 @@
             std::vector<std::unique_ptr<Rail>>{}) :
         id{id},
         isRegulatorDevice{isRegulator}, fru{fru},
-        i2cInterface{std::move(i2cInterface)}, presenceDetection{std::move(
-                                                   presenceDetection)},
+        i2cInterface{std::move(i2cInterface)},
+        presenceDetection{std::move(presenceDetection)},
         configuration{std::move(configuration)},
-        phaseFaultDetection{std::move(phaseFaultDetection)}, rails{std::move(
-                                                                 rails)}
+        phaseFaultDetection{std::move(phaseFaultDetection)},
+        rails{std::move(rails)}
     {}
 
     /**
diff --git a/phosphor-regulators/src/error_logging.hpp b/phosphor-regulators/src/error_logging.hpp
index ae26dab..1c633f9 100644
--- a/phosphor-regulators/src/error_logging.hpp
+++ b/phosphor-regulators/src/error_logging.hpp
@@ -166,8 +166,7 @@
      *
      * @param bus D-Bus bus object
      */
-    explicit DBusErrorLogging(sdbusplus::bus_t& bus) : bus{bus}
-    {}
+    explicit DBusErrorLogging(sdbusplus::bus_t& bus) : bus{bus} {}
 
     /** @copydoc ErrorLogging::logConfigFileError() */
     virtual void logConfigFileError(Entry::Level severity,
diff --git a/phosphor-regulators/src/journal.cpp b/phosphor-regulators/src/journal.cpp
index 955792a..716a999 100644
--- a/phosphor-regulators/src/journal.cpp
+++ b/phosphor-regulators/src/journal.cpp
@@ -43,8 +43,7 @@
     JournalCloser& operator=(const JournalCloser&) = delete;
     JournalCloser& operator=(JournalCloser&&) = delete;
 
-    explicit JournalCloser(sd_journal* journal) : journal{journal}
-    {}
+    explicit JournalCloser(sd_journal* journal) : journal{journal} {}
 
     ~JournalCloser()
     {
diff --git a/phosphor-regulators/src/manager.cpp b/phosphor-regulators/src/manager.cpp
index 4bb9a23..cfbb811 100644
--- a/phosphor-regulators/src/manager.cpp
+++ b/phosphor-regulators/src/manager.cpp
@@ -73,9 +73,8 @@
 
 Manager::Manager(sdbusplus::bus_t& bus, const sdeventplus::Event& event) :
     ManagerObject{bus, managerObjPath}, bus{bus}, eventLoop{event},
-    services{bus}, phaseFaultTimer{event,
-                                   std::bind(&Manager::phaseFaultTimerExpired,
-                                             this)},
+    services{bus},
+    phaseFaultTimer{event, std::bind(&Manager::phaseFaultTimerExpired, this)},
     sensorTimer{event, std::bind(&Manager::sensorTimerExpired, this)}
 {
     // Subscribe to D-Bus interfacesAdded signal from Entity Manager.  This
@@ -414,8 +413,8 @@
 
             // Store config file information in a new System object.  The old
             // System object, if any, is automatically deleted.
-            system =
-                std::make_unique<System>(std::move(rules), std::move(chassis));
+            system = std::make_unique<System>(std::move(rules),
+                                              std::move(chassis));
         }
     }
     catch (const std::exception& e)
diff --git a/phosphor-regulators/src/presence_service.hpp b/phosphor-regulators/src/presence_service.hpp
index 9520dbd..5ae96d3 100644
--- a/phosphor-regulators/src/presence_service.hpp
+++ b/phosphor-regulators/src/presence_service.hpp
@@ -83,8 +83,7 @@
      *
      * @param bus D-Bus bus object
      */
-    explicit DBusPresenceService(sdbusplus::bus_t& bus) : bus{bus}
-    {}
+    explicit DBusPresenceService(sdbusplus::bus_t& bus) : bus{bus} {}
 
     /** @copydoc PresenceService::clearCache() */
     virtual void clearCache(void) override
diff --git a/phosphor-regulators/src/rail.hpp b/phosphor-regulators/src/rail.hpp
index 63d80eb..70b3e3d 100644
--- a/phosphor-regulators/src/rail.hpp
+++ b/phosphor-regulators/src/rail.hpp
@@ -62,8 +62,8 @@
         std::unique_ptr<Configuration> configuration = nullptr,
         std::unique_ptr<SensorMonitoring> sensorMonitoring = nullptr) :
         id{id},
-        configuration{std::move(configuration)}, sensorMonitoring{std::move(
-                                                     sensorMonitoring)}
+        configuration{std::move(configuration)},
+        sensorMonitoring{std::move(sensorMonitoring)}
     {}
 
     /**
diff --git a/phosphor-regulators/src/regsctl/main.cpp b/phosphor-regulators/src/regsctl/main.cpp
index 9f65c8b..6f03016 100644
--- a/phosphor-regulators/src/regsctl/main.cpp
+++ b/phosphor-regulators/src/regsctl/main.cpp
@@ -39,12 +39,12 @@
         // Add dbus methods group
         auto methods = app.add_option_group("Methods");
         // Configure method
-        CLI::App* config =
-            methods->add_subcommand("config", "Configure regulators");
+        CLI::App* config = methods->add_subcommand("config",
+                                                   "Configure regulators");
         config->set_help_flag("-h,--help", "Configure regulators method help");
         // Monitor method
-        CLI::App* monitor =
-            methods->add_subcommand("monitor", "Monitor regulators");
+        CLI::App* monitor = methods->add_subcommand("monitor",
+                                                    "Monitor regulators");
         monitor->set_help_flag("-h,--help", "Monitor regulators method help");
         monitor->add_flag("-e,--enable", monitorEnable,
                           "Enable regulator monitoring");
diff --git a/phosphor-regulators/src/regsctl/utility.hpp b/phosphor-regulators/src/regsctl/utility.hpp
index b1a1418..b64eab5 100644
--- a/phosphor-regulators/src/regsctl/utility.hpp
+++ b/phosphor-regulators/src/regsctl/utility.hpp
@@ -23,8 +23,8 @@
 auto callMethod(const std::string& method, Args&&... args)
 {
     auto bus = sdbusplus::bus::new_default();
-    auto reqMsg =
-        bus.new_method_call(busName, objPath, interface, method.c_str());
+    auto reqMsg = bus.new_method_call(busName, objPath, interface,
+                                      method.c_str());
     reqMsg.append(std::forward<Args>(args)...);
 
     // Set timeout to 6 minutes; some regulator methods take over 5 minutes
diff --git a/phosphor-regulators/src/services.hpp b/phosphor-regulators/src/services.hpp
index 3c2e3ff..0721479 100644
--- a/phosphor-regulators/src/services.hpp
+++ b/phosphor-regulators/src/services.hpp
@@ -112,8 +112,8 @@
      * @param bus D-Bus bus object
      */
     explicit BMCServices(sdbusplus::bus_t& bus) :
-        bus{bus}, errorLogging{bus},
-        presenceService{bus}, sensors{bus}, vpd{bus}
+        bus{bus}, errorLogging{bus}, presenceService{bus}, sensors{bus},
+        vpd{bus}
     {}
 
     /** @copydoc Services::getBus() */
diff --git a/phosphor-regulators/src/temporary_file.cpp b/phosphor-regulators/src/temporary_file.cpp
index 514d818..5b5954d 100644
--- a/phosphor-regulators/src/temporary_file.cpp
+++ b/phosphor-regulators/src/temporary_file.cpp
@@ -30,8 +30,8 @@
 TemporaryFile::TemporaryFile()
 {
     // Build template path required by mkstemp()
-    std::string templatePath =
-        fs::temp_directory_path() / "phosphor-regulators-XXXXXX";
+    std::string templatePath = fs::temp_directory_path() /
+                               "phosphor-regulators-XXXXXX";
 
     // Generate unique file name, create file, and open it.  The XXXXXX
     // characters are replaced by mkstemp() to make the file name unique.
diff --git a/phosphor-regulators/src/vpd.hpp b/phosphor-regulators/src/vpd.hpp
index 514172c..e86f834 100644
--- a/phosphor-regulators/src/vpd.hpp
+++ b/phosphor-regulators/src/vpd.hpp
@@ -88,8 +88,7 @@
      *
      * @param bus D-Bus bus object
      */
-    explicit DBusVPD(sdbusplus::bus_t& bus) : bus{bus}
-    {}
+    explicit DBusVPD(sdbusplus::bus_t& bus) : bus{bus} {}
 
     /** @copydoc VPD::clearCache() */
     virtual void clearCache(void) override
diff --git a/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp b/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
index b09e3fa..986ca2e 100644
--- a/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
+++ b/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
@@ -132,7 +132,6 @@
     // Test where fails: Getting I2CInterface fails
     try
     {
-
         // Create IDMap, MockServices, and ActionEnvironment
         IDMap idMap{};
         MockServices services{};
diff --git a/phosphor-regulators/test/actions/set_device_action_tests.cpp b/phosphor-regulators/test/actions/set_device_action_tests.cpp
index 2651f13..139abd1 100644
--- a/phosphor-regulators/test/actions/set_device_action_tests.cpp
+++ b/phosphor-regulators/test/actions/set_device_action_tests.cpp
@@ -53,8 +53,8 @@
     idMap.addDevice(reg1);
 
     // Create Device regulator2 and add to IDMap
-    i2cInterface =
-        i2c::create(1, 0x72, i2c::I2CInterface::InitialState::CLOSED);
+    i2cInterface = i2c::create(1, 0x72,
+                               i2c::I2CInterface::InitialState::CLOSED);
     Device reg2{
         "regulator2", true,
         "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg2",
diff --git a/phosphor-regulators/test/device_tests.cpp b/phosphor-regulators/test/device_tests.cpp
index 0c43b1e..d5fdf74 100644
--- a/phosphor-regulators/test/device_tests.cpp
+++ b/phosphor-regulators/test/device_tests.cpp
@@ -74,8 +74,8 @@
         std::vector<std::unique_ptr<Rule>> rules{};
         std::vector<std::unique_ptr<Chassis>> chassisVec{};
         chassisVec.emplace_back(std::move(chassis));
-        this->system =
-            std::make_unique<System>(std::move(rules), std::move(chassisVec));
+        this->system = std::make_unique<System>(std::move(rules),
+                                                std::move(chassisVec));
     }
 
   protected:
@@ -456,8 +456,8 @@
             EXPECT_CALL(*action, execute).Times(0);
             std::vector<std::unique_ptr<Action>> actions{};
             actions.emplace_back(std::move(action));
-            configuration =
-                std::make_unique<Configuration>(volts, std::move(actions));
+            configuration = std::make_unique<Configuration>(volts,
+                                                            std::move(actions));
         }
 
         // Create Device
@@ -517,8 +517,8 @@
                 std::make_unique<Configuration>(volts, std::move(actions));
 
             // Create Rail
-            auto rail =
-                std::make_unique<Rail>("vdd0", std::move(configuration));
+            auto rail = std::make_unique<Rail>("vdd0",
+                                               std::move(configuration));
             rails.emplace_back(std::move(rail));
         }
 
@@ -534,8 +534,8 @@
                 std::make_unique<Configuration>(volts, std::move(actions));
 
             // Create Rail
-            auto rail =
-                std::make_unique<Rail>("vio0", std::move(configuration));
+            auto rail = std::make_unique<Rail>("vio0",
+                                               std::move(configuration));
             rails.emplace_back(std::move(rail));
         }
 
diff --git a/phosphor-regulators/test/id_map_tests.cpp b/phosphor-regulators/test/id_map_tests.cpp
index 15ace68..6c8d1ca 100644
--- a/phosphor-regulators/test/id_map_tests.cpp
+++ b/phosphor-regulators/test/id_map_tests.cpp
@@ -68,8 +68,8 @@
     // Test where device ID already exists in map
     try
     {
-        i2cInterface =
-            i2c::create(1, 0x72, i2c::I2CInterface::InitialState::CLOSED);
+        i2cInterface = i2c::create(1, 0x72,
+                                   i2c::I2CInterface::InitialState::CLOSED);
         Device device2{"vio_reg", true,
                        "/xyz/openbmc_project/inventory/system/chassis/"
                        "motherboard/vio_reg2",
diff --git a/phosphor-regulators/test/phase_fault_detection_tests.cpp b/phosphor-regulators/test/phase_fault_detection_tests.cpp
index c85970c..d7fa5f3 100644
--- a/phosphor-regulators/test/phase_fault_detection_tests.cpp
+++ b/phosphor-regulators/test/phase_fault_detection_tests.cpp
@@ -108,8 +108,8 @@
         std::vector<std::unique_ptr<Rule>> rules{};
         std::vector<std::unique_ptr<Chassis>> chassisVec{};
         chassisVec.emplace_back(std::move(chassis));
-        this->system =
-            std::make_unique<System>(std::move(rules), std::move(chassisVec));
+        this->system = std::make_unique<System>(std::move(rules),
+                                                std::move(chassisVec));
     }
 
   protected:
diff --git a/phosphor-regulators/test/system_tests.cpp b/phosphor-regulators/test/system_tests.cpp
index 1ea34b3..6cff029 100644
--- a/phosphor-regulators/test/system_tests.cpp
+++ b/phosphor-regulators/test/system_tests.cpp
@@ -102,8 +102,8 @@
     // Create Chassis that contains Device
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(std::move(device));
-    auto chassis =
-        std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
+    auto chassis = std::make_unique<Chassis>(1, chassisInvPath,
+                                             std::move(devices));
     Chassis* chassisPtr = chassis.get();
 
     // Create System that contains Chassis
@@ -157,8 +157,8 @@
     // Create Chassis that contains Device
     std::vector<std::unique_ptr<Device>> devices{};
     devices.emplace_back(std::move(device));
-    auto chassis =
-        std::make_unique<Chassis>(1, chassisInvPath, std::move(devices));
+    auto chassis = std::make_unique<Chassis>(1, chassisInvPath,
+                                             std::move(devices));
 
     // Create System that contains Chassis
     std::vector<std::unique_ptr<Rule>> rules{};
diff --git a/phosphor-regulators/test/test_sdbus_error.hpp b/phosphor-regulators/test/test_sdbus_error.hpp
index 1937e2d..ff4f4e2 100644
--- a/phosphor-regulators/test/test_sdbus_error.hpp
+++ b/phosphor-regulators/test/test_sdbus_error.hpp
@@ -28,8 +28,7 @@
 class TestSDBusError : public sdbusplus::exception_t
 {
   public:
-    TestSDBusError(const std::string& error) : error{error}
-    {}
+    TestSDBusError(const std::string& error) : error{error} {}
 
     const char* what() const noexcept override
     {
diff --git a/phosphor-regulators/test/validate-regulators-config_tests.cpp b/phosphor-regulators/test/validate-regulators-config_tests.cpp
index 16b2fec..10cd7ce 100644
--- a/phosphor-regulators/test/validate-regulators-config_tests.cpp
+++ b/phosphor-regulators/test/validate-regulators-config_tests.cpp
@@ -3367,8 +3367,8 @@
     }
     // Invalid: -s specified more than once
     {
-        command =
-            validateTool + "-s -s " + schemaFile + configuration + fileName;
+        command = validateTool + "-s -s " + schemaFile + configuration +
+                  fileName;
         expectCommandLineSyntax(outputMessageHelp, outputMessage, command, 2);
     }
     // Invalid: No file name specified after -c