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: Ie54441d565a3b72e24382929becc9101d7611510
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/nvme_manager.cpp b/nvme_manager.cpp
index a70a842..d10d1d0 100644
--- a/nvme_manager.cpp
+++ b/nvme_manager.cpp
@@ -1,18 +1,19 @@
#include "nvme_manager.hpp"
+#include "i2c.h"
+
#include "smbus.hpp"
-#include <filesystem>
-#include <map>
#include <nlohmann/json.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/message.hpp>
-#include <sstream>
-#include <string>
#include <xyz/openbmc_project/Led/Physical/server.hpp>
-#include "i2c.h"
+#include <filesystem>
+#include <map>
+#include <sstream>
+#include <string>
#define MONITOR_INTERVAL_SECONDS 1
#define MAX_SMBUS_ERROR_RETRY 0
#define NVME_SSD_SLAVE_ADDRESS 0x6a
@@ -185,7 +186,6 @@
bool success,
const phosphor::nvme::Nvme::NVMeData& nvmeData)
{
-
if (success)
{
if (!nvmeData.smartWarnings.empty())
@@ -306,8 +306,8 @@
return nvmeData.present;
}
- nvmeData.vendor =
- intToHex(rsp_data_command_8[1]) + " " + intToHex(rsp_data_command_8[2]);
+ nvmeData.vendor = intToHex(rsp_data_command_8[1]) + " " +
+ intToHex(rsp_data_command_8[2]);
for (auto iter = map_vendor.begin(); iter != map_vendor.end(); iter++)
{
@@ -406,7 +406,6 @@
/** @brief Obtain the initial configuration value of NVMe */
std::vector<phosphor::nvme::Nvme::NVMeConfig> Nvme::getNvmeConfig()
{
-
phosphor::nvme::Nvme::NVMeConfig nvmeConfig;
std::vector<phosphor::nvme::Nvme::NVMeConfig> nvmeConfigs;
int8_t criticalHigh = 0;
@@ -422,10 +421,10 @@
static const std::vector<Json> empty{};
std::vector<Json> readings = data.value("config", empty);
std::vector<Json> thresholds = data.value("threshold", empty);
- monitorIntervalSec =
- data.value("monitorIntervalSec", MONITOR_INTERVAL_SECONDS);
- maxSmbusErrorRetry =
- data.value("maxSmbusErrorRetry", MAX_SMBUS_ERROR_RETRY);
+ monitorIntervalSec = data.value("monitorIntervalSec",
+ MONITOR_INTERVAL_SECONDS);
+ maxSmbusErrorRetry = data.value("maxSmbusErrorRetry",
+ MAX_SMBUS_ERROR_RETRY);
if (!thresholds.empty())
{
@@ -647,10 +646,10 @@
NVMeData nvmeData;
inventoryPath = NVME_INVENTORY_PATH + config.index;
- devPresentPath =
- GPIO_BASE_PATH + std::to_string(config.presentPin) + "/value";
- devPwrGoodPath =
- GPIO_BASE_PATH + std::to_string(config.pwrGoodPin) + "/value";
+ devPresentPath = GPIO_BASE_PATH + std::to_string(config.presentPin) +
+ "/value";
+ devPwrGoodPath = GPIO_BASE_PATH + std::to_string(config.pwrGoodPin) +
+ "/value";
auto presentPinValStr = (config.presentPin)
? getGPIOValueOfNvme(devPresentPath)