clang-format: update to latest version
Pick up latest .clang-format file from the docs repository.
Fix formatting on all files.
Minor compile fixes due to GCC10 and sdbusplus changes.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie1f7a4e59b6cf015310effef50d558ff59731024
diff --git a/power-sequencer/main.cpp b/power-sequencer/main.cpp
index 3e1ca52..7e9d47e 100644
--- a/power-sequencer/main.cpp
+++ b/power-sequencer/main.cpp
@@ -18,11 +18,12 @@
#include "runtime_monitor.hpp"
#include "ucd90160.hpp"
-#include <chrono>
-#include <iostream>
#include <phosphor-logging/log.hpp>
#include <sdeventplus/event.hpp>
+#include <chrono>
+#include <iostream>
+
using namespace witherspoon::power;
using namespace phosphor::logging;
diff --git a/power-sequencer/pgood_monitor.hpp b/power-sequencer/pgood_monitor.hpp
index 7dbabf9..70a6f89 100644
--- a/power-sequencer/pgood_monitor.hpp
+++ b/power-sequencer/pgood_monitor.hpp
@@ -47,8 +47,7 @@
std::chrono::milliseconds& t) :
DeviceMonitor(std::move(d), e, t),
bus(b)
- {
- }
+ {}
/**
* Analyzes the power sequencer for fails and then
diff --git a/power-sequencer/runtime_monitor.hpp b/power-sequencer/runtime_monitor.hpp
index 934aef1..93e398f 100644
--- a/power-sequencer/runtime_monitor.hpp
+++ b/power-sequencer/runtime_monitor.hpp
@@ -55,8 +55,7 @@
bus(b), match(bus, getMatchString(),
std::bind(std::mem_fn(&RuntimeMonitor::onPowerLost), this,
std::placeholders::_1))
- {
- }
+ {}
/**
* Clears faults and then runs DeviceMonitor::run to
diff --git a/power-sequencer/templates/ucd90160_defs.mako.cpp b/power-sequencer/templates/ucd90160_defs.mako.cpp
index 1775158..069e5f0 100644
--- a/power-sequencer/templates/ucd90160_defs.mako.cpp
+++ b/power-sequencer/templates/ucd90160_defs.mako.cpp
@@ -10,7 +10,8 @@
using namespace ucd90160;
using namespace std::string_literals;
-const DeviceMap UCD90160::deviceMap{
+const DeviceMap UCD90160::deviceMap
+{
%for ucd_data in ucd90160s:
{${ucd_data['index']},
DeviceDefinition{
@@ -38,7 +39,7 @@
"${gpio_analysis['path']}",
gpio::Value::${gpio_analysis['gpio_value']},
[](auto& ucd, const auto& callout) {
- ucd.${gpio_analysis['error_function']}(callout);
+ ucd.${gpio_analysis['error_function']}(callout);
},
optionFlags::${gpio_analysis['option_flags']},
GPIODefinitions{
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index d0d176c..c060ebe 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -19,13 +19,14 @@
#include "utility.hpp"
#include <elog-errors.hpp>
-#include <map>
-#include <memory>
#include <org/open_power/Witherspoon/Fault/error.hpp>
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/log.hpp>
#include <xyz/openbmc_project/Common/Device/error.hpp>
+#include <map>
+#include <memory>
+
namespace witherspoon
{
namespace power
@@ -54,8 +55,7 @@
interface(std::get<ucd90160::pathField>(deviceMap.find(instance)->second),
DRIVER_NAME, instance),
gpioDevice(findGPIODevice(interface.path())), bus(bus)
-{
-}
+{}
void UCD90160::onFailure()
{
diff --git a/power-sequencer/ucd90160.hpp b/power-sequencer/ucd90160.hpp
index 3169de6..b66bb82 100644
--- a/power-sequencer/ucd90160.hpp
+++ b/power-sequencer/ucd90160.hpp
@@ -5,10 +5,11 @@
#include "pmbus.hpp"
#include "types.hpp"
+#include <sdbusplus/bus.hpp>
+
#include <algorithm>
#include <filesystem>
#include <map>
-#include <sdbusplus/bus.hpp>
#include <vector>
namespace witherspoon
@@ -60,8 +61,7 @@
* Clears faults in the device
*/
void clearFaults() override
- {
- }
+ {}
private:
/**