Update clang-format
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Tested: built openpower-occ-control successfully.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I136870023229ff906d471dd4d8debfd404812ff1
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 04276b9..6191a75 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -6,13 +6,14 @@
#include "occ_dbus.hpp"
#include "utils.hpp"
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
#include <chrono>
#include <cmath>
#include <experimental/filesystem>
-#include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
#include <regex>
-#include <xyz/openbmc_project/Common/error.hpp>
namespace open_power
{
@@ -187,10 +188,11 @@
if ((!_pollTimer->isEnabled()) && (activeCount > 0))
{
- log<level::INFO>(fmt::format("Manager::statusCallBack(): {} OCCs will "
- "be polled every {} seconds",
- activeCount, pollInterval)
- .c_str());
+ log<level::INFO>(
+ fmt::format(
+ "Manager::statusCallBack(): {} OCCs will be polled every {} seconds",
+ activeCount, pollInterval)
+ .c_str());
// Send poll and start OCC poll timer
pollerTimerExpired();
@@ -198,8 +200,8 @@
else if ((_pollTimer->isEnabled()) && (activeCount == 0))
{
// Stop OCC poll timer
- log<level::INFO>("Manager::statusCallBack(): OCCs are not running, "
- "stopping poll timer");
+ log<level::INFO>(
+ "Manager::statusCallBack(): OCCs are not running, stopping poll timer");
_pollTimer->setEnabled(false);
#ifdef READ_OCC_SENSORS
@@ -249,8 +251,8 @@
if (activeCount == 0)
{
// No OCCs running, so poll timer will not be restarted
- log<level::INFO>("Manager::pollerTimerExpire(): No OCCs running, poll "
- "timer not restarted");
+ log<level::INFO>(
+ "Manager::pollerTimerExpire(): No OCCs running, poll timer not restarted");
}
if (!_pollTimer)
@@ -349,10 +351,11 @@
auto iter = dimmTempSensorName.find(fruTypeValue);
if (iter == dimmTempSensorName.end())
{
- log<level::ERR>(fmt::format("readTempSensors: Fru type "
- "error! fruTypeValue = {}) ",
- fruTypeValue)
- .c_str());
+ log<level::ERR>(
+ fmt::format(
+ "readTempSensors: Fru type error! fruTypeValue = {}) ",
+ fruTypeValue)
+ .c_str());
continue;
}