diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2018-09-14 14:50:03 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-18 16:43:22 -0400 |
commit | 94df8c9015798764d40665bb363bdbf27510f285 (patch) | |
tree | ce26611a482f2f03a582838faec29eeb065a6c47 /occ_manager.cpp | |
parent | 7db89e36d7c5649b826b607cb2d90e38bb02ab86 (diff) | |
download | openpower-occ-control-94df8c9015798764d40665bb363bdbf27510f285.tar.gz openpower-occ-control-94df8c9015798764d40665bb363bdbf27510f285.zip |
clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting
Change-Id: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'occ_manager.cpp')
-rw-r--r-- | occ_manager.cpp | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/occ_manager.cpp b/occ_manager.cpp index 6fd0652..d420eea 100644 --- a/occ_manager.cpp +++ b/occ_manager.cpp @@ -1,12 +1,15 @@ -#include <experimental/filesystem> -#include <phosphor-logging/log.hpp> -#include <phosphor-logging/elog-errors.hpp> -#include <xyz/openbmc_project/Common/error.hpp> -#include "occ_finder.hpp" +#include "config.h" + #include "occ_manager.hpp" + #include "i2c_occ.hpp" +#include "occ_finder.hpp" #include "utils.hpp" -#include "config.h" + +#include <experimental/filesystem> +#include <phosphor-logging/elog-errors.hpp> +#include <phosphor-logging/log.hpp> +#include <xyz/openbmc_project/Common/error.hpp> namespace open_power { @@ -45,33 +48,26 @@ void Manager::createObjects(const std::string& occ) auto path = fs::path(OCC_CONTROL_ROOT) / occ; passThroughObjects.emplace_back( - std::make_unique<PassThrough>( - bus, - path.c_str())); - - statusObjects.emplace_back( - std::make_unique<Status>( - bus, - event, - path.c_str(), - *this, - std::bind(std::mem_fn(&Manager::statusCallBack), - this, std::placeholders::_1))); + std::make_unique<PassThrough>(bus, path.c_str())); + + statusObjects.emplace_back(std::make_unique<Status>( + bus, event, path.c_str(), *this, + std::bind(std::mem_fn(&Manager::statusCallBack), this, + std::placeholders::_1))); // Create the power cap monitor object for master occ (0) if (!pcap) { pcap = std::make_unique<open_power::occ::powercap::PowerCap>( - bus, - *statusObjects.front()); + bus, *statusObjects.front()); } } void Manager::statusCallBack(bool status) { using namespace phosphor::logging; - using InternalFailure = sdbusplus::xyz::openbmc_project::Common:: - Error::InternalFailure; + using InternalFailure = + sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; // At this time, it won't happen but keeping it // here just in case something changes in the future @@ -86,7 +82,7 @@ void Manager::statusCallBack(bool status) // Only start presence detection if all the OCCs are bound if (activeCount == statusObjects.size()) { - for (auto &obj : statusObjects) + for (auto& obj : statusObjects) { obj->addPresenceWatchMaster(); } @@ -107,17 +103,11 @@ void Manager::initStatusObjects() name = std::string(OCC_NAME) + '_' + name; auto path = fs::path(OCC_CONTROL_ROOT) / name; statusObjects.emplace_back( - std::make_unique<Status>( - bus, - event, - path.c_str(), - *this)); + std::make_unique<Status>(bus, event, path.c_str(), *this)); } // The first device is master occ pcap = std::make_unique<open_power::occ::powercap::PowerCap>( - bus, - *statusObjects.front(), - occMasterName); + bus, *statusObjects.front(), occMasterName); } #endif |