fix formatting fixes JIRA https:// Signed-off-by: Harshit Aghera <haghera@nvidia.com>
diff --git a/common/coroutineSemaphore.hpp b/common/coroutineSemaphore.hpp index fe02ef6..aa7b3ff 100644 --- a/common/coroutineSemaphore.hpp +++ b/common/coroutineSemaphore.hpp
@@ -150,9 +150,8 @@ { // Schedule the resumption of the next coroutine in the event loop. - if (sd_event_add_defer( - event.get(), nullptr, - [](sd_event_source*, void* userdata) -> int { + if (sd_event_add_defer(event.get(), nullptr, + [](sd_event_source*, void* userdata) -> int { auto nextAwaiter = static_cast<std::shared_ptr<Awaiter>*>(userdata); if (!nextAwaiter || !(*nextAwaiter)) @@ -162,8 +161,7 @@ (*nextAwaiter)->handle.resume(); delete nextAwaiter; // Free memory after use return 0; - }, - new std::shared_ptr<Awaiter>(nextAwaiter)) < 0) + }, new std::shared_ptr<Awaiter>(nextAwaiter)) < 0) { lg2::error( "Failed to schedule deferred coroutine resumption for eid: {EID}, Awaiter ID: {AWAITER_ID}",
diff --git a/common/dBusAsyncUtils.hpp b/common/dBusAsyncUtils.hpp index 628b8d8..ea3952d 100644 --- a/common/dBusAsyncUtils.hpp +++ b/common/dBusAsyncUtils.hpp
@@ -105,8 +105,8 @@ coGetDbusProperty(const std::string& objectPath, const std::string& property, const std::string& interface, const std::string service = entityManagerService) : - service(service), - objectPath(objectPath), interface(interface), property(property), ret{} + service(service), objectPath(objectPath), interface(interface), + property(property), ret{} {} }; @@ -172,8 +172,7 @@ coGetAllDbusProperty(const std::string& service, const std::string& objectPath, const std::string& interface = "") : - service(service), - objectPath(objectPath), interface(interface), ret{} + service(service), objectPath(objectPath), interface(interface), ret{} {} }; @@ -243,8 +242,7 @@ */ coGetServiceMap(const std::string& objectPath, const dbus::Interfaces& ifaceList) : - objectPath(objectPath), - ifaceList(ifaceList) + objectPath(objectPath), ifaceList(ifaceList) {} }; @@ -318,8 +316,8 @@ coGetDbusProperty(const std::string& objectPath, const std::string& property, const std::string& interface, const std::string service = entityManagerService) : - service(service), - objectPath(objectPath), interface(interface), property(property), ret{} + service(service), objectPath(objectPath), interface(interface), + property(property), ret{} {} }; @@ -350,8 +348,7 @@ coGetServiceMap(const std::string& objectPath, const dbus::Interfaces& ifaceList) : - objectPath(objectPath), - ifaceList(ifaceList) + objectPath(objectPath), ifaceList(ifaceList) {} };
diff --git a/common/log.hpp b/common/log.hpp index 82a720c..3674daa 100644 --- a/common/log.hpp +++ b/common/log.hpp
@@ -57,9 +57,9 @@ /* Macro to check for odd-numbered arguments to prevent flooding. */ #define SHOULD_LOG(msg, ...) \ - std::apply( \ - [this](auto&&... args) { return this->shouldLog(msg, args...); }, \ - StateChangeLogger::extractOddArgs(__VA_ARGS__)) + std::apply([this](auto&&... args) { \ + return this->shouldLog(msg, args...); \ + }, StateChangeLogger::extractOddArgs(__VA_ARGS__)) /* Logging macros which will store log level, fileName and line */ #define LG2_LEVEL_FILE(level, msg, ...) \
diff --git a/common/sleep.hpp b/common/sleep.hpp index 7365d04..b472f9f 100644 --- a/common/sleep.hpp +++ b/common/sleep.hpp
@@ -139,8 +139,8 @@ */ Sleep(const sdeventplus::Event& event, uint64_t durationInUsec, TimerEventPriority priority) : - event(event), - durationInUsec(durationInUsec), timerEventPriority(priority), + event(event), durationInUsec(durationInUsec), + timerEventPriority(priority), rc(NSM_SW_SUCCESS) // Initialize the result code to success {} };
diff --git a/common/test/meson.build b/common/test/meson.build index 07196be..1afdee9 100644 --- a/common/test/meson.build +++ b/common/test/meson.build
@@ -1,15 +1,6 @@ -dep_src_files = [ - '../utils.cpp', - '../dBusHandler.cpp', -] +dep_src_files = ['../utils.cpp', '../dBusHandler.cpp'] -dep_src_headers = [ - '.', - '..', - '../../', - '../../common', - '../../libnsm', -] +dep_src_headers = ['.', '..', '../../', '../../common', '../../libnsm'] test_src = declare_dependency( sources: dep_src_files, @@ -31,4 +22,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/libnsm/test/libnsm_base_test.cpp b/libnsm/test/libnsm_base_test.cpp index b657276..dbe037a 100644 --- a/libnsm/test/libnsm_base_test.cpp +++ b/libnsm/test/libnsm_base_test.cpp
@@ -28,8 +28,7 @@ struct nsm_header_info hdr; struct nsm_header_info *hdr_ptr = NULL; - struct nsm_msg_hdr msg { - }; + struct nsm_msg_hdr msg{}; // header information pointer is NULL auto rc = pack_nsm_header(hdr_ptr, &msg); @@ -58,8 +57,7 @@ auto rc = unpack_nsm_header(nullptr, &hdr); EXPECT_EQ(rc, NSM_SW_ERROR_NULL); - struct nsm_msg_hdr msg { - }; + struct nsm_msg_hdr msg{}; // hdr pointer is NULL rc = unpack_nsm_header(&msg, nullptr);
diff --git a/libnsm/test/libnsm_firmware_utils_test.cpp b/libnsm/test/libnsm_firmware_utils_test.cpp index 1736173..894bc14 100644 --- a/libnsm/test/libnsm_firmware_utils_test.cpp +++ b/libnsm/test/libnsm_firmware_utils_test.cpp
@@ -1386,8 +1386,7 @@ TEST(QueryFirmwareSecurityVersion, testEncodeResponse) { - struct nsm_firmware_security_version_number_resp sec_resp { - }; + struct nsm_firmware_security_version_number_resp sec_resp{}; sec_resp.active_component_security_version = 3; sec_resp.pending_component_security_version = 4; sec_resp.minimum_security_version = 1;
diff --git a/libnsm/test/meson.build b/libnsm/test/meson.build index a5873e9..07e64e4 100644 --- a/libnsm/test/meson.build +++ b/libnsm/test/meson.build
@@ -11,13 +11,12 @@ '../pci-links.c', ] -dep_src_headers = [ - '.', - '..', - '../../common', -] +dep_src_headers = ['.', '..', '../../common'] -test_src = declare_dependency(sources: dep_src_files, include_directories: dep_src_headers) +test_src = declare_dependency( + sources: dep_src_files, + include_directories: dep_src_headers, +) tests = [ 'libnsm_base_test', @@ -55,4 +54,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/meson.build b/meson.build index 83bb510..f3434c5 100644 --- a/meson.build +++ b/meson.build
@@ -49,11 +49,17 @@ endif if get_option('grace-spi-operations').enabled() - add_project_arguments('-DENABLE_GRACE_SPI_OPERATIONS', language: ['cpp', 'c']) + add_project_arguments( + '-DENABLE_GRACE_SPI_OPERATIONS', + language: ['cpp', 'c'], + ) endif if get_option('grace-spi-operations-raw-debug-dump').enabled() - add_project_arguments('-DENABLE_GRACE_SPI_OPERATION_RAW_DEBUG_DUMP', language: ['cpp', 'c']) + add_project_arguments( + '-DENABLE_GRACE_SPI_OPERATION_RAW_DEBUG_DUMP', + language: ['cpp', 'c'], + ) endif cpp = meson.get_compiler('cpp') @@ -71,10 +77,7 @@ 'SENSOR_POLLING_TIME_LONG_RUNNING', get_option('sensor-polling-time-long-running'), ) -conf_data.set( - 'NUM_GPU_PER_MODULE', - get_option('num-gpu-per-module') -) +conf_data.set('NUM_GPU_PER_MODULE', get_option('num-gpu-per-module')) conf_data.set( 'INSTANCE_ID_EXPIRATION_INTERVAL', get_option('instance-id-expiration-interval'), @@ -88,10 +91,7 @@ 'RESPONSE_TIME_OUT_LONG_RUNNING', get_option('response-time-out-long-running'), ) -conf_data.set( - 'DEFAULT_RR_REFRESH_LIMIT_IN_MS', - get_option('rr-refresh-limit'), -) +conf_data.set('DEFAULT_RR_REFRESH_LIMIT_IN_MS', get_option('rr-refresh-limit')) conf_data.set( 'ALLOWED_BUFFER_IN_MS', get_option('allowed-buffer-in-ms-for-polling'), @@ -145,14 +145,16 @@ endif if get_option('tracing').enabled() and get_option('tests').enabled() - error('Cannot enable both features "tracing" and "tests" at a time. Please disable one of them.') + error( + 'Cannot enable both features "tracing" and "tests" at a time. Please disable one of them.', + ) endif if get_option('tracing').enabled() - summary('tracing','-DLTTNG_TRACING', section : 'Enabled Tracing') + summary('tracing', '-DLTTNG_TRACING', section: 'Enabled Tracing') conf_data.set('LTTNG_TRACING', 1) - liblttng = dependency('lttng-ust', required : true) - ldl = dependency('dl', required : true) + liblttng = dependency('lttng-ust', required: true) + ldl = dependency('dl', required: true) endif conf_data.set('LOCAL_EID', get_option('local-eid')) @@ -171,7 +173,10 @@ endif if get_option('nvidia-fpga-pcie-reference-clock-count').enabled() - add_project_arguments('-DNVIDIA_FPGA_PCIE_REFERENCE_CLOCK_COUNT', language: ['cpp', 'c']) + add_project_arguments( + '-DNVIDIA_FPGA_PCIE_REFERENCE_CLOCK_COUNT', + language: ['cpp', 'c'], + ) endif configure_file(output: 'config.h', configuration: conf_data) @@ -193,9 +198,7 @@ endif systemd = dependency('systemd') -systemd_system_unit_dir = systemd.get_variable( - pkgconfig: 'systemdsystemunitdir', -) +systemd_system_unit_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir') subdir('services') subdir('nsmtool')
diff --git a/mockupResponder/firmwareUtils.cpp b/mockupResponder/firmwareUtils.cpp index 488617d..9d760f5 100644 --- a/mockupResponder/firmwareUtils.cpp +++ b/mockupResponder/firmwareUtils.cpp
@@ -31,14 +31,8 @@ // global states to maintain the values for testing static const uint64_t fixedNonce = 123456789; uint8_t configState = 0; - struct nsm_firmware_security_version_number_resp sec_respEc - { - 3, 4, 0, 0 - }; - struct nsm_firmware_security_version_number_resp sec_respAp - { - 3, 4, 1, 0 - }; + struct nsm_firmware_security_version_number_resp sec_respEc{3, 4, 0, 0}; + struct nsm_firmware_security_version_number_resp sec_respAp{3, 4, 1, 0}; uint16_t apActiveComponentKeyIndex = 6; uint16_t apPendingComponentKeyIndex = 6; @@ -316,8 +310,7 @@ { case QUERY_IRREVERSIBLE_CFG: { - struct nsm_firmware_irreversible_config_request_0_resp cfg_0_resp - {}; + struct nsm_firmware_irreversible_config_request_0_resp cfg_0_resp{}; cfg_0_resp.irreversible_config_state = fwStateMachine->configState; rc = encode_nsm_firmware_irreversible_config_request_0_resp( requestMsg->hdr.instance_id, NSM_SUCCESS, reason_code, @@ -344,8 +337,7 @@ case ENABLE_IRREVERSIBLE_CFG: { fwStateMachine->configState = 1; - struct nsm_firmware_irreversible_config_request_2_resp cfg_2_resp - {}; + struct nsm_firmware_irreversible_config_request_2_resp cfg_2_resp{}; cfg_2_resp.nonce = fwStateMachine->fixedNonce; rc = encode_nsm_firmware_irreversible_config_request_2_resp( requestMsg->hdr.instance_id, NSM_SUCCESS, reason_code, @@ -672,8 +664,7 @@ return std::nullopt; } // Sample Update Min Security Version Response - struct nsm_firmware_update_min_sec_ver_resp sec_resp - {}; + struct nsm_firmware_update_min_sec_ver_resp sec_resp{}; uint16_t msg_size = sizeof(struct nsm_msg_hdr) + sizeof(nsm_firmware_update_min_sec_ver_req_command); std::vector<uint8_t> response(msg_size, 0);
diff --git a/mockupResponder/meson.build b/mockupResponder/meson.build index 00ef333..ea03714 100644 --- a/mockupResponder/meson.build +++ b/mockupResponder/meson.build
@@ -33,4 +33,4 @@ ], install: true, install_dir: get_option('bindir'), -) \ No newline at end of file +)
diff --git a/mockupResponder/mockupResponder.cpp b/mockupResponder/mockupResponder.cpp index 2400d5a..7afec0a 100644 --- a/mockupResponder/mockupResponder.cpp +++ b/mockupResponder/mockupResponder.cpp
@@ -48,8 +48,7 @@ sdbusplus::asio::object_server& server, eid_t eid, uint8_t deviceType, uint8_t instanceId) : - event(event), - verbose(verbose), server(server), eventReceiverEid(0), + event(event), verbose(verbose), server(server), eventReceiverEid(0), globalEventGenerationSetting(GLOBAL_EVENT_GENERATION_DISABLE), state({ {}, // writeProtected @@ -185,8 +184,7 @@ return false; } - struct sockaddr_un addr - {}; + struct sockaddr_un addr{}; addr.sun_family = AF_UNIX; memcpy(addr.sun_path, MCTP_SOCKET_PATH, sizeof(MCTP_SOCKET_PATH) - 1);
diff --git a/mockupResponder/test/meson.build b/mockupResponder/test/meson.build index 8ed28af..9d83a90 100644 --- a/mockupResponder/test/meson.build +++ b/mockupResponder/test/meson.build
@@ -16,22 +16,14 @@ '../../libnsm/firmware-utils.c', ] -dep_src_headers = [ - '.', - '..', - '../../', - '../../common', - '../../libnsm', -] +dep_src_headers = ['.', '..', '../../', '../../common', '../../libnsm'] test_src = declare_dependency( sources: dep_src_files, include_directories: dep_src_headers, ) -tests = [ - 'mockupResponder_test', -] +tests = ['mockupResponder_test'] foreach t : tests test( @@ -55,4 +47,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/mockupResponder/test/mockupResponder_test.cpp b/mockupResponder/test/mockupResponder_test.cpp index 5c3bcbd..d3f265d 100644 --- a/mockupResponder/test/mockupResponder_test.cpp +++ b/mockupResponder/test/mockupResponder_test.cpp
@@ -81,12 +81,10 @@ { std::optional<Request> longRunningEvent; // test as not long running - test( - requestMsg, requestMsgLen, - [&handler, &longRunningEvent](const nsm_msg* request, size_t len) { + test(requestMsg, requestMsgLen, + [&handler, &longRunningEvent](const nsm_msg* request, size_t len) { return handler(request, len, false, longRunningEvent); - }, - command, response); + }, command, response); // test as long running auto resp = handler(requestMsg, requestMsgLen, true, longRunningEvent);
diff --git a/nsmd/deviceManager.hpp b/nsmd/deviceManager.hpp index 7ce78af..8384a5a 100644 --- a/nsmd/deviceManager.hpp +++ b/nsmd/deviceManager.hpp
@@ -150,9 +150,8 @@ std::multimap<uuid_t, std::tuple<eid_t, MctpMedium, MctpBinding>>& eidTable, NsmDeviceTable& nsmDevices) : - event(event), - handler(handler), instanceIdDb(instanceIdDb), objServer(objServer), - eidTable(eidTable), nsmDevices(nsmDevices) + event(event), handler(handler), instanceIdDb(instanceIdDb), + objServer(objServer), eidTable(eidTable), nsmDevices(nsmDevices) {} void discoverNsmDevice(const MctpInfos& mctpInfos);
diff --git a/nsmd/meson.build b/nsmd/meson.build index edc7f84..c9015e0 100644 --- a/nsmd/meson.build +++ b/nsmd/meson.build
@@ -62,9 +62,9 @@ subdir('nsmLongRunning') if get_option('tracing').enabled() - deps += [ liblttng, ldl ] - sources += [ '../tracepoints/nsmd-tp.c' ] - nsmd_headers += [ '../tracepoints' ] + deps += [liblttng, ldl] + sources += ['../tracepoints/nsmd-tp.c'] + nsmd_headers += ['../tracepoints'] endif executable(
diff --git a/nsmd/nsmChassis/nsmAERError.cpp b/nsmd/nsmChassis/nsmAERError.cpp index 382ac3a..8acd485 100644 --- a/nsmd/nsmChassis/nsmAERError.cpp +++ b/nsmd/nsmChassis/nsmAERError.cpp
@@ -32,8 +32,8 @@ const std::string& name, const std::string& type, std::shared_ptr<NsmAERErrorStatusIntf> aerErrorStatusIntf, uint8_t deviceIndex) : - NsmSensor(name, type), - aerErrorStatusIntf(aerErrorStatusIntf), deviceIndex(deviceIndex) + NsmSensor(name, type), aerErrorStatusIntf(aerErrorStatusIntf), + deviceIndex(deviceIndex) { lg2::info("NsmPCIeAERErrorStatus: create sensor:{NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmChassis/nsmAERError.hpp b/nsmd/nsmChassis/nsmAERError.hpp index c6bc346..781f4eb 100644 --- a/nsmd/nsmChassis/nsmAERError.hpp +++ b/nsmd/nsmChassis/nsmAERError.hpp
@@ -42,8 +42,7 @@ NsmAERErrorStatusIntf(sdbusplus::bus::bus& bus, const char* path, uint8_t deviceIndex, std::shared_ptr<NsmDevice> device) : - AERErrorStatusIntf(bus, path), - deviceIndex(deviceIndex), device(device) + AERErrorStatusIntf(bus, path), deviceIndex(deviceIndex), device(device) {} sdbusplus::message::object_path clearAERStatus() override; requester::Coroutine clearAERError(AsyncOperationStatusType* status);
diff --git a/nsmd/nsmChassis/nsmChassisLED.cpp b/nsmd/nsmChassis/nsmChassisLED.cpp index 5a7742c..b4d92cc 100644 --- a/nsmd/nsmChassis/nsmChassisLED.cpp +++ b/nsmd/nsmChassis/nsmChassisLED.cpp
@@ -29,8 +29,7 @@ NsmNvlinkLedIntf::NsmNvlinkLedIntf(sdbusplus::bus::bus& bus, std::string& name, std::string& type, std::string& inventoryObjPath) : - NsmObject(name, type), - inventoryObjPath(inventoryObjPath) + NsmObject(name, type), inventoryObjPath(inventoryObjPath) { nvlinkledIntf = std::make_unique<NvlinkLedIntf>(bus, inventoryObjPath.c_str());
diff --git a/nsmd/nsmChassis/nsmClockOutputEnableState.cpp b/nsmd/nsmChassis/nsmClockOutputEnableState.cpp index e1ea655..6887b4a 100644 --- a/nsmd/nsmChassis/nsmClockOutputEnableState.cpp +++ b/nsmd/nsmChassis/nsmClockOutputEnableState.cpp
@@ -25,8 +25,7 @@ NsmClockOutputEnableStateBase::NsmClockOutputEnableStateBase( const NsmObject& provider, clock_output_enable_state_index bufferIndex, NsmDeviceIdentification deviceType, uint8_t instanceNumber, bool retimer) : - NsmSensor(provider), - bufferIndex(bufferIndex), deviceType(deviceType), + NsmSensor(provider), bufferIndex(bufferIndex), deviceType(deviceType), instanceNumber(instanceNumber), retimer(retimer) {}
diff --git a/nsmd/nsmChassis/nsmErot.cpp b/nsmd/nsmChassis/nsmErot.cpp index 0a71903..1d8aca7 100644 --- a/nsmd/nsmChassis/nsmErot.cpp +++ b/nsmd/nsmChassis/nsmErot.cpp
@@ -29,8 +29,7 @@ const std::string& type, const uuid_t& uuid, int classification, int identifier) : - NsmSensor(name, type), - uuid(uuid) + NsmSensor(name, type), uuid(uuid) { nsmRequest = {.component_classification = uint16_t(classification), .component_identifier = uint16_t(identifier), @@ -60,8 +59,7 @@ { uint8_t cc = NSM_SUCCESS; uint16_t reasonCode = ERR_NULL; - struct ::nsm_firmware_erot_state_info_resp erotInfo - {}; + struct ::nsm_firmware_erot_state_info_resp erotInfo{}; auto rc = decode_nsm_query_get_erot_state_parameters_resp( responseMsg, responseLen, &cc, &reasonCode, &erotInfo); LG2_ERROR_FLT(
diff --git a/nsmd/nsmChassis/nsmGpuClockControl.cpp b/nsmd/nsmChassis/nsmGpuClockControl.cpp index 8b87cf1..07cbe44 100644 --- a/nsmd/nsmChassis/nsmGpuClockControl.cpp +++ b/nsmd/nsmChassis/nsmGpuClockControl.cpp
@@ -41,8 +41,7 @@ NsmClearClockLimAsyncIntf::NsmClearClockLimAsyncIntf( sdbusplus::bus::bus& bus, const char* path, std::shared_ptr<NsmDevice> device) : - ClearClockLimAsyncIntf(bus, path), - device(device){}; + ClearClockLimAsyncIntf(bus, path), device(device) {}; requester::Coroutine NsmClearClockLimAsyncIntf::doClearClockLimitOnDevice( std::shared_ptr<AsyncStatusIntf> statusInterface) @@ -132,8 +131,7 @@ const std::vector<utils::Association>& associations, std::string& type, const std::string& inventoryObjPath, const std::string& physicalContext, const std::string& clockMode) : - NsmSensor(name, type), - cpuOperatingConfigIntf(cpuOperatingConfigIntf), + NsmSensor(name, type), cpuOperatingConfigIntf(cpuOperatingConfigIntf), nsmClearClockLimAsyncIntf(nsmClearClockLimAsyncIntf), inventoryObjPath(inventoryObjPath) {
diff --git a/nsmd/nsmChassis/nsmGpuPresenceAndPowerStatus.cpp b/nsmd/nsmChassis/nsmGpuPresenceAndPowerStatus.cpp index 0d9a61b..37521fc 100644 --- a/nsmd/nsmChassis/nsmGpuPresenceAndPowerStatus.cpp +++ b/nsmd/nsmChassis/nsmGpuPresenceAndPowerStatus.cpp
@@ -30,9 +30,8 @@ NsmGpuPresenceAndPowerStatus::NsmGpuPresenceAndPowerStatus( const NsmInterfaceProvider<OperationalStatusIntf>& provider, uint8_t gpuInstanceId) : - NsmGroupSensor(provider), - NsmInterfaceContainer(provider), gpuInstanceId(gpuInstanceId), - gpusPresence{}, gpusPower{}, state{} + NsmGroupSensor(provider), NsmInterfaceContainer(provider), + gpuInstanceId(gpuInstanceId), gpusPresence{}, gpusPower{}, state{} { updateMetricOnSharedMemory(); }
diff --git a/nsmd/nsmChassis/nsmPCIeFunction.cpp b/nsmd/nsmChassis/nsmPCIeFunction.cpp index ec75d9e..f75992f 100644 --- a/nsmd/nsmChassis/nsmPCIeFunction.cpp +++ b/nsmd/nsmChassis/nsmPCIeFunction.cpp
@@ -27,19 +27,17 @@ NsmPCIeFunction::NsmPCIeFunction( const NsmInterfaceProvider<PCIeDeviceIntf>& provider, uint8_t deviceIndex, uint8_t functionId) : - NsmSensor(provider), - NsmInterfaceContainer(provider), deviceIndex(deviceIndex), - functionId(functionId) + NsmSensor(provider), NsmInterfaceContainer(provider), + deviceIndex(deviceIndex), functionId(functionId) {} NsmPCIeFunction::NsmPCIeFunction( const NsmInterfaceProvider<PCIeDeviceIntf>& provider, uint8_t functionId, uint8_t multiPortType, uint8_t multiPortIndex, uint8_t multiPortUpstreamPortNumber) : - NsmSensor(provider), - NsmInterfaceContainer(provider), functionId(functionId), - isMultiPciePortEnabled(true), multiPortType(multiPortType), - multiPortIndex(multiPortIndex), + NsmSensor(provider), NsmInterfaceContainer(provider), + functionId(functionId), isMultiPciePortEnabled(true), + multiPortType(multiPortType), multiPortIndex(multiPortIndex), multiPortUpstreamPortNumber(multiPortUpstreamPortNumber) {}
diff --git a/nsmd/nsmChassis/nsmPCIeLTSSMState.cpp b/nsmd/nsmChassis/nsmPCIeLTSSMState.cpp index 896e585..af5bc10 100644 --- a/nsmd/nsmChassis/nsmPCIeLTSSMState.cpp +++ b/nsmd/nsmChassis/nsmPCIeLTSSMState.cpp
@@ -26,8 +26,8 @@ NsmPCIeLTSSMState::NsmPCIeLTSSMState( const NsmInterfaceProvider<LTSSMStateIntf>& provider, uint8_t deviceIndex) : - NsmSensor(provider), - NsmInterfaceContainer(provider), deviceIndex(deviceIndex) + NsmSensor(provider), NsmInterfaceContainer(provider), + deviceIndex(deviceIndex) {} std::optional<Request> NsmPCIeLTSSMState::genRequestMsg(eid_t eid,
diff --git a/nsmd/nsmChassis/nsmPCIeRetimer.cpp b/nsmd/nsmChassis/nsmPCIeRetimer.cpp index bf89ddc..66bf20b 100644 --- a/nsmd/nsmChassis/nsmPCIeRetimer.cpp +++ b/nsmd/nsmChassis/nsmPCIeRetimer.cpp
@@ -30,8 +30,7 @@ NsmPCIeRetimerChassis::NsmPCIeRetimerChassis( sdbusplus::bus::bus& bus, const std::string& name, const std::vector<utils::Association>& associations, - const std::string& type) : - NsmObject(name, type) + const std::string& type) : NsmObject(name, type) { auto pcieRetimerChaasisBasePath = std::string(chassisInventoryBasePath) + "/" + name;
diff --git a/nsmd/nsmChassis/nsmPCIeSlot.cpp b/nsmd/nsmChassis/nsmPCIeSlot.cpp index 6739598..faafc57 100644 --- a/nsmd/nsmChassis/nsmPCIeSlot.cpp +++ b/nsmd/nsmChassis/nsmPCIeSlot.cpp
@@ -26,8 +26,8 @@ NsmPCIeSlot::NsmPCIeSlot(const NsmInterfaceProvider<PCIeSlotIntf>& provider, uint8_t deviceIndex) : - NsmSensor(provider), - NsmInterfaceContainer(provider), deviceIndex(deviceIndex) + NsmSensor(provider), NsmInterfaceContainer(provider), + deviceIndex(deviceIndex) {} std::optional<Request> NsmPCIeSlot::genRequestMsg(eid_t eid, uint8_t instanceId)
diff --git a/nsmd/nsmChassis/nsmPowerControl.cpp b/nsmd/nsmChassis/nsmPowerControl.cpp index 640e62b..e7658b3 100644 --- a/nsmd/nsmChassis/nsmPowerControl.cpp +++ b/nsmd/nsmChassis/nsmPowerControl.cpp
@@ -34,8 +34,8 @@ sdbusplus::bus::bus& bus, const std::string& name, const std::vector<utils::Association>& associations, std::string& type, const std::string& path, const std::string& physicalContext) : - NsmObject(name, type), - PowerCapIntf(bus, path.c_str()), ClearPowerCapIntf(bus, path.c_str()) + NsmObject(name, type), PowerCapIntf(bus, path.c_str()), + ClearPowerCapIntf(bus, path.c_str()) { decoratorAreaIntf = std::make_unique<DecoratorAreaIntf>(bus, path.c_str()); decoratorAreaIntf->physicalContext(
diff --git a/nsmd/nsmChassis/nsmPowerSubSystem.cpp b/nsmd/nsmChassis/nsmPowerSubSystem.cpp index 48d1e0c..67d6b1b 100644 --- a/nsmd/nsmChassis/nsmPowerSubSystem.cpp +++ b/nsmd/nsmChassis/nsmPowerSubSystem.cpp
@@ -31,8 +31,7 @@ NsmPowerPowerSupply::NsmPowerPowerSupply( sdbusplus::bus::bus& bus, std::string& name, const std::vector<utils::Association>& associations, std::string& type, - std::string& path, std::string& powerSupplyType) : - NsmObject(name, type) + std::string& path, std::string& powerSupplyType) : NsmObject(name, type) { // add all interfaces associationDefinitionsInft =
diff --git a/nsmd/nsmChassis/nsmPowerSupplyStatus.cpp b/nsmd/nsmChassis/nsmPowerSupplyStatus.cpp index f02b825..d11833c 100644 --- a/nsmd/nsmChassis/nsmPowerSupplyStatus.cpp +++ b/nsmd/nsmChassis/nsmPowerSupplyStatus.cpp
@@ -26,8 +26,8 @@ NsmPowerSupplyStatus::NsmPowerSupplyStatus( const NsmInterfaceProvider<PowerStateIntf>& provider, uint8_t gpuInstanceId) : - NsmGroupSensor(provider), - NsmInterfaceContainer(provider), gpuInstanceId(gpuInstanceId) + NsmGroupSensor(provider), NsmInterfaceContainer(provider), + gpuInstanceId(gpuInstanceId) {} std::optional<Request> NsmPowerSupplyStatus::genRequestMsg(eid_t eid,
diff --git a/nsmd/nsmChassis/nsmProcessorModulePowerControl.cpp b/nsmd/nsmChassis/nsmProcessorModulePowerControl.cpp index 0dd3696..0335b10 100644 --- a/nsmd/nsmChassis/nsmProcessorModulePowerControl.cpp +++ b/nsmd/nsmChassis/nsmProcessorModulePowerControl.cpp
@@ -47,9 +47,8 @@ const std::string& path, const std::vector<std::tuple<std::string, std::string, std::string>>& associations_list) : - NsmSensor(name, type), - ClearPowerCapAsyncIntf(bus, path.c_str()), powerCapIntf(powerCapIntf), - clearPowerCapIntf(clearPowerCapIntf), path(path) + NsmSensor(name, type), ClearPowerCapAsyncIntf(bus, path.c_str()), + powerCapIntf(powerCapIntf), clearPowerCapIntf(clearPowerCapIntf), path(path) { associationDefinitionsIntf = std::make_unique<AssociationDefinitionsInft>(bus, path.c_str()); @@ -225,8 +224,7 @@ NsmModulePowerLimit::NsmModulePowerLimit( std::string& name, std::string& type, uint8_t propertyId, std::shared_ptr<PowerCapIntf> powerCapIntf) : - NsmObject(name, type), - propertyId(propertyId), powerCapIntf(powerCapIntf) + NsmObject(name, type), propertyId(propertyId), powerCapIntf(powerCapIntf) { switch (propertyId) { @@ -313,8 +311,7 @@ NsmDefaultModulePowerLimit::NsmDefaultModulePowerLimit( const std::string& name, const std::string& type, std::shared_ptr<NsmClearPowerCapIntf> clearPowerCapIntf) : - NsmObject(name, type), - clearPowerCapIntf(clearPowerCapIntf) + NsmObject(name, type), clearPowerCapIntf(clearPowerCapIntf) { lg2::info("NsmDefaultModulePowerLimit: create sensor:{NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmChassis/nsmSecurityRBP.cpp b/nsmd/nsmChassis/nsmSecurityRBP.cpp index c05e734..25ca801 100644 --- a/nsmd/nsmChassis/nsmSecurityRBP.cpp +++ b/nsmd/nsmChassis/nsmSecurityRBP.cpp
@@ -30,8 +30,8 @@ SecurityConfiguration::SecurityConfiguration( sdbusplus::bus::bus& bus, const std::string& objPath, const uuid_t& uuidIn, std::shared_ptr<ProgressIntf> progressIntfIn, NsmSensor& nsmSensor) : - SecurityConfigIntf(bus, objPath.c_str()), - uuid(uuidIn), progressIntf(progressIntfIn), nsmSensor(nsmSensor) + SecurityConfigIntf(bus, objPath.c_str()), uuid(uuidIn), + progressIntf(progressIntfIn), nsmSensor(nsmSensor) {} void SecurityConfiguration::updateState( @@ -108,8 +108,7 @@ } if (requestType == ENABLE_IRREVERSIBLE_CFG) { - struct nsm_firmware_irreversible_config_request_2_resp cfg_2_resp - {}; + struct nsm_firmware_irreversible_config_request_2_resp cfg_2_resp{}; rc = decode_nsm_firmware_irreversible_config_request_2_resp( responseMsg.get(), responseLen, &cc, &reasonCode, &cfg_2_resp); @@ -179,8 +178,7 @@ NsmSecurityCfgObject::NsmSecurityCfgObject( sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, const uuid_t& uuid, std::shared_ptr<ProgressIntf> progressIntfIn) : - NsmSensor(name, type), - objectPath(getPath(name)) + NsmSensor(name, type), objectPath(getPath(name)) { lg2::info("NsmSecurityCfgObject: create object: {PATH}", "PATH", objectPath.c_str()); @@ -228,9 +226,9 @@ sdbusplus::bus::bus& bus, const std::string& objPath, const uuid_t& uuidIn, uint16_t classificationIn, uint16_t identifierIn, uint8_t indexIn, std::shared_ptr<ProgressIntf> progressIntfIn, NsmSensor& nsmSensor) : - MinSecVersionIntf(bus, objPath.c_str()), - uuid(uuidIn), classification(classificationIn), identifier(identifierIn), - index(indexIn), progressIntf(progressIntfIn), nsmSensor(nsmSensor) + MinSecVersionIntf(bus, objPath.c_str()), uuid(uuidIn), + classification(classificationIn), identifier(identifierIn), index(indexIn), + progressIntf(progressIntfIn), nsmSensor(nsmSensor) { securityVersionObject = std::make_unique<SecurityVersionIntf>(bus, objPath.c_str()); @@ -375,9 +373,8 @@ const std::string& type, const uuid_t& uuid, uint16_t classificationIn, uint16_t identifierIn, uint8_t indexIn, std::shared_ptr<ProgressIntf> progressIntfIn) : - NsmSensor(chassisName, type), - objectPath(getPath(chassisName)), classification(classificationIn), - identifier(identifierIn), index(indexIn) + NsmSensor(chassisName, type), objectPath(getPath(chassisName)), + classification(classificationIn), identifier(identifierIn), index(indexIn) { lg2::info("NsmMinSecVersionObject: create object: {PATH}", "PATH", objectPath.c_str());
diff --git a/nsmd/nsmChassis/nsmWriteProtectedJumper.cpp b/nsmd/nsmChassis/nsmWriteProtectedJumper.cpp index bd7c251..7f78a19 100644 --- a/nsmd/nsmChassis/nsmWriteProtectedJumper.cpp +++ b/nsmd/nsmChassis/nsmWriteProtectedJumper.cpp
@@ -26,8 +26,7 @@ NsmWriteProtectedJumper::NsmWriteProtectedJumper( const NsmInterfaceProvider<SettingsIntf>& provider) : - NsmSensor(provider), - NsmInterfaceContainer(provider) + NsmSensor(provider), NsmInterfaceContainer(provider) {} std::optional<Request> NsmWriteProtectedJumper::genRequestMsg(
diff --git a/nsmd/nsmChassis/test/meson.build b/nsmd/nsmChassis/test/meson.build index c275b8b..6369961 100644 --- a/nsmd/nsmChassis/test/meson.build +++ b/nsmd/nsmChassis/test/meson.build
@@ -102,4 +102,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmd/nsmCommon/meson.build b/nsmd/nsmCommon/meson.build index 2644423..3ccaa51 100644 --- a/nsmd/nsmCommon/meson.build +++ b/nsmd/nsmCommon/meson.build
@@ -1,10 +1,7 @@ -sources += [ - 'nsmCommon/nsmCommon.cpp', - 'nsmCommon/sharedMemCommon.cpp', -] +sources += ['nsmCommon/nsmCommon.cpp', 'nsmCommon/sharedMemCommon.cpp'] nsmd_headers += ['.', '..', 'nsmCommon'] if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmCommon/nsmCommon.cpp b/nsmd/nsmCommon/nsmCommon.cpp index a9bf583..bd44426 100644 --- a/nsmd/nsmCommon/nsmCommon.cpp +++ b/nsmd/nsmCommon/nsmCommon.cpp
@@ -223,8 +223,8 @@ std::string& name, std::string& type, std::shared_ptr<CpuOperatingConfigIntf> cpuConfigIntf, std::string& inventoryObjPath) : - NsmObject(name, type), - cpuOperatingConfigIntf(cpuConfigIntf), inventoryObjPath(inventoryObjPath) + NsmObject(name, type), cpuOperatingConfigIntf(cpuConfigIntf), + inventoryObjPath(inventoryObjPath) { lg2::info("NsmMinGraphicsClockLimit: create sensor:{NAME}", "NAME", name.c_str()); @@ -311,8 +311,8 @@ std::string& name, std::string& type, std::shared_ptr<CpuOperatingConfigIntf> cpuConfigIntf, std::string& inventoryObjPath) : - NsmObject(name, type), - cpuOperatingConfigIntf(cpuConfigIntf), inventoryObjPath(inventoryObjPath) + NsmObject(name, type), cpuOperatingConfigIntf(cpuConfigIntf), + inventoryObjPath(inventoryObjPath) { lg2::info("NsmMaxGraphicsClockLimit: create sensor:{NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmCommon/test/meson.build b/nsmd/nsmCommon/test/meson.build index bc73272..9dcf5ab 100644 --- a/nsmd/nsmCommon/test/meson.build +++ b/nsmd/nsmCommon/test/meson.build
@@ -43,9 +43,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'nsmCommon_test', -] +tests = ['nsmCommon_test'] tests_deps = [ test_src, @@ -75,4 +73,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmd/nsmDbusIfaceOverride/meson.build b/nsmd/nsmDbusIfaceOverride/meson.build index 24d841a..6debdde 100644 --- a/nsmd/nsmDbusIfaceOverride/meson.build +++ b/nsmd/nsmDbusIfaceOverride/meson.build
@@ -1,4 +1,6 @@ -sources += ['nsmDbusIfaceOverride/nsmAssetIntf.cpp', - 'nsmDbusIfaceOverride/nsmMNNVLinkTopologyIntf.cpp'] +sources += [ + 'nsmDbusIfaceOverride/nsmAssetIntf.cpp', + 'nsmDbusIfaceOverride/nsmMNNVLinkTopologyIntf.cpp', +] -nsmd_headers += ['.', '..', 'nsmDbusIfaceOverride'] \ No newline at end of file +nsmd_headers += ['.', '..', 'nsmDbusIfaceOverride']
diff --git a/nsmd/nsmDbusIfaceOverride/nsmActivateErrorInjectAsyncIntf.hpp b/nsmd/nsmDbusIfaceOverride/nsmActivateErrorInjectAsyncIntf.hpp index acde439..2adc687 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmActivateErrorInjectAsyncIntf.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmActivateErrorInjectAsyncIntf.hpp
@@ -43,8 +43,7 @@ NsmActivateErrorInjectionPayloadIntf(sdbusplus::bus::bus& bus, const char* path, std::shared_ptr<NsmDevice> device) : - ActivateErrorInjectionPayloadIntf(bus, path), - device(device) + ActivateErrorInjectionPayloadIntf(bus, path), device(device) {} requester::Coroutine doActivateErrorInjectionPayload(
diff --git a/nsmd/nsmDbusIfaceOverride/nsmClearPowerCapIface.hpp b/nsmd/nsmDbusIfaceOverride/nsmClearPowerCapIface.hpp index 51a4e98..c971f44 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmClearPowerCapIface.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmClearPowerCapIface.hpp
@@ -61,9 +61,8 @@ std::shared_ptr<NsmDevice> device, std::shared_ptr<NsmPowerCapIntf> powerCapIntf, std::shared_ptr<ClearPowerCapIntf> clearPowerCapIntf) : - ClearPowerCapAsyncIntf(bus, path), - device(device), powerCapIntf(powerCapIntf), - clearPowerCapIntf(clearPowerCapIntf) + ClearPowerCapAsyncIntf(bus, path), device(device), + powerCapIntf(powerCapIntf), clearPowerCapIntf(clearPowerCapIntf) {} requester::Coroutine getPowerCapFromDevice()
diff --git a/nsmd/nsmDbusIfaceOverride/nsmPowerCapIface.hpp b/nsmd/nsmDbusIfaceOverride/nsmPowerCapIface.hpp index 402f882..d4aaaba 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmPowerCapIface.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmPowerCapIface.hpp
@@ -42,8 +42,7 @@ NsmPowerCapIntf(sdbusplus::bus::bus& bus, const char* path, std::string& name, const std::vector<std::string>& parents, std::shared_ptr<NsmDevice> device) : - PowerCapIntf(bus, path), - name(name), parents(parents), device(device) + PowerCapIntf(bus, path), name(name), parents(parents), device(device) {} requester::Coroutine getPowerCapFromDevice()
diff --git a/nsmd/nsmDbusIfaceOverride/nsmPowerSmoothingFeatureIntf.hpp b/nsmd/nsmDbusIfaceOverride/nsmPowerSmoothingFeatureIntf.hpp index 9484f8d..8c3b941 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmPowerSmoothingFeatureIntf.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmPowerSmoothingFeatureIntf.hpp
@@ -37,8 +37,8 @@ OemPowerSmoothingFeatIntf(sdbusplus::bus::bus& bus, const std::string& inventoryObjPath, std::shared_ptr<NsmDevice> device) : - PowerSmoothingIntf(bus, (inventoryObjPath).c_str()), - device(device), inventoryObjPath(inventoryObjPath) + PowerSmoothingIntf(bus, (inventoryObjPath).c_str()), device(device), + inventoryObjPath(inventoryObjPath) {} std::string getInventoryObjPath()
diff --git a/nsmd/nsmDbusIfaceOverride/nsmResetEdppAsyncIface.hpp b/nsmd/nsmDbusIfaceOverride/nsmResetEdppAsyncIface.hpp index 72384d4..8528f9a 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmResetEdppAsyncIface.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmResetEdppAsyncIface.hpp
@@ -42,8 +42,7 @@ public: NsmResetEdppAsyncIntf(sdbusplus::bus::bus& bus, const char* path, std::shared_ptr<NsmDevice> device) : - ResetEdppAsyncIntf(bus, path), - device(device){}; + ResetEdppAsyncIntf(bus, path), device(device) {}; requester::Coroutine clearSetPoint(AsyncOperationStatusType* status) {
diff --git a/nsmd/nsmDbusIfaceOverride/nsmResetIface.hpp b/nsmd/nsmDbusIfaceOverride/nsmResetIface.hpp index f4890b1..0bf7231 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmResetIface.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmResetIface.hpp
@@ -46,8 +46,7 @@ public: NsmResetAsyncIntf(sdbusplus::bus::bus& bus, const char* path, std::shared_ptr<NsmDevice> device, uint8_t deviceIndex) : - ResetAsyncIntf(bus, path), - device(device), deviceIndex(deviceIndex) + ResetAsyncIntf(bus, path), device(device), deviceIndex(deviceIndex) {} requester::Coroutine assertFundamentalReset(uint8_t action) @@ -163,8 +162,7 @@ public: NsmNetworkDeviceResetAsyncIntf(sdbusplus::bus::bus& bus, const char* path, std::shared_ptr<NsmDevice> device) : - ResetDeviceAsyncIntf(bus, path), - device(device) + ResetDeviceAsyncIntf(bus, path), device(device) {} requester::Coroutine resetOnDevice(AsyncOperationStatusType* status)
diff --git a/nsmd/nsmDbusIfaceOverride/nsmWorkloadPowerProfileInfoIface.hpp b/nsmd/nsmDbusIfaceOverride/nsmWorkloadPowerProfileInfoIface.hpp index 3826c2b..793edbb 100644 --- a/nsmd/nsmDbusIfaceOverride/nsmWorkloadPowerProfileInfoIface.hpp +++ b/nsmd/nsmDbusIfaceOverride/nsmWorkloadPowerProfileInfoIface.hpp
@@ -36,8 +36,8 @@ public: OemProfileInfoIntf(sdbusplus::bus::bus& bus, const std::string& path, std::shared_ptr<NsmDevice> device) : - ProfileInfoIntf(bus, path.c_str()), - device(device), inventoryObjPath(path) + ProfileInfoIntf(bus, path.c_str()), device(device), + inventoryObjPath(path) {} };
diff --git a/nsmd/nsmDebugToken/meson.build b/nsmd/nsmDebugToken/meson.build index 285e792..ec88a9f 100644 --- a/nsmd/nsmDebugToken/meson.build +++ b/nsmd/nsmDebugToken/meson.build
@@ -1,5 +1,3 @@ -sources += [ - 'nsmDebugToken/nsmDebugToken.cpp', -] +sources += ['nsmDebugToken/nsmDebugToken.cpp'] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmDeviceInventory/meson.build b/nsmd/nsmDeviceInventory/meson.build index 071a127..78009ff 100644 --- a/nsmd/nsmDeviceInventory/meson.build +++ b/nsmd/nsmDeviceInventory/meson.build
@@ -5,4 +5,4 @@ 'nsmDeviceInventory/nsmSwitch.cpp', ] -nsmd_headers += ['.', '..', 'nsmDebugToken', 'nsmDumpCollection'] \ No newline at end of file +nsmd_headers += ['.', '..', 'nsmDebugToken', 'nsmDumpCollection']
diff --git a/nsmd/nsmDeviceInventory/nsmPCIeRetimerSwitchDI.cpp b/nsmd/nsmDeviceInventory/nsmPCIeRetimerSwitchDI.cpp index bf02012..13acde7 100644 --- a/nsmd/nsmDeviceInventory/nsmPCIeRetimerSwitchDI.cpp +++ b/nsmd/nsmDeviceInventory/nsmPCIeRetimerSwitchDI.cpp
@@ -14,8 +14,7 @@ sdbusplus::bus::bus& bus, const std::string& name, const std::vector<utils::Association>& associations, const std::string& type, std::string& inventoryObjPath, uint8_t deviceIdx) : - NsmObject(name, type), - deviceIndex(deviceIdx) + NsmObject(name, type), deviceIndex(deviceIdx) { auto objPath = inventoryObjPath + name; lg2::debug("NsmPCIeRetimerSwitchDI: {NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmDeviceInventory/nsmSwitch.cpp b/nsmd/nsmDeviceInventory/nsmSwitch.cpp index f2ae862..eed2389 100644 --- a/nsmd/nsmDeviceInventory/nsmSwitch.cpp +++ b/nsmd/nsmDeviceInventory/nsmSwitch.cpp
@@ -374,8 +374,7 @@ NsmSwitchIsolationMode::NsmSwitchIsolationMode( const std::string& name, const std::string& type, std::shared_ptr<SwitchIsolationIntf> switchIsolationIntf) : - NsmSensor(name, type), - switchIsolationIntf(switchIsolationIntf) + NsmSensor(name, type), switchIsolationIntf(switchIsolationIntf) {} std::optional<std::vector<uint8_t>>
diff --git a/nsmd/nsmDumpCollection/meson.build b/nsmd/nsmDumpCollection/meson.build index dcd4846..b17582a 100644 --- a/nsmd/nsmDumpCollection/meson.build +++ b/nsmd/nsmDumpCollection/meson.build
@@ -4,4 +4,4 @@ 'nsmDumpCollection/nsmLogInfo.cpp', ] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmDumpCollection/nsmEraseTrace.cpp b/nsmd/nsmDumpCollection/nsmEraseTrace.cpp index 5f23958..3af6c25 100644 --- a/nsmd/nsmDumpCollection/nsmEraseTrace.cpp +++ b/nsmd/nsmDumpCollection/nsmEraseTrace.cpp
@@ -38,8 +38,8 @@ const std::string& inventoryPath, const std::string& type, const uuid_t& uuid) : - NsmObject(name, type), - EraseIntf(bus, (inventoryPath + name).c_str()), uuid(uuid) + NsmObject(name, type), EraseIntf(bus, (inventoryPath + name).c_str()), + uuid(uuid) { lg2::debug("NsmEraseTraceObject: {NAME}", "NAME", name.c_str()); objPath = inventoryPath + name;
diff --git a/nsmd/nsmDumpCollection/nsmLogInfo.cpp b/nsmd/nsmDumpCollection/nsmLogInfo.cpp index 776d5c2..b875a2a 100644 --- a/nsmd/nsmDumpCollection/nsmLogInfo.cpp +++ b/nsmd/nsmDumpCollection/nsmLogInfo.cpp
@@ -37,8 +37,8 @@ const std::string& inventoryPath, const std::string& type, const uuid_t& uuid) : - NsmObject(name, type), - LogInfoIntf(bus, (inventoryPath + name).c_str()), uuid(uuid) + NsmObject(name, type), LogInfoIntf(bus, (inventoryPath + name).c_str()), + uuid(uuid) { buffer.reserve(NSM_LOG_INFO_BUFFER_SIZE); lg2::debug("Created NsmLogInfoObject: {NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmEvent/meson.build b/nsmd/nsmEvent/meson.build index 1894944..399bead 100644 --- a/nsmd/nsmEvent/meson.build +++ b/nsmd/nsmEvent/meson.build
@@ -12,4 +12,4 @@ if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmEvent/nsmFabricManagerStateEvent.cpp b/nsmd/nsmEvent/nsmFabricManagerStateEvent.cpp index ae86f2c..ca26845 100644 --- a/nsmd/nsmEvent/nsmFabricManagerStateEvent.cpp +++ b/nsmd/nsmEvent/nsmFabricManagerStateEvent.cpp
@@ -34,8 +34,8 @@ std::shared_ptr<OperaStatusIntf> opStateIntf, std::shared_ptr<NsmAggregateFabricManagerState> nsmAggregateFabricManagerState) : - NsmEvent(name, type), - fabricManagerIntf(fabricMgrIntf), operationalStatusIntf(opStateIntf), + NsmEvent(name, type), fabricManagerIntf(fabricMgrIntf), + operationalStatusIntf(opStateIntf), nsmAggregateFabricManagerState(nsmAggregateFabricManagerState) { lg2::debug("NsmFabricManagerStateEvent: Name {NAME}.", "NAME", name);
diff --git a/nsmd/nsmEvent/nsmLongRunningEvent.cpp b/nsmd/nsmEvent/nsmLongRunningEvent.cpp index d26eab0..3240107 100644 --- a/nsmd/nsmEvent/nsmLongRunningEvent.cpp +++ b/nsmd/nsmEvent/nsmLongRunningEvent.cpp
@@ -27,8 +27,8 @@ NsmLongRunningEvent::NsmLongRunningEvent(const std::string& name, const std::string& type, bool isLongRunning) : - NsmEvent(name, type + "_LongRunningEvent"), - isLongRunning(isLongRunning), timer(RESPONSE_TIME_OUT_LONG_RUNNING) + NsmEvent(name, type + "_LongRunningEvent"), isLongRunning(isLongRunning), + timer(RESPONSE_TIME_OUT_LONG_RUNNING) {} bool NsmLongRunningEvent::initAcceptInstanceId(uint8_t instanceId, uint8_t cc,
diff --git a/nsmd/nsmEvent/nsmRediscoveryEvent.cpp b/nsmd/nsmEvent/nsmRediscoveryEvent.cpp index bc477f1..5853ea4 100644 --- a/nsmd/nsmEvent/nsmRediscoveryEvent.cpp +++ b/nsmd/nsmEvent/nsmRediscoveryEvent.cpp
@@ -31,8 +31,7 @@ NsmRediscoveryEvent::NsmRediscoveryEvent(const std::string& name, const std::string& type, const NsmEventInfo info) : - NsmEvent(name, type), - info(info) + NsmEvent(name, type), info(info) { if (!info.messageArgs.empty()) {
diff --git a/nsmd/nsmEvent/nsmResetRequiredEvent.cpp b/nsmd/nsmEvent/nsmResetRequiredEvent.cpp index f36795b..8524f14 100644 --- a/nsmd/nsmEvent/nsmResetRequiredEvent.cpp +++ b/nsmd/nsmEvent/nsmResetRequiredEvent.cpp
@@ -32,8 +32,7 @@ NsmResetRequiredEvent::NsmResetRequiredEvent(const std::string& name, const std::string& type, const NsmEventInfo info) : - NsmEvent(name, type), - info(info) + NsmEvent(name, type), info(info) { if (!info.messageArgs.empty()) {
diff --git a/nsmd/nsmEvent/nsmThresholdEvent.cpp b/nsmd/nsmEvent/nsmThresholdEvent.cpp index f142e1a..ee203a6 100644 --- a/nsmd/nsmEvent/nsmThresholdEvent.cpp +++ b/nsmd/nsmEvent/nsmThresholdEvent.cpp
@@ -32,8 +32,7 @@ NsmThresholdEvent::NsmThresholdEvent(const std::string& name, const std::string& type, const NsmEventInfo info) : - NsmEvent(name, type), - info(info) + NsmEvent(name, type), info(info) { if (info.messageId != "ResourceEvent.1.0.ResourceErrorsDetected") {
diff --git a/nsmd/nsmEvent/nsmXIDEvent.cpp b/nsmd/nsmEvent/nsmXIDEvent.cpp index 88b6ca7..6cf3576 100644 --- a/nsmd/nsmEvent/nsmXIDEvent.cpp +++ b/nsmd/nsmEvent/nsmXIDEvent.cpp
@@ -32,8 +32,7 @@ NsmXIDEvent::NsmXIDEvent(const std::string& name, const std::string& type, const NsmEventInfo info) : - NsmEvent(name, type), - info(info) + NsmEvent(name, type), info(info) {} int NsmXIDEvent::handle(eid_t eid, NsmType /*type*/, NsmEventId /*eventId*/,
diff --git a/nsmd/nsmEvent/test/meson.build b/nsmd/nsmEvent/test/meson.build index 675e242..519f74b 100644 --- a/nsmd/nsmEvent/test/meson.build +++ b/nsmd/nsmEvent/test/meson.build
@@ -42,9 +42,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'nsmEvent_test', -] +tests = ['nsmEvent_test'] tests_deps = [ test_src, @@ -75,4 +73,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmd/nsmEventConfig/meson.build b/nsmd/nsmEventConfig/meson.build index 132b6a9..dd6dc25 100644 --- a/nsmd/nsmEventConfig/meson.build +++ b/nsmd/nsmEventConfig/meson.build
@@ -3,4 +3,4 @@ 'nsmEventConfig/nsmEventSetting.cpp', ] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmEventConfig/nsmEventConfig.cpp b/nsmd/nsmEventConfig/nsmEventConfig.cpp index 26bee19..683fc0c 100644 --- a/nsmd/nsmEventConfig/nsmEventConfig.cpp +++ b/nsmd/nsmEventConfig/nsmEventConfig.cpp
@@ -33,8 +33,8 @@ uint8_t messageType, std::vector<uint64_t>& srcEventIds, std::vector<uint64_t>& ackEventIds) : - NsmObject(name, type), - messageType(messageType), srcEventMask(8), ackEventMask(8) + NsmObject(name, type), messageType(messageType), srcEventMask(8), + ackEventMask(8) { // convert id list to bitfield convertIdsToMask(srcEventIds, srcEventMask); @@ -174,8 +174,8 @@ const std::string& name, const std::string& type, uint8_t messageType, std::vector<uint64_t>& srcEventIds, std::shared_ptr<NsmEventConfig> eventConfig) : - NsmObject(name, type), - messageType(messageType), srcEventMask(8), eventConfig(eventConfig) + NsmObject(name, type), messageType(messageType), srcEventMask(8), + eventConfig(eventConfig) { // convert id list to bitfield convertIdsToMask(srcEventIds, srcEventMask);
diff --git a/nsmd/nsmEventConfig/nsmEventSetting.cpp b/nsmd/nsmEventConfig/nsmEventSetting.cpp index 901f62e..144be35 100644 --- a/nsmd/nsmEventConfig/nsmEventSetting.cpp +++ b/nsmd/nsmEventConfig/nsmEventSetting.cpp
@@ -33,8 +33,8 @@ const std::string& type, uint8_t eventGenerationSetting, std::shared_ptr<NsmDevice> nsmDevice) : - NsmObject(name, type), - eventGenerationSetting(eventGenerationSetting), nsmDevice(nsmDevice) + NsmObject(name, type), eventGenerationSetting(eventGenerationSetting), + nsmDevice(nsmDevice) {} requester::Coroutine NsmEventSetting::update(SensorManager& manager, eid_t eid) @@ -99,8 +99,7 @@ NsmGetEventSetting::NsmGetEventSetting( const std::string& name, const std::string& type, std::shared_ptr<NsmEventSetting> eventSetting) : - NsmObject(name, type), - eventSetting(eventSetting) + NsmObject(name, type), eventSetting(eventSetting) {} requester::Coroutine NsmGetEventSetting::update(SensorManager& manager,
diff --git a/nsmd/nsmFirmwareUtils/meson.build b/nsmd/nsmFirmwareUtils/meson.build index 6ad747a..f854a82 100644 --- a/nsmd/nsmFirmwareUtils/meson.build +++ b/nsmd/nsmFirmwareUtils/meson.build
@@ -3,4 +3,4 @@ 'nsmFirmwareUtils/nsmKeyMgmt.cpp', ] -nsmd_headers += [ '.', '..' ] +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmFirmwareUtils/nsmFirmwareUtilsCommon.hpp b/nsmd/nsmFirmwareUtils/nsmFirmwareUtilsCommon.hpp index 9f0764e..5eb30a1 100644 --- a/nsmd/nsmFirmwareUtils/nsmFirmwareUtilsCommon.hpp +++ b/nsmd/nsmFirmwareUtils/nsmFirmwareUtilsCommon.hpp
@@ -69,8 +69,8 @@ } } // else: At present there are no specific errors for other cc - return {cc, - "Unknown Error: cc=" + std::to_string(cc) + " reason_code=" + std::to_string(reasonCode)}; + return {cc, "Unknown Error: cc=" + std::to_string(cc) + + " reason_code=" + std::to_string(reasonCode)}; } } // namespace nsm
diff --git a/nsmd/nsmFwSwInventory/meson.build b/nsmd/nsmFwSwInventory/meson.build index 89e1525..dc0c5d6 100644 --- a/nsmd/nsmFwSwInventory/meson.build +++ b/nsmd/nsmFwSwInventory/meson.build
@@ -9,4 +9,4 @@ if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmFwSwInventory/nsmWriteProtectedControl.cpp b/nsmd/nsmFwSwInventory/nsmWriteProtectedControl.cpp index a09a8c4..ddbed76 100644 --- a/nsmd/nsmFwSwInventory/nsmWriteProtectedControl.cpp +++ b/nsmd/nsmFwSwInventory/nsmWriteProtectedControl.cpp
@@ -27,8 +27,8 @@ NsmWriteProtectedControl::NsmWriteProtectedControl( const NsmInterfaceProvider<SettingsIntf>& provider, const diagnostics_enable_disable_wp_data_index dataIndex) : - NsmGroupSensor(provider), - NsmInterfaceContainer(provider), dataIndex(dataIndex) + NsmGroupSensor(provider), NsmInterfaceContainer(provider), + dataIndex(dataIndex) {} std::optional<Request> NsmWriteProtectedControl::genRequestMsg(eid_t eid,
diff --git a/nsmd/nsmFwSwInventory/test/meson.build b/nsmd/nsmFwSwInventory/test/meson.build index 4708abb..56a2838 100644 --- a/nsmd/nsmFwSwInventory/test/meson.build +++ b/nsmd/nsmFwSwInventory/test/meson.build
@@ -47,10 +47,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'NVLinkManagementNICSWInventory_test', - 'nsmFirmwareInventory_test', -] +tests = ['NVLinkManagementNICSWInventory_test', 'nsmFirmwareInventory_test'] tests_deps = [ test_src, @@ -78,4 +75,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmd/nsmGPM/meson.build b/nsmd/nsmGPM/meson.build index 0864e57..310477e 100644 --- a/nsmd/nsmGPM/meson.build +++ b/nsmd/nsmGPM/meson.build
@@ -1,10 +1,7 @@ -sources += [ - 'nsmGPM/nsmGpmOem.cpp', - 'nsmGPM/nsmGpmOemFactory.cpp', -] +sources += ['nsmGPM/nsmGpmOem.cpp', 'nsmGPM/nsmGpmOemFactory.cpp'] nsmd_headers += ['.', '..'] if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmGPM/nsmGpmOem.cpp b/nsmd/nsmGPM/nsmGpmOem.cpp index 8ef60fa..6608282 100644 --- a/nsmd/nsmGPM/nsmGpmOem.cpp +++ b/nsmd/nsmGPM/nsmGpmOem.cpp
@@ -36,8 +36,7 @@ public: GPMMetricUpdator(GPMMetricsIntf* intf, updateGPMMetricFunc updateFunc, const std::string& objPath) : - intf(intf), - updateFunc(updateFunc), objPath(objPath){}; + intf(intf), updateFunc(updateFunc), objPath(objPath) {}; void updateMetric([[maybe_unused]] const std::string& name, const double val) override @@ -72,8 +71,7 @@ NVLinkMetricUpdator(NVLinkMetricsIntf* intf, updateNVLinkMetricFunc updateFunc, const std::string& objPath) : - intf(intf), - updateFunc(updateFunc), objPath(objPath){}; + intf(intf), updateFunc(updateFunc), objPath(objPath) {}; void updateMetric([[maybe_unused]] const std::string& name, const double val) override @@ -105,8 +103,7 @@ DRAMUsageMetricUpdator::DRAMUsageMetricUpdator(std::shared_ptr<DimmIntf> intf, const std::string& objPath) : - intf(intf), - objPath(objPath) + intf(intf), objPath(objPath) {} void DRAMUsageMetricUpdator::updateMetric( @@ -162,8 +159,7 @@ const std::string& objPath, const std::shared_ptr<GPMMetricsIntf>& gpmIntf, updatePerInstanceGPMMetricFunc updateFunc) : - name(name), - objPath(objPath), gpmIntf(gpmIntf), updateFunc(updateFunc) + name(name), objPath(objPath), gpmIntf(gpmIntf), updateFunc(updateFunc) {} void updateMetric(const std::vector<double>& metrics) override { @@ -199,8 +195,7 @@ const std::string& name, const std::vector<NVLinkMetricsUpdatorInfo>& updatorInfos, const updateNVLinkMetricFunc updateFunc) : - name(name), - updatorInfos(updatorInfos), updateFunc(updateFunc) + name(name), updatorInfos(updatorInfos), updateFunc(updateFunc) {} void updateMetric(const std::vector<double>& metrics) override @@ -297,10 +292,10 @@ uint8_t computeInstance, const std::vector<uint8_t>& metricsBitfield, std::shared_ptr<GPMMetricsIntf> gpmIntf, std::shared_ptr<NVLinkMetricsIntf> nvlinkMetricsIntf) : - NsmSensorAggregator(name, type), - retrievalSource(retrievalSource), gpuInstance(gpuInstance), - computeInstance(computeInstance), metricsBitfield(metricsBitfield), - objPath(objpath), gpmIntf(gpmIntf), nvlinkMetricsIntf(nvlinkMetricsIntf) + NsmSensorAggregator(name, type), retrievalSource(retrievalSource), + gpuInstance(gpuInstance), computeInstance(computeInstance), + metricsBitfield(metricsBitfield), objPath(objpath), gpmIntf(gpmIntf), + nvlinkMetricsIntf(nvlinkMetricsIntf) { metricsTable[0] = { "GraphicsEngineActivityPercent", decodePercentage, @@ -477,10 +472,10 @@ uint8_t gpuInstance, uint8_t computeInstance, uint8_t metricId, const uint32_t instanceBitfield, GPMMetricsUnit unit, std::shared_ptr<MetricPerInstanceUpdator> metricUpdator) : - NsmSensorAggregator(name, type), - retrievalSource(retrievalSource), gpuInstance(gpuInstance), - computeInstance(computeInstance), metricId(metricId), - instanceBitfield(instanceBitfield), metricUpdator(metricUpdator) + NsmSensorAggregator(name, type), retrievalSource(retrievalSource), + gpuInstance(gpuInstance), computeInstance(computeInstance), + metricId(metricId), instanceBitfield(instanceBitfield), + metricUpdator(metricUpdator) { metrics.reserve(32); switch (unit)
diff --git a/nsmd/nsmGPM/test/meson.build b/nsmd/nsmGPM/test/meson.build index 627579f..016c3ee 100644 --- a/nsmd/nsmGPM/test/meson.build +++ b/nsmd/nsmGPM/test/meson.build
@@ -32,11 +32,12 @@ '../../nsmDbusIfaceOverride', ] -test_src = declare_dependency(sources: dep_src_files, include_directories: dep_src_headers) +test_src = declare_dependency( + sources: dep_src_files, + include_directories: dep_src_headers, +) -tests_files = [ - 'nsmGpmOem_test.cpp', -] +tests_files = ['nsmGpmOem_test.cpp'] test( 'nsmGpmOem_test', @@ -59,4 +60,4 @@ ], ), workdir: meson.current_source_dir(), -) \ No newline at end of file +)
diff --git a/nsmd/nsmHistograms/meson.build b/nsmd/nsmHistograms/meson.build index c7c55a3..f599f2b 100644 --- a/nsmd/nsmHistograms/meson.build +++ b/nsmd/nsmHistograms/meson.build
@@ -1,5 +1,3 @@ -sources += [ - 'nsmHistograms/nsmHistogramInfo.cpp', -] +sources += ['nsmHistograms/nsmHistogramInfo.cpp'] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmHistograms/nsmHistogramInfo.cpp b/nsmd/nsmHistograms/nsmHistogramInfo.cpp index 23078ef..454435b 100644 --- a/nsmd/nsmHistograms/nsmHistogramInfo.cpp +++ b/nsmd/nsmHistograms/nsmHistogramInfo.cpp
@@ -214,9 +214,9 @@ std::vector<std::tuple<std::string, std::string, std::string>>& associationsList, uint32_t histogramId, uint16_t parameter) : - NsmSensor(name, type), - formatIntf(formatIntf), bucketInfoIntf(bucketInfoIntf), - histogramId(histogramId), parameter(parameter) + NsmSensor(name, type), formatIntf(formatIntf), + bucketInfoIntf(bucketInfoIntf), histogramId(histogramId), + parameter(parameter) { lg2::debug("NsmHistogramFormat: {NAME}", "NAME", name.c_str()); histogramName = name; @@ -364,9 +364,9 @@ std::shared_ptr<FormatIntf>& formatIntf, std::shared_ptr<BucketInfoIntf>& bucketInfoIntf, uint32_t histogramId, uint16_t parameter) : - NsmSensor(name, type), - formatIntf(formatIntf), bucketInfoIntf(bucketInfoIntf), - histogramId(histogramId), parameter(parameter) + NsmSensor(name, type), formatIntf(formatIntf), + bucketInfoIntf(bucketInfoIntf), histogramId(histogramId), + parameter(parameter) { lg2::debug("NsmHistogramData: {NAME}", "NAME", name.c_str()); histogramName = name;
diff --git a/nsmd/nsmInterface.hpp b/nsmd/nsmInterface.hpp index 312d9ef..97250d9 100644 --- a/nsmd/nsmInterface.hpp +++ b/nsmd/nsmInterface.hpp
@@ -200,8 +200,7 @@ {} NsmInterfaceProvider(const std::string& name, const std::string& type, const Interfaces<IntfType>& interfaces) : - NsmObject(name, type), - NsmInterfaces<IntfType>(interfaces) + NsmObject(name, type), NsmInterfaces<IntfType>(interfaces) {} NsmInterfaceProvider(const std::string& name, const std::string& type, const path& path, std::shared_ptr<IntfType> pdi) :
diff --git a/nsmd/nsmManagers/meson.build b/nsmd/nsmManagers/meson.build index 2c8cc44..df55fe7 100644 --- a/nsmd/nsmManagers/meson.build +++ b/nsmd/nsmManagers/meson.build
@@ -1,5 +1,3 @@ -sources += [ - 'nsmManagers/nsmFabricManager.cpp', -] +sources += ['nsmManagers/nsmFabricManager.cpp'] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmManagers/nsmFabricManager.cpp b/nsmd/nsmManagers/nsmFabricManager.cpp index b3c5608..3429944 100644 --- a/nsmd/nsmManagers/nsmFabricManager.cpp +++ b/nsmd/nsmManagers/nsmFabricManager.cpp
@@ -129,13 +129,10 @@ operationalStatusIntf->state(state); } -NsmFabricManagerState::NsmFabricManagerState(const std::string& name, - const std::string& type, - std::string& inventoryObjPath, - std::string& inventoryObjPathFM, - sdbusplus::bus_t& bus, - std::string& description) : - NsmSensor(name, type) +NsmFabricManagerState::NsmFabricManagerState( + const std::string& name, const std::string& type, + std::string& inventoryObjPath, std::string& inventoryObjPathFM, + sdbusplus::bus_t& bus, std::string& description) : NsmSensor(name, type) { lg2::info("NsmFabricManagerState: {NAME}", "NAME", name.c_str()); objPath = inventoryObjPath + name;
diff --git a/nsmd/nsmMemory/meson.build b/nsmd/nsmMemory/meson.build index be82d2f..4c8b843 100644 --- a/nsmd/nsmMemory/meson.build +++ b/nsmd/nsmMemory/meson.build
@@ -1,9 +1,7 @@ -sources += [ - 'nsmMemory/nsmMemory.cpp', -] +sources += ['nsmMemory/nsmMemory.cpp'] nsmd_headers += ['.', '..'] if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmMemory/nsmMemory.cpp b/nsmd/nsmMemory/nsmMemory.cpp index f3721ca..ab21c50 100644 --- a/nsmd/nsmMemory/nsmMemory.cpp +++ b/nsmd/nsmMemory/nsmMemory.cpp
@@ -20,8 +20,8 @@ NsmMemoryErrorCorrection::NsmMemoryErrorCorrection( std::string& name, std::string& type, std::shared_ptr<DimmIntf> dimmIntf, std::string& correctionType, std::string& inventoryObjPath) : - NsmObject(name, type), - dimmIntf(dimmIntf), inventoryObjPath(inventoryObjPath) + NsmObject(name, type), dimmIntf(dimmIntf), + inventoryObjPath(inventoryObjPath) { dimmIntf->ecc(DimmIntf::convertEccFromString(correctionType)); updateMetricOnSharedMemory(); @@ -45,8 +45,8 @@ std::shared_ptr<DimmIntf> dimmIntf, std::string& memoryType, std::string& inventoryObjPath) : - NsmObject(name, type), - dimmIntf(dimmIntf), inventoryObjPath(inventoryObjPath) + NsmObject(name, type), dimmIntf(dimmIntf), + inventoryObjPath(inventoryObjPath) { dimmIntf->memoryType(DimmIntf::convertDeviceTypeFromString(memoryType)); updateMetricOnSharedMemory(); @@ -70,8 +70,7 @@ std::string& name, std::string& type, std::string& inventoryObjPath) : - NsmObject(name, type), - inventoryObjPath(inventoryObjPath) + NsmObject(name, type), inventoryObjPath(inventoryObjPath) { locationIntf = std::make_unique<LocationIntfMemory>(bus, inventoryObjPath.c_str()); @@ -92,8 +91,7 @@ NsmMemoryAssociation::NsmMemoryAssociation( sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, const std::string& inventoryObjPath, - const std::vector<utils::Association>& associations) : - NsmObject(name, type) + const std::vector<utils::Association>& associations) : NsmObject(name, type) { associationDef = std::make_unique<AssociationDefinitionsIntf>( bus, inventoryObjPath.c_str()); @@ -112,8 +110,7 @@ std::string& name, std::string& type, std::shared_ptr<MemoryRowRemappingIntf> memoryRowRemappingIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmRowRemapIntf: create sensor:{NAME}", "NAME", name.c_str()); @@ -192,8 +189,7 @@ std::string& name, std::string& type, std::shared_ptr<MemoryRowRemappingIntf> memoryRowRemappingIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmRowRemappingCount: create sensor:{NAME}", "NAME", @@ -274,8 +270,8 @@ const std::string& name, const std::string& type, std::shared_ptr<MemoryRowRemappingIntf> rowRemapIntf, const std::string& inventoryObjPath) : - NsmSensor(name, type), - rowRemapIntf(rowRemapIntf), inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), rowRemapIntf(rowRemapIntf), + inventoryObjPath(inventoryObjPath) { lg2::info("NsmRemappingAvailabilityBankCount: create sensor:{NAME}", "NAME", @@ -380,8 +376,7 @@ NsmEccErrorCountsDram::NsmEccErrorCountsDram( std::string& name, std::string& type, std::shared_ptr<EccModeIntfDram> eccIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - eccIntf(eccIntf), inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), eccIntf(eccIntf), inventoryObjPath(inventoryObjPath) { lg2::info("NsmEccErrorCounts: create sensor:{NAME}", "NAME", name.c_str()); @@ -454,8 +449,7 @@ NsmMinMemoryClockLimit::NsmMinMemoryClockLimit( std::string& name, std::string& type, std::shared_ptr<DimmIntf> dimmIntf) : - NsmObject(name, type), - dimmIntf(dimmIntf) + NsmObject(name, type), dimmIntf(dimmIntf) { lg2::info("NsmMinMemoryClockLimit: create sensor:{NAME}", "NAME", name.c_str()); @@ -525,8 +519,7 @@ NsmMaxMemoryClockLimit::NsmMaxMemoryClockLimit( std::string& name, std::string& type, std::shared_ptr<DimmIntf> dimmIntf) : - NsmObject(name, type), - dimmIntf(dimmIntf) + NsmObject(name, type), dimmIntf(dimmIntf) { lg2::info("NsmMaxMemoryClockLimit: create sensor:{NAME}", "NAME", name.c_str()); @@ -598,8 +591,8 @@ const std::string& type, std::shared_ptr<DimmIntf> dimmIntf, std::string inventoryObjPath) : - NsmSensor(name, type), - dimmIntf(dimmIntf), inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), dimmIntf(dimmIntf), + inventoryObjPath(inventoryObjPath) { lg2::info("NsmMemCurrClockFreq: create sensor:{NAME}", "NAME", @@ -669,8 +662,7 @@ NsmMemCapacity::NsmMemCapacity(const std::string& name, const std::string& type, std::shared_ptr<DimmIntf> dimmIntf) : - NsmMemoryCapacity(name, type), - dimmIntf(dimmIntf) + NsmMemoryCapacity(name, type), dimmIntf(dimmIntf) { lg2::info("NsmMemCapacity: create sensor:{NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmMemory/test/meson.build b/nsmd/nsmMemory/test/meson.build index dbf2d1b..90d61fb 100644 --- a/nsmd/nsmMemory/test/meson.build +++ b/nsmd/nsmMemory/test/meson.build
@@ -41,9 +41,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'nsmMemory_test', -] +tests = ['nsmMemory_test'] foreach t : tests test( @@ -68,4 +66,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmd/nsmMsgTypesSensor.hpp b/nsmd/nsmMsgTypesSensor.hpp index 2d4e52d..78307ae 100644 --- a/nsmd/nsmMsgTypesSensor.hpp +++ b/nsmd/nsmMsgTypesSensor.hpp
@@ -24,8 +24,7 @@ public: NsmCommandCodes(const std::string& name, const std::string& type, NsmDevice& nsmDevice, uint8_t messageType) : - NsmObject(name, type), - messageType(messageType), nsmDevice(nsmDevice) + NsmObject(name, type), messageType(messageType), nsmDevice(nsmDevice) {} requester::Coroutine update(SensorManager& manager, eid_t eid) override @@ -96,8 +95,7 @@ public: NsmMsgTypes(const std::string& name, const std::string& type, NsmDevice& nsmDevice) : - NsmObject(name, type), - nsmDevice(nsmDevice) + NsmObject(name, type), nsmDevice(nsmDevice) {} requester::Coroutine update(SensorManager& manager, eid_t eid) override
diff --git a/nsmd/nsmNumericSensor/meson.build b/nsmd/nsmNumericSensor/meson.build index 6dbaca0..9dc5314 100644 --- a/nsmd/nsmNumericSensor/meson.build +++ b/nsmd/nsmNumericSensor/meson.build
@@ -24,4 +24,4 @@ if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmNumericSensor/nsmNumericAggregator.hpp b/nsmd/nsmNumericSensor/nsmNumericAggregator.hpp index 6015f90..df3a126 100644 --- a/nsmd/nsmNumericSensor/nsmNumericAggregator.hpp +++ b/nsmd/nsmNumericSensor/nsmNumericAggregator.hpp
@@ -35,8 +35,7 @@ public: NsmNumericAggregator(const std::string& name, const std::string& type, bool priority) : - NsmSensorAggregator(name, type), - priority(priority){}; + NsmSensorAggregator(name, type), priority(priority) {}; virtual ~NsmNumericAggregator() = default; int addSensor(uint8_t tag,
diff --git a/nsmd/nsmNumericSensor/nsmNumericSensor.cpp b/nsmd/nsmNumericSensor/nsmNumericSensor.cpp index c341c19..e2dcc94 100644 --- a/nsmd/nsmNumericSensor/nsmNumericSensor.cpp +++ b/nsmd/nsmNumericSensor/nsmNumericSensor.cpp
@@ -260,8 +260,7 @@ NsmNumericSensorCompositeChildValue::NsmNumericSensorCompositeChildValue( const std::string& name, const std::string& sensorType, const std::vector<std::string>& parents) : - name(name), - sensorType(sensorType), parents(parents) + name(name), sensorType(sensorType), parents(parents) {} void NsmNumericSensorCompositeChildValue::updateReading(double value,
diff --git a/nsmd/nsmNumericSensor/nsmNumericSensor.hpp b/nsmd/nsmNumericSensor/nsmNumericSensor.hpp index d894200..09751a6 100644 --- a/nsmd/nsmNumericSensor/nsmNumericSensor.hpp +++ b/nsmd/nsmNumericSensor/nsmNumericSensor.hpp
@@ -155,8 +155,7 @@ NsmNumericSensor( const std::string& name, const std::string& type, uint8_t sensorId, std::shared_ptr<NsmNumericSensorValueAggregate> sensorValue) : - NsmSensor(name, type), - sensorId(sensorId), sensorValue(sensorValue){}; + NsmSensor(name, type), sensorId(sensorId), sensorValue(sensorValue) {}; std::shared_ptr<NsmNumericSensorValueAggregate> getSensorValueObject() {
diff --git a/nsmd/nsmNumericSensor/nsmNumericSensorFactory.hpp b/nsmd/nsmNumericSensor/nsmNumericSensorFactory.hpp index 2fd7673..49de72a 100644 --- a/nsmd/nsmNumericSensor/nsmNumericSensorFactory.hpp +++ b/nsmd/nsmNumericSensor/nsmNumericSensorFactory.hpp
@@ -70,7 +70,7 @@ { public: NumericSensorFactory(std::unique_ptr<NumericSensorBuilder> builder) : - builder(std::move(builder)){}; + builder(std::move(builder)) {}; CreationFunction getCreationFunction();
diff --git a/nsmd/nsmNumericSensor/nsmThresholdFactory.cpp b/nsmd/nsmNumericSensor/nsmThresholdFactory.cpp index d8c2d33..f427572 100644 --- a/nsmd/nsmNumericSensor/nsmThresholdFactory.cpp +++ b/nsmd/nsmNumericSensor/nsmThresholdFactory.cpp
@@ -44,9 +44,9 @@ SensorManager& manager, const std::string& interface, const std::string& objPath, std::shared_ptr<NsmNumericSensor> numericSensor, const NumericSensorInfo& info, const uuid_t& uuid) : - manager(manager), - interface(interface), objPath(objPath), numericSensor(numericSensor), - info(info), uuid(uuid), nsmDevice(manager.getNsmDevice(uuid)) + manager(manager), interface(interface), objPath(objPath), + numericSensor(numericSensor), info(info), uuid(uuid), + nsmDevice(manager.getNsmDevice(uuid)) {} requester::Coroutine NsmThresholdFactory::make()
diff --git a/nsmd/nsmNumericSensor/nsmThresholdValue.cpp b/nsmd/nsmNumericSensor/nsmThresholdValue.cpp index cb28647..aba745e 100644 --- a/nsmd/nsmNumericSensor/nsmThresholdValue.cpp +++ b/nsmd/nsmNumericSensor/nsmThresholdValue.cpp
@@ -23,8 +23,7 @@ NsmThresholdValueWarningLow::NsmThresholdValueWarningLow( const std::string& name, const std::string& type, std::shared_ptr<ThresholdWarningIntf> intf) : - NsmThresholdValue(name, type), - intf(intf) + NsmThresholdValue(name, type), intf(intf) {} void NsmThresholdValueWarningLow::updateReading(double value, @@ -36,8 +35,7 @@ NsmThresholdValueWarningHigh::NsmThresholdValueWarningHigh( const std::string& name, const std::string& type, std::shared_ptr<ThresholdWarningIntf> intf) : - NsmThresholdValue(name, type), - intf(intf) + NsmThresholdValue(name, type), intf(intf) {} void NsmThresholdValueWarningHigh::updateReading(double value, @@ -49,8 +47,7 @@ NsmThresholdValueCriticalLow::NsmThresholdValueCriticalLow( const std::string& name, const std::string& type, std::shared_ptr<ThresholdCriticalIntf> intf) : - NsmThresholdValue(name, type), - intf(intf) + NsmThresholdValue(name, type), intf(intf) {} void NsmThresholdValueCriticalLow::updateReading(double value, @@ -62,8 +59,7 @@ NsmThresholdValueCriticalHigh::NsmThresholdValueCriticalHigh( const std::string& name, const std::string& type, std::shared_ptr<ThresholdCriticalIntf> intf) : - NsmThresholdValue(name, type), - intf(intf) + NsmThresholdValue(name, type), intf(intf) {} void NsmThresholdValueCriticalHigh::updateReading(double value, @@ -75,8 +71,7 @@ NsmThresholdValueHardShutdownLow::NsmThresholdValueHardShutdownLow( const std::string& name, const std::string& type, std::shared_ptr<ThresholdHardShutdownIntf> intf) : - NsmThresholdValue(name, type), - intf(intf) + NsmThresholdValue(name, type), intf(intf) {} void NsmThresholdValueHardShutdownLow::updateReading(double value, @@ -88,8 +83,7 @@ NsmThresholdValueHardShutdownHigh::NsmThresholdValueHardShutdownHigh( const std::string& name, const std::string& type, std::shared_ptr<ThresholdHardShutdownIntf> intf) : - NsmThresholdValue(name, type), - intf(intf) + NsmThresholdValue(name, type), intf(intf) {} void NsmThresholdValueHardShutdownHigh::updateReading(double value,
diff --git a/nsmd/nsmNumericSensor/test/meson.build b/nsmd/nsmNumericSensor/test/meson.build index 46f1660..d99453c 100644 --- a/nsmd/nsmNumericSensor/test/meson.build +++ b/nsmd/nsmNumericSensor/test/meson.build
@@ -90,4 +90,4 @@ dependencies: tests_deps, ), workdir: meson.current_source_dir(), -) \ No newline at end of file +)
diff --git a/nsmd/nsmPCIeDevice/meson.build b/nsmd/nsmPCIeDevice/meson.build index a2673f7..6e1786c 100644 --- a/nsmd/nsmPCIeDevice/meson.build +++ b/nsmd/nsmPCIeDevice/meson.build
@@ -1,5 +1,3 @@ -sources += [ - 'nsmPCIeDevice/nsmPCIeRetimerPD.cpp', -] +sources += ['nsmPCIeDevice/nsmPCIeRetimerPD.cpp'] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmPCIeDevice/nsmPCIeRetimerPD.cpp b/nsmd/nsmPCIeDevice/nsmPCIeRetimerPD.cpp index 4013c16..6f30d2f 100644 --- a/nsmd/nsmPCIeDevice/nsmPCIeRetimerPD.cpp +++ b/nsmd/nsmPCIeDevice/nsmPCIeRetimerPD.cpp
@@ -52,8 +52,7 @@ const std::vector<utils::Association>& associations, const std::string& type, const std::string& deviceType, const uint8_t deviceIndex, std::string& inventoryObjPath) : - NsmSensor(name, type), - deviceIndex(deviceIndex) + NsmSensor(name, type), deviceIndex(deviceIndex) { objPath = inventoryObjPath + name; lg2::debug("NsmPCIeDeviceQueryScalarTelemetry: {NAME}", "NAME",
diff --git a/nsmd/nsmPort/meson.build b/nsmd/nsmPort/meson.build index ca79a40..79b2453 100644 --- a/nsmd/nsmPort/meson.build +++ b/nsmd/nsmPort/meson.build
@@ -16,4 +16,4 @@ if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmPort/nsmFpgaPort.cpp b/nsmd/nsmPort/nsmFpgaPort.cpp index fa26963..f2b1167 100644 --- a/nsmd/nsmPort/nsmFpgaPort.cpp +++ b/nsmd/nsmPort/nsmFpgaPort.cpp
@@ -39,8 +39,7 @@ const std::string& portType, const std::string& portProtocol, std::shared_ptr<PortInfoIntf> portInfoIntf) : - NsmObject(name, type), - portInfoIntf(portInfoIntf) + NsmObject(name, type), portInfoIntf(portInfoIntf) { lg2::info("NsmFpgaPortInfo: create sensor:{NAME}", "NAME", name.c_str()); portInfoIntf->type(PortInfoIntf::convertPortTypeFromString(portType));
diff --git a/nsmd/nsmPort/nsmGpuPciePort.cpp b/nsmd/nsmPort/nsmGpuPciePort.cpp index 34ba516..3ab5e39 100644 --- a/nsmd/nsmPort/nsmGpuPciePort.cpp +++ b/nsmd/nsmPort/nsmGpuPciePort.cpp
@@ -34,8 +34,7 @@ sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, const std::string& health, const std::string& chasisState, const std::vector<utils::Association>& associations, - const std::string& inventoryObjPath) : - NsmObject(name, type) + const std::string& inventoryObjPath) : NsmObject(name, type) { lg2::info("NsmGpuPciePort: create sensor:{NAME}", "NAME", name.c_str()); associationDefIntf = @@ -64,8 +63,7 @@ const std::string& name, const std::string& type, const std::string& portType, const std::string& portProtocol, std::shared_ptr<PortInfoIntf> portInfoIntf) : - NsmObject(name, type), - portInfoIntf(portInfoIntf) + NsmObject(name, type), portInfoIntf(portInfoIntf) { lg2::info("NsmGpuPciePortInfo: create sensor:{NAME}", "NAME", name.c_str()); portInfoIntf->type(PortInfoIntf::convertPortTypeFromString(portType)); @@ -76,8 +74,8 @@ NsmClearPCIeCounters::NsmClearPCIeCounters( const std::string& name, const std::string& type, const uint8_t groupId, uint8_t deviceIndex, std::shared_ptr<ClearPCIeIntf> clearPCIeIntf) : - NsmObject(name, type), - groupId(groupId), deviceIndex(deviceIndex), clearPCIeIntf(clearPCIeIntf) + NsmObject(name, type), groupId(groupId), deviceIndex(deviceIndex), + clearPCIeIntf(clearPCIeIntf) { lg2::info("NsmClearPCIeCounters:: create sensor {NAME} of group {GROUP_ID}", "NAME", name, "GROUP_ID", groupId);
diff --git a/nsmd/nsmPort/nsmGpuPciePort.hpp b/nsmd/nsmPort/nsmGpuPciePort.hpp index 0aef27b..6a748f4 100644 --- a/nsmd/nsmPort/nsmGpuPciePort.hpp +++ b/nsmd/nsmPort/nsmGpuPciePort.hpp
@@ -102,8 +102,7 @@ NsmClearPCIeIntf(sdbusplus::bus::bus& bus, const char* path, const uint8_t deviceIndex, std::shared_ptr<NsmDevice> device) : - ClearPCIeIntf(bus, path), - deviceIndex(deviceIndex), device(device) + ClearPCIeIntf(bus, path), deviceIndex(deviceIndex), device(device) {} sdbusplus::message::object_path clearCounter(std::string Counter) override;
diff --git a/nsmd/nsmPort/nsmPCIeErrors.cpp b/nsmd/nsmPort/nsmPCIeErrors.cpp index 7bcbee3..a9d06d1 100644 --- a/nsmd/nsmPort/nsmPCIeErrors.cpp +++ b/nsmd/nsmPort/nsmPCIeErrors.cpp
@@ -39,9 +39,8 @@ */ NsmPCIeErrors::NsmPCIeErrors(const NsmInterfaceProvider<PCIeEccIntf>& provider, uint8_t deviceIndex, uint8_t groupId) : - NsmSensor(provider), - NsmInterfaceContainer<PCIeEccIntf>(provider), deviceIndex(deviceIndex), - groupId(groupId) + NsmSensor(provider), NsmInterfaceContainer<PCIeEccIntf>(provider), + deviceIndex(deviceIndex), groupId(groupId) { #define initHandleResponse(X) \ { \
diff --git a/nsmd/nsmPort/nsmPort.cpp b/nsmd/nsmPort/nsmPort.cpp index 08d44d4..cc82351 100644 --- a/nsmd/nsmPort/nsmPort.cpp +++ b/nsmd/nsmPort/nsmPort.cpp
@@ -106,8 +106,8 @@ const std::string& type, std::shared_ptr<PortMetricsOem3Intf>& portMetricsOem3Interface, std::string& inventoryObjPath) : - NsmObject(portName, type), - portName(portName), portNumber(portNum), objPath(inventoryObjPath) + NsmObject(portName, type), portName(portName), portNumber(portNum), + objPath(inventoryObjPath) { lg2::debug("NsmPortStatus: {NAME} with port number {NUM}", "NAME", portName.c_str(), "NUM", portNum); @@ -303,9 +303,8 @@ const std::string& type, std::shared_ptr<PortMetricsOem3Intf>& portMetricsOem3Interface, std::shared_ptr<IBPortIntf> iBPortIntf, std::string& inventoryObjPath) : - NsmSensor(portName, type), - portName(portName), iBPortIntf(iBPortIntf), portNumber(portNum), - objPath(inventoryObjPath) + NsmSensor(portName, type), portName(portName), iBPortIntf(iBPortIntf), + portNumber(portNum), objPath(inventoryObjPath) { lg2::debug("NsmPortCharacteristics: {NAME} with port number {NUM}", "NAME", portName.c_str(), "NUM", portNum); @@ -586,8 +585,7 @@ std::shared_ptr<IBPortIntf> iBPortIntf, std::shared_ptr<PortMetricsOem2Intf> portMetricsOem2Intf, std::shared_ptr<PortPacketCountersIntf> portPacketCountersIntf) : - NsmSensor(portName, type), - portName(portName), iBPortIntf(iBPortIntf), + NsmSensor(portName, type), portName(portName), iBPortIntf(iBPortIntf), portMetricsOem2Intf(portMetricsOem2Intf), portPacketCountersIntf(portPacketCountersIntf), portNumber(portNum), typeOfDevice(deviceType), objPath(inventoryObjPath) @@ -1116,8 +1114,8 @@ const std::string& type, std::string& inventoryObjPath, std::shared_ptr<PortMetricsOem2Intf> portMetricsOem2Intf, std::shared_ptr<PortPacketCountersIntf> portPacketCountersIntf) : - NsmSensorAggregator(portName, type), - portName(portName), portNumber(portNumber), objPath(inventoryObjPath), + NsmSensorAggregator(portName, type), portName(portName), + portNumber(portNumber), objPath(inventoryObjPath), portMetricsOem2Intf(portMetricsOem2Intf), portPacketCountersIntf(portPacketCountersIntf), tagToPropertyMap({ @@ -1432,8 +1430,7 @@ const std::string& objPath, const std::string& nodeGuidObjPath, const std::string& ethernetMacAddressObjPath, const std::string& permanentMacAddressObjPath, uint16_t portNumber) : - NsmSensorAggregator(name, type), - portNumber(portNumber) + NsmSensorAggregator(name, type), portNumber(portNumber) { linkTypeIntf = std::make_unique<LinkTypeIntf>(bus, objPath.c_str()); portGuidIntf = std::make_unique<GuidIntf>(bus, objPath.c_str()); @@ -1579,8 +1576,8 @@ NsmGetPortECCCounters::NsmGetPortECCCounters( sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, const std::string& inventoryObjPath, uint8_t portNumber) : - NsmSensorAggregator(name, type), - objPath(inventoryObjPath), portNumber(portNumber) + NsmSensorAggregator(name, type), objPath(inventoryObjPath), + portNumber(portNumber) { portECCIntf = std::make_unique<PortECCIntf>(bus, objPath.c_str()); #ifdef NVIDIA_SHMEM
diff --git a/nsmd/nsmPort/nsmRetimerPort.cpp b/nsmd/nsmPort/nsmRetimerPort.cpp index 85b41be..78d26c2 100644 --- a/nsmd/nsmPort/nsmRetimerPort.cpp +++ b/nsmd/nsmPort/nsmRetimerPort.cpp
@@ -16,8 +16,7 @@ const std::string& type, const std::vector<utils::Association>& associations, const std::string& inventoryObjPath) : - NsmObject(portName, type), - portName(portName) + NsmObject(portName, type), portName(portName) { lg2::info("NsmPCIePort: create sensor:{NAME}", "NAME", portName.c_str()); portIntf = std::make_unique<PortIntf>(bus, inventoryObjPath.c_str()); @@ -42,9 +41,8 @@ std::shared_ptr<PortInfoIntf> portInfoIntf, std::shared_ptr<PortWidthIntf> portWidthIntf, uint8_t deviceIndex) : - NsmPcieGroup(name, type, deviceIndex, GROUP_ID_1), - objPath(inventoryPath), portInfoIntf(portInfoIntf), - portWidthIntf(portWidthIntf) + NsmPcieGroup(name, type, deviceIndex, GROUP_ID_1), objPath(inventoryPath), + portInfoIntf(portInfoIntf), portWidthIntf(portWidthIntf) { lg2::info("NsmPCIeECCGroup1: {NAME}", "NAME", name.c_str()); @@ -176,8 +174,8 @@ const std::string& inventoryPath, std::shared_ptr<PCIeEccIntf> pcieEccIntf, uint8_t deviceIndex) : - NsmPcieGroup(name, type, deviceIndex, GROUP_ID_2), - objPath(inventoryPath), pcieEccIntf(pcieEccIntf) + NsmPcieGroup(name, type, deviceIndex, GROUP_ID_2), objPath(inventoryPath), + pcieEccIntf(pcieEccIntf) { lg2::info("NsmPCIeECCGroup2: {NAME}", "NAME", name.c_str()); @@ -271,8 +269,8 @@ const std::string& inventoryPath, std::shared_ptr<PCIeEccIntf> pcieEccIntf, uint8_t deviceIndex) : - NsmPcieGroup(name, type, deviceIndex, GROUP_ID_3), - objPath(inventoryPath), pcieEccIntf(pcieEccIntf) + NsmPcieGroup(name, type, deviceIndex, GROUP_ID_3), objPath(inventoryPath), + pcieEccIntf(pcieEccIntf) { lg2::info("NsmPCIeECCGroup3: {NAME}", "NAME", name.c_str()); @@ -339,8 +337,8 @@ const std::string& inventoryPath, std::shared_ptr<PCIeEccIntf> pcieEccIntf, uint8_t deviceIndex) : - NsmPcieGroup(name, type, deviceIndex, GROUP_ID_4), - objPath(inventoryPath), pcieEccIntf(pcieEccIntf) + NsmPcieGroup(name, type, deviceIndex, GROUP_ID_4), objPath(inventoryPath), + pcieEccIntf(pcieEccIntf) { lg2::info("NsmPCIeECCGroup4: {NAME}", "NAME", name.c_str());
diff --git a/nsmd/nsmPort/nsmZone.cpp b/nsmd/nsmPort/nsmZone.cpp index 81fe1f2..00edd82 100644 --- a/nsmd/nsmPort/nsmZone.cpp +++ b/nsmd/nsmPort/nsmZone.cpp
@@ -13,8 +13,7 @@ NsmZone::NsmZone(sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, const std::string& fabricObjPath, - const std::string& zoneType) : - NsmObject(name, type) + const std::string& zoneType) : NsmObject(name, type) { lg2::info("NsmFabricZone: create sensor:{NAME}", "NAME", name.c_str()); auto inventoryObjPath = fabricObjPath + "/zones/0";
diff --git a/nsmd/nsmPort/test/meson.build b/nsmd/nsmPort/test/meson.build index c567ec9..bb6d011 100644 --- a/nsmd/nsmPort/test/meson.build +++ b/nsmd/nsmPort/test/meson.build
@@ -47,9 +47,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'nsmPort_test', -] +tests = ['nsmPort_test'] tests_deps = [ test_src, @@ -80,4 +78,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmd/nsmProcessor/meson.build b/nsmd/nsmProcessor/meson.build index 6f58ec4..3c30d13 100644 --- a/nsmd/nsmProcessor/meson.build +++ b/nsmd/nsmProcessor/meson.build
@@ -12,4 +12,4 @@ if get_option('tests').enabled() subdir('test') -endif \ No newline at end of file +endif
diff --git a/nsmd/nsmProcessor/nsmFpgaProcessor.cpp b/nsmd/nsmProcessor/nsmFpgaProcessor.cpp index 882701c..1b1f534 100644 --- a/nsmd/nsmProcessor/nsmFpgaProcessor.cpp +++ b/nsmd/nsmProcessor/nsmFpgaProcessor.cpp
@@ -12,8 +12,7 @@ std::string& inventoryObjPath, const std::vector<utils::Association>& associations, const std::string& fpgaType, const std::string& locationType, - std::string& health) : - NsmObject(name, type) + std::string& health) : NsmObject(name, type) { acceleratorIntf = std::make_unique<AcceleratorIntf>(bus, inventoryObjPath.c_str());
diff --git a/nsmd/nsmProcessor/nsmOemResetStatistics.cpp b/nsmd/nsmProcessor/nsmOemResetStatistics.cpp index 83b050e..6fc51d8 100644 --- a/nsmd/nsmProcessor/nsmOemResetStatistics.cpp +++ b/nsmd/nsmProcessor/nsmOemResetStatistics.cpp
@@ -44,8 +44,8 @@ const std::string& inventoryObjPath, std::shared_ptr<ResetCountersIntf> resetCountersIntf, std::unique_ptr<AssociationDefinitionsIntf> associationDef) : - NsmSensorAggregator(name, type), - inventoryObjPath(inventoryObjPath), resetCountersIntf(resetCountersIntf), + NsmSensorAggregator(name, type), inventoryObjPath(inventoryObjPath), + resetCountersIntf(resetCountersIntf), associationDef(std::move(associationDef)) { #ifdef NVIDIA_SHMEM
diff --git a/nsmd/nsmProcessor/nsmPowerSmoothing.cpp b/nsmd/nsmProcessor/nsmPowerSmoothing.cpp index dd54c63..f74ca62 100644 --- a/nsmd/nsmProcessor/nsmPowerSmoothing.cpp +++ b/nsmd/nsmProcessor/nsmPowerSmoothing.cpp
@@ -27,8 +27,8 @@ NsmPowerSmoothing::NsmPowerSmoothing( std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<OemPowerSmoothingFeatIntf> pwrSmoothingIntf) : - NsmSensor(name, type), - pwrSmoothingIntf(pwrSmoothingIntf), inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), pwrSmoothingIntf(pwrSmoothingIntf), + inventoryObjPath(inventoryObjPath) { updateMetricOnSharedMemory(); } @@ -143,8 +143,8 @@ NsmHwCircuitryTelemetry::NsmHwCircuitryTelemetry( std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<PowerSmoothingIntf> pwrSmoothingIntf) : - NsmSensor(name, type), - pwrSmoothingIntf(pwrSmoothingIntf), inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), pwrSmoothingIntf(pwrSmoothingIntf), + inventoryObjPath(inventoryObjPath) { updateMetricOnSharedMemory(); } @@ -368,8 +368,8 @@ std::string& name, std::string& type, std::shared_ptr<OemAdminProfileIntf> adminProfileIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - adminProfileIntf(adminProfileIntf), inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), adminProfileIntf(adminProfileIntf), + inventoryObjPath(inventoryObjPath) {} std::optional<std::vector<uint8_t>> @@ -456,8 +456,7 @@ NsmPowerProfileCollection::NsmPowerProfileCollection( std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<NsmDevice> device) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath), device(device) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath), device(device) {} bool NsmPowerProfileCollection::hasProfileId(uint8_t profileId)
diff --git a/nsmd/nsmProcessor/nsmProcessor.cpp b/nsmd/nsmProcessor/nsmProcessor.cpp index ee24192..0a09802 100644 --- a/nsmd/nsmProcessor/nsmProcessor.cpp +++ b/nsmd/nsmProcessor/nsmProcessor.cpp
@@ -76,8 +76,7 @@ #ifdef NVIDIA_RESET_METRICS NsmResetCountersSupportedIntf::NsmResetCountersSupportedIntf( sdbusplus::bus::bus& bus, std::string& name, std::string& type, - std::string& inventoryObjPath) : - NsmObject(name, type) + std::string& inventoryObjPath) : NsmObject(name, type) { resetMetricsSupportedIntf = std::make_unique<resetMetricsSupported>(bus, inventoryObjPath.c_str()); @@ -87,8 +86,7 @@ NsmProcessorAssociation::NsmProcessorAssociation( sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, const std::string& inventoryObjPath, - const std::vector<utils::Association>& associations) : - NsmObject(name, type) + const std::vector<utils::Association>& associations) : NsmObject(name, type) { associationDef = std::make_unique<AssociationDefinitionsIntf>( bus, inventoryObjPath.c_str()); @@ -106,8 +104,7 @@ NsmUuidIntf::NsmUuidIntf(sdbusplus::bus::bus& bus, std::string& name, std::string& type, std::string& inventoryObjPath, uuid_t uuid) : - NsmObject(name, type), - inventoryObjPath(inventoryObjPath) + NsmObject(name, type), inventoryObjPath(inventoryObjPath) { uuidIntf = std::make_unique<UuidIntf>(bus, inventoryObjPath.c_str()); uuidIntf->uuid(uuid); @@ -143,8 +140,7 @@ NsmSysGuidIntf::NsmSysGuidIntf(sdbusplus::bus::bus& bus, std::string& name, std::string& type, std::string& inventoryObjPath) : - NsmObject(name, type), - inventoryObjPath(inventoryObjPath) + NsmObject(name, type), inventoryObjPath(inventoryObjPath) { sysguidIntf = std::make_unique<SysGuidIntf>(bus, inventoryObjPath.c_str()); sysguidIntf->sysGUID(); @@ -506,8 +502,7 @@ NsmEccErrorCounts::NsmEccErrorCounts(std::string& name, std::string& type, std::shared_ptr<EccModeIntf> eccIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmEccErrorCounts: create sensor:{NAME}", "NAME", name.c_str()); @@ -600,17 +595,16 @@ NsmPcieGroup::NsmPcieGroup(const std::string& name, const std::string& type, uint8_t deviceId, uint8_t groupId) : - NsmSensor(name, type), - isMultiPciePortEnabled(false), deviceId(deviceId), groupId(groupId) + NsmSensor(name, type), isMultiPciePortEnabled(false), deviceId(deviceId), + groupId(groupId) {} NsmPcieGroup::NsmPcieGroup(const std::string& name, const std::string& type, uint8_t groupId, uint8_t multiPortType, uint8_t multiPortIndex, uint8_t multiPortUpstreamPortNumber) : - NsmSensor(name, type), - isMultiPciePortEnabled(true), multiPortType(multiPortType), - multiPortIndex(multiPortIndex), + NsmSensor(name, type), isMultiPciePortEnabled(true), + multiPortType(multiPortType), multiPortIndex(multiPortIndex), multiPortUpstreamPortNumber(multiPortUpstreamPortNumber), groupId(groupId) {} @@ -678,9 +672,8 @@ std::shared_ptr<PCieEccIntf> pcieECCIntf, std::shared_ptr<PCieEccIntf> pciePortIntf, uint8_t deviceId, std::string& inventoryObjPath) : - NsmPcieGroup(name, type, deviceId, GROUP_ID_2), - pciePortIntf(pciePortIntf), pCieEccIntf(pcieECCIntf), - inventoryObjPath(inventoryObjPath) + NsmPcieGroup(name, type, deviceId, GROUP_ID_2), pciePortIntf(pciePortIntf), + pCieEccIntf(pcieECCIntf), inventoryObjPath(inventoryObjPath) { lg2::info("NsmPciGroup2: create sensor:{NAME}", "NAME", name.c_str()); @@ -780,9 +773,8 @@ std::shared_ptr<PCieEccIntf> pcieECCIntf, std::shared_ptr<PCieEccIntf> pciePortIntf, uint8_t deviceId, std::string& inventoryObjPath) : - NsmPcieGroup(name, type, deviceId, GROUP_ID_3), - pciePortIntf(pciePortIntf), pCieEccIntf(pcieECCIntf), - inventoryObjPath(inventoryObjPath) + NsmPcieGroup(name, type, deviceId, GROUP_ID_3), pciePortIntf(pciePortIntf), + pCieEccIntf(pcieECCIntf), inventoryObjPath(inventoryObjPath) { lg2::info("NsmPciGroup2: create sensor:{NAME}", "NAME", name.c_str()); @@ -843,9 +835,8 @@ std::shared_ptr<PCieEccIntf> pcieECCIntf, std::shared_ptr<PCieEccIntf> pciePortIntf, uint8_t deviceId, std::string& inventoryObjPath) : - NsmPcieGroup(name, type, deviceId, GROUP_ID_4), - pciePortIntf(pciePortIntf), pCieEccIntf(pcieECCIntf), - inventoryObjPath(inventoryObjPath) + NsmPcieGroup(name, type, deviceId, GROUP_ID_4), pciePortIntf(pciePortIntf), + pCieEccIntf(pcieECCIntf), inventoryObjPath(inventoryObjPath) { lg2::info("NsmPciGroup4: create sensor:{NAME}", "NAME", name.c_str()); @@ -1011,9 +1002,8 @@ std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<EDPpLocal> eDPpIntf, std::shared_ptr<NsmResetEdppAsyncIntf> resetEdppAsyncIntf) : - NsmSensor(name, type), - eDPpIntf(eDPpIntf), resetEdppAsyncIntf(resetEdppAsyncIntf), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), eDPpIntf(eDPpIntf), + resetEdppAsyncIntf(resetEdppAsyncIntf), inventoryObjPath(inventoryObjPath) { lg2::info("NsmEDPpScalingFactor: create sensor:{NAME}", "NAME", name.c_str()); @@ -1175,8 +1165,7 @@ NsmMaxEDPpLimit::NsmMaxEDPpLimit(std::string& name, std::string& type, std::shared_ptr<EDPpLocal> eDPpIntf) : - NsmObject(name, type), - eDPpIntf(eDPpIntf) + NsmObject(name, type), eDPpIntf(eDPpIntf) { lg2::info("NsmMaxEDPpLimit: create sensor:{NAME}", "NAME", name.c_str()); } @@ -1237,8 +1226,7 @@ NsmMinEDPpLimit::NsmMinEDPpLimit(std::string& name, std::string& type, std::shared_ptr<EDPpLocal> eDPpIntf) : - NsmObject(name, type), - eDPpIntf(eDPpIntf) + NsmObject(name, type), eDPpIntf(eDPpIntf) { lg2::info("NsmMinEDPpLimit: create sensor:{NAME}", "NAME", name.c_str()); } @@ -1301,8 +1289,7 @@ const std::string& name, const std::string& type, std::shared_ptr<CpuOperatingConfigIntf> cpuConfigIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmClockLimitGraphics: create sensor:{NAME}", "NAME", @@ -1400,8 +1387,7 @@ const std::string& name, const std::string& type, std::shared_ptr<CpuOperatingConfigIntf> cpuConfigIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmCurrClockFreq: create sensor:{NAME}", "NAME", name.c_str()); @@ -1473,8 +1459,7 @@ NsmDefaultBaseClockSpeed::NsmDefaultBaseClockSpeed( std::string& name, std::string& type, std::shared_ptr<CpuOperatingConfigIntf> cpuConfigIntf) : - NsmObject(name, type), - cpuOperatingConfigIntf(cpuConfigIntf) + NsmObject(name, type), cpuOperatingConfigIntf(cpuConfigIntf) { lg2::info("NsmDefaultBaseClockSpeed: create sensor:{NAME}", "NAME", name.c_str()); @@ -1543,8 +1528,7 @@ NsmDefaultBoostClockSpeed::NsmDefaultBoostClockSpeed( std::string& name, std::string& type, std::shared_ptr<CpuOperatingConfigIntf> cpuConfigIntf) : - NsmObject(name, type), - cpuOperatingConfigIntf(cpuConfigIntf) + NsmObject(name, type), cpuOperatingConfigIntf(cpuConfigIntf) { lg2::info("NsmDefaultBoostClockSpeed: create sensor:{NAME}", "NAME", name.c_str()); @@ -1701,8 +1685,7 @@ std::string& name, std::string& type, std::shared_ptr<ProcessorPerformanceIntf> processorPerfIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmProcessorThrottleReason: create sensor:{NAME}", "NAME", @@ -1814,8 +1797,7 @@ const std::string& name, const std::string& type, std::shared_ptr<ProcessorPerformanceIntf> processorPerfIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmAccumGpuUtilTime: create sensor:{NAME}", "NAME", @@ -1912,8 +1894,7 @@ NsmTotalMemorySize::NsmTotalMemorySize( std::string& name, std::string& type, std::shared_ptr<PersistentMemoryInterface> persistentMemoryInterface) : - NsmObject(name, type), - persistentMemoryInterface(persistentMemoryInterface) + NsmObject(name, type), persistentMemoryInterface(persistentMemoryInterface) { lg2::info("NsmTotalMemorySize: create sensor:{NAME}", "NAME", name.c_str()); } @@ -1981,8 +1962,7 @@ const std::string& name, const std::string& type, std::shared_ptr<TotalNvLinkInterface> totalNvLinkInterface, std::string& inventoryObjPath) : - NsmSensor(name, type), - totalNvLinkInterface(totalNvLinkInterface), + NsmSensor(name, type), totalNvLinkInterface(totalNvLinkInterface), inventoryObjPath(inventoryObjPath) { @@ -2049,8 +2029,7 @@ const std::string& name, const std::string& type, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmProcessorRevision: create sensor:{NAME}", "NAME", @@ -2131,8 +2110,7 @@ const std::vector<std::string>& parents, const std::shared_ptr<PowerPersistencyIntf> persistencyIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - powerCapIntf(powerCapIntf), parents(parents), + NsmSensor(name, type), powerCapIntf(powerCapIntf), parents(parents), persistencyIntf(persistencyIntf), inventoryObjPath(inventoryObjPath) { persistencyIntf->persistency(false); @@ -2270,9 +2248,8 @@ std::shared_ptr<NsmPowerCapIntf> powerCapIntf, std::shared_ptr<PowerLimitIface> powerLimitIntf, std::string& inventoryObjPath) : - NsmObject(name, type), - powerCapIntf(powerCapIntf), powerLimitIntf(powerLimitIntf), - inventoryObjPath(inventoryObjPath) + NsmObject(name, type), powerCapIntf(powerCapIntf), + powerLimitIntf(powerLimitIntf), inventoryObjPath(inventoryObjPath) { updateMetricOnSharedMemory(); } @@ -2365,9 +2342,8 @@ std::shared_ptr<NsmPowerCapIntf> powerCapIntf, std::shared_ptr<PowerLimitIface> powerLimitIntf, std::string& inventoryObjPath) : - NsmObject(name, type), - powerCapIntf(powerCapIntf), powerLimitIntf(powerLimitIntf), - inventoryObjPath(inventoryObjPath) + NsmObject(name, type), powerCapIntf(powerCapIntf), + powerLimitIntf(powerLimitIntf), inventoryObjPath(inventoryObjPath) { updateMetricOnSharedMemory(); } @@ -2465,8 +2441,7 @@ std::string& name, std::string& type, std::shared_ptr<NsmClearPowerCapIntf> clearPowerCapIntf, std::shared_ptr<NsmClearPowerCapAsyncIntf> clearPowerCapAsyncIntf) : - NsmObject(name, type), - defaultPowerCapIntf(clearPowerCapIntf), + NsmObject(name, type), defaultPowerCapIntf(clearPowerCapIntf), clearPowerCapAsyncIntf(clearPowerCapAsyncIntf) {} @@ -2659,8 +2634,7 @@ const std::string& name, const std::string& type, std::shared_ptr<ConfidentialComputeIntf> confidentialComputeIntf, std::string& inventoryObjPath) : - NsmSensor(name, type), - confidentialComputeIntf(confidentialComputeIntf), + NsmSensor(name, type), confidentialComputeIntf(confidentialComputeIntf), inventoryObjPath(inventoryObjPath) { updateMetricOnSharedMemory(); @@ -2961,8 +2935,7 @@ NsmEgmMode::NsmEgmMode(sdbusplus::bus::bus& bus, std::string& name, std::string& type, std::string& inventoryObjPath) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath) { lg2::info("NsmEgmMode: create sensor:{NAME}", "NAME", name.c_str()); egmModeIntf = std::make_unique<EgmModeIntf>(bus, inventoryObjPath.c_str());
diff --git a/nsmd/nsmProcessor/nsmReconfigPermissions.cpp b/nsmd/nsmProcessor/nsmReconfigPermissions.cpp index 402f7a4..46bbfed 100644 --- a/nsmd/nsmProcessor/nsmReconfigPermissions.cpp +++ b/nsmd/nsmProcessor/nsmReconfigPermissions.cpp
@@ -30,8 +30,7 @@ ReconfigSettingsIntf::FeatureType feature, std::shared_ptr<ReconfigSettingsIntf> hostConfigIntf, std::shared_ptr<ReconfigSettingsIntf> doeConfigIntf) : - NsmSensor(name, type), - feature(feature), hostConfigIntf(hostConfigIntf), + NsmSensor(name, type), feature(feature), hostConfigIntf(hostConfigIntf), doeConfigIntf(doeConfigIntf), hostConfigPath(hostConfigPath), doeConfigPath(doeConfigPath) {
diff --git a/nsmd/nsmProcessor/nsmReset.cpp b/nsmd/nsmProcessor/nsmReset.cpp index 4c3b2e6..bbf7f1a 100644 --- a/nsmd/nsmProcessor/nsmReset.cpp +++ b/nsmd/nsmProcessor/nsmReset.cpp
@@ -33,8 +33,7 @@ NsmReset::NsmReset(sdbusplus::bus::bus& bus, const std::string& name, const std::string& type, std::string& inventoryObjPath, std::shared_ptr<NsmDevice> device, - const uint8_t deviceIndex) : - NsmObject(name, type) + const uint8_t deviceIndex) : NsmObject(name, type) { lg2::info("NsmReset: create sensor:{NAME}", "NAME", name.c_str()); resetIntf = std::make_shared<NsmResetIntf>(bus, inventoryObjPath.c_str());
diff --git a/nsmd/nsmProcessor/nsmWorkloadPowerProfile.cpp b/nsmd/nsmProcessor/nsmWorkloadPowerProfile.cpp index 25b64be..c39a369 100644 --- a/nsmd/nsmProcessor/nsmWorkloadPowerProfile.cpp +++ b/nsmd/nsmProcessor/nsmWorkloadPowerProfile.cpp
@@ -30,8 +30,7 @@ NsmWorkloadProfileInfoAsyncIntf::NsmWorkloadProfileInfoAsyncIntf( sdbusplus::bus::bus& bus, const char* path, std::shared_ptr<NsmDevice> device) : - ProfileInfoAsyncIntf(bus, path), - device(device) + ProfileInfoAsyncIntf(bus, path), device(device) {} requester::Coroutine @@ -246,9 +245,8 @@ std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<OemProfileInfoIntf> profileStatusInfo, std::shared_ptr<NsmWorkloadProfileInfoAsyncIntf> profileInfoAsync) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath), profileStatusInfo(profileStatusInfo), - profileInfoAsync(profileInfoAsync) + NsmSensor(name, type), inventoryObjPath(inventoryObjPath), + profileStatusInfo(profileStatusInfo), profileInfoAsync(profileInfoAsync) {} @@ -313,8 +311,7 @@ NsmWorkloadPowerProfileCollection::NsmWorkloadPowerProfileCollection( std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<NsmDevice> device) : - NsmObject(name, type), - inventoryObjPath(inventoryObjPath), device(device) + NsmObject(name, type), inventoryObjPath(inventoryObjPath), device(device) {} bool NsmWorkloadPowerProfileCollection::hasProfileId(uint16_t profileId) @@ -363,8 +360,7 @@ NsmWorkloadPowerProfilePageCollection::NsmWorkloadPowerProfilePageCollection( std::string& name, std::string& type, std::string& inventoryObjPath, std::shared_ptr<NsmDevice> device) : - NsmObject(name, type), - inventoryObjPath(inventoryObjPath), device(device) + NsmObject(name, type), inventoryObjPath(inventoryObjPath), device(device) {} std::shared_ptr<NsmWorkloadPowerProfilePage> @@ -409,8 +405,7 @@ std::shared_ptr<NsmWorkloadPowerProfileCollection> profileCollection, std::shared_ptr<NsmWorkloadPowerProfilePageCollection> pageCollection, std::shared_ptr<NsmWorkLoadProfileEnum> profileMapper, uint16_t pageId) : - NsmSensor(name, type), - inventoryObjPath(inventoryObjPath), device(device), + NsmSensor(name, type), inventoryObjPath(inventoryObjPath), device(device), profileCollection(profileCollection), pageCollection(pageCollection), profileMapper(profileMapper), pageId(pageId) {}
diff --git a/nsmd/nsmProcessor/test/meson.build b/nsmd/nsmProcessor/test/meson.build index 1d70ea8..542abe7 100644 --- a/nsmd/nsmProcessor/test/meson.build +++ b/nsmd/nsmProcessor/test/meson.build
@@ -84,9 +84,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'nsmProcessor_test', -] +tests = ['nsmProcessor_test'] tests_deps = [ test_src,
diff --git a/nsmd/nsmRawCommand/meson.build b/nsmd/nsmRawCommand/meson.build index 3f8425a..4dbc223 100644 --- a/nsmd/nsmRawCommand/meson.build +++ b/nsmd/nsmRawCommand/meson.build
@@ -1,7 +1,5 @@ -sources += [ - 'nsmRawCommand/nsmRawCommandHandler.cpp', -] +sources += ['nsmRawCommand/nsmRawCommandHandler.cpp'] nsmd_headers += ['.', '..', 'nsmRawCommand']
diff --git a/nsmd/nsmRawCommand/nsmRawCommandHandler.cpp b/nsmd/nsmRawCommand/nsmRawCommandHandler.cpp index 5cf85f6..96117a3 100644 --- a/nsmd/nsmRawCommand/nsmRawCommandHandler.cpp +++ b/nsmd/nsmRawCommand/nsmRawCommandHandler.cpp
@@ -239,8 +239,9 @@ auto device = manager.getNsmDevice(deviceType, instanceId, deviceRole); if (!device) { - throw std::invalid_argument( - "Device " + std::to_string(deviceType) + ":" + std::to_string(instanceId) + " not found"); + throw std::invalid_argument("Device " + std::to_string(deviceType) + + ":" + std::to_string(instanceId) + + " not found"); } auto eid = manager.getEid(device); std::shared_ptr<const nsm_msg> responseMsg; @@ -259,8 +260,8 @@ } else if (rc != NSM_SW_SUCCESS) { - throw std::runtime_error( - "SendRecvNsmMsg failed, rc=" + std::to_string(rc)); + throw std::runtime_error("SendRecvNsmMsg failed, rc=" + + std::to_string(rc)); } else {
diff --git a/nsmd/nsmRawCommand/test/meson.build b/nsmd/nsmRawCommand/test/meson.build index d597ca0..e36b63a 100644 --- a/nsmd/nsmRawCommand/test/meson.build +++ b/nsmd/nsmRawCommand/test/meson.build
@@ -37,11 +37,12 @@ '../../nsmDbusIfaceOverride', ] -test_src = declare_dependency(sources: dep_src_files, include_directories: dep_src_headers) +test_src = declare_dependency( + sources: dep_src_files, + include_directories: dep_src_headers, +) -tests = [ - 'nsmRawCommandHandler_test', -] +tests = ['nsmRawCommandHandler_test'] tests_deps = [ test_src,
diff --git a/nsmd/nsmReady/meson.build b/nsmd/nsmReady/meson.build index be9f0af..2526f8b 100644 --- a/nsmd/nsmReady/meson.build +++ b/nsmd/nsmReady/meson.build
@@ -1,6 +1,3 @@ -sources += [ - 'nsmReady/nsmReady.cpp', - 'nsmReady/nsmRemapInstanceNumber.cpp', -] +sources += ['nsmReady/nsmReady.cpp', 'nsmReady/nsmRemapInstanceNumber.cpp'] -nsmd_headers += ['.', '..'] \ No newline at end of file +nsmd_headers += ['.', '..']
diff --git a/nsmd/nsmSPI/meson.build b/nsmd/nsmSPI/meson.build index 79c914a..5b55aed 100644 --- a/nsmd/nsmSPI/meson.build +++ b/nsmd/nsmSPI/meson.build
@@ -1,6 +1,4 @@ -sources += [ - 'nsmSPI/nsmGraceSpi.cpp', -] +sources += ['nsmSPI/nsmGraceSpi.cpp'] nsmd_headers += ['.', '..', 'nsmSPI']
diff --git a/nsmd/nsmSPI/nsmGraceSpi.cpp b/nsmd/nsmSPI/nsmGraceSpi.cpp index 3f549ee..cff9db8 100644 --- a/nsmd/nsmSPI/nsmGraceSpi.cpp +++ b/nsmd/nsmSPI/nsmGraceSpi.cpp
@@ -43,8 +43,8 @@ const std::string& inventoryPath, const std::string& type, const uuid_t& uuid) : - NsmObject(name, type), - SpiIntf(bus, (inventoryPath + name).c_str()), uuid(uuid) + NsmObject(name, type), SpiIntf(bus, (inventoryPath + name).c_str()), + uuid(uuid) { lg2::debug("NsmGraceSpiObject: {NAME}", "NAME", name.c_str()); objPath = inventoryPath + name;
diff --git a/nsmd/nsmSensors/meson.build b/nsmd/nsmSensors/meson.build index a2bd6eb..4e16438 100644 --- a/nsmd/nsmSensors/meson.build +++ b/nsmd/nsmSensors/meson.build
@@ -4,4 +4,4 @@ 'nsmSensors/nsmErrorInjection.cpp', ] -nsmd_headers += ['.', '..', 'nsmSensors'] \ No newline at end of file +nsmd_headers += ['.', '..', 'nsmSensors']
diff --git a/nsmd/nsmSensors/nsmErrorInjection.cpp b/nsmd/nsmSensors/nsmErrorInjection.cpp index 46fff57..f8f32e6 100644 --- a/nsmd/nsmSensors/nsmErrorInjection.cpp +++ b/nsmd/nsmSensors/nsmErrorInjection.cpp
@@ -26,8 +26,7 @@ NsmErrorInjection::NsmErrorInjection( const NsmInterfaceProvider<ErrorInjectionIntf>& provider) : - NsmSensor(provider), - NsmInterfaceContainer<ErrorInjectionIntf>(provider) + NsmSensor(provider), NsmInterfaceContainer<ErrorInjectionIntf>(provider) {} std::optional<Request> NsmErrorInjection::genRequestMsg(eid_t eid,
diff --git a/nsmd/nsmSensors/nsmInventoryProperty.cpp b/nsmd/nsmSensors/nsmInventoryProperty.cpp index badf2ee..e88e3d7 100644 --- a/nsmd/nsmSensors/nsmInventoryProperty.cpp +++ b/nsmd/nsmSensors/nsmInventoryProperty.cpp
@@ -24,8 +24,7 @@ NsmInventoryPropertyBase::NsmInventoryPropertyBase( const NsmObject& pdi, nsm_inventory_property_identifiers property) : - NsmSensor(pdi), - property(property) + NsmSensor(pdi), property(property) {} std::optional<Request>
diff --git a/nsmd/nsmSensors/nsmPCIeLinkSpeed.cpp b/nsmd/nsmSensors/nsmPCIeLinkSpeed.cpp index 3647b02..e25527a 100644 --- a/nsmd/nsmSensors/nsmPCIeLinkSpeed.cpp +++ b/nsmd/nsmSensors/nsmPCIeLinkSpeed.cpp
@@ -24,16 +24,14 @@ NsmPCIeLinkSpeedBase::NsmPCIeLinkSpeedBase(const NsmObject& provider, uint8_t deviceIndex) : - NsmSensor(provider), - deviceIndex(deviceIndex) + NsmSensor(provider), deviceIndex(deviceIndex) {} NsmPCIeLinkSpeedBase::NsmPCIeLinkSpeedBase( const NsmObject& provider, uint8_t multiPortType, uint8_t multiPortIndex, uint8_t multiPortUpstreamPortNumber) : - NsmSensor(provider), - isMultiPciePortEnabled(true), multiPortType(multiPortType), - multiPortIndex(multiPortIndex), + NsmSensor(provider), isMultiPciePortEnabled(true), + multiPortType(multiPortType), multiPortIndex(multiPortIndex), multiPortUpstreamPortNumber(multiPortUpstreamPortNumber) {}
diff --git a/nsmd/nsmSetAsync/test/meson.build b/nsmd/nsmSetAsync/test/meson.build index 9f82a29..9464771 100644 --- a/nsmd/nsmSetAsync/test/meson.build +++ b/nsmd/nsmSetAsync/test/meson.build
@@ -39,12 +39,12 @@ '../../nsmDbusIfaceOverride', ] -test_src = declare_dependency(sources: dep_src_files, include_directories: dep_src_headers) +test_src = declare_dependency( + sources: dep_src_files, + include_directories: dep_src_headers, +) -tests = [ - 'asyncOperationManager_test', - 'nsmSetWriteProtected_test', -] +tests = ['asyncOperationManager_test', 'nsmSetWriteProtected_test'] tests_deps = [ test_src,
diff --git a/nsmd/sensorManager.cpp b/nsmd/sensorManager.cpp index 378eec5..0f438f5 100644 --- a/nsmd/sensorManager.cpp +++ b/nsmd/sensorManager.cpp
@@ -53,10 +53,10 @@ std::multimap<uuid_t, std::tuple<eid_t, MctpMedium, MctpBinding>>& eidTable, NsmDeviceTable& nsmDevices, eid_t localEid, mctp_socket::Manager& sockManager, bool verbose) : - SensorManager(nsmDevices, localEid), - bus(bus), event(event), handler(handler), instanceIdDb(instanceIdDb), - objServer(objServer), eidTable(eidTable), sockManager(sockManager), - verbose(verbose), globalPollingStateManager(nsmDevices) + SensorManager(nsmDevices, localEid), bus(bus), event(event), + handler(handler), instanceIdDb(instanceIdDb), objServer(objServer), + eidTable(eidTable), sockManager(sockManager), verbose(verbose), + globalPollingStateManager(nsmDevices) { deferScanInventory = std::make_unique<sdeventplus::source::Defer>( event, std::bind(&SensorManagerImpl::scanInventory, this));
diff --git a/nsmd/socket_handler.cpp b/nsmd/socket_handler.cpp index 8d24649..d51a260 100644 --- a/nsmd/socket_handler.cpp +++ b/nsmd/socket_handler.cpp
@@ -142,8 +142,7 @@ } // /* Initiate a connection to the socket */ - struct sockaddr_un addr - {}; + struct sockaddr_un addr{}; addr.sun_family = AF_UNIX; memcpy(addr.sun_path, pathName.data(), pathName.size()); rc = connect(sockFd, reinterpret_cast<struct sockaddr*>(&addr), @@ -219,8 +218,7 @@ // This structure contains the parameter information for the response // message. - struct msghdr msg - {}; + struct msghdr msg{}; int returnCode = 0; ssize_t peekedLength = recv(fd, nullptr, 0, MSG_PEEK | MSG_TRUNC);
diff --git a/nsmd/socket_handler.hpp b/nsmd/socket_handler.hpp index 4be661e..e7d34ce 100644 --- a/nsmd/socket_handler.hpp +++ b/nsmd/socket_handler.hpp
@@ -77,9 +77,8 @@ requester::Handler<requester::Request>& handler, nsm::EventManager& eventManager, Manager& manager, bool verbose) : - handler(handler), - eventManager(eventManager), manager(manager), event(event), - verbose(verbose) + handler(handler), eventManager(eventManager), manager(manager), + event(event), verbose(verbose) {} virtual int registerMctpEndpoint(eid_t eid, int type, int protocol,
diff --git a/nsmd/stateChangeLogger.hpp b/nsmd/stateChangeLogger.hpp index e7e1f0f..610a65c 100644 --- a/nsmd/stateChangeLogger.hpp +++ b/nsmd/stateChangeLogger.hpp
@@ -184,8 +184,7 @@ void shouldLogAndUpdate(bool& stateChanged, StateChangeArg& storedValue, T&& arg) { - stateChanged |= std::visit( - [&](auto&& value) -> bool { + stateChanged |= std::visit([&](auto&& value) -> bool { using StoredType = std::decay_t<decltype(value)>; if constexpr (std::is_same_v<StoredType, utils::Bitfield256>) @@ -204,8 +203,7 @@ // should not be reached, because of checking allowed types during // compilation return false; - }, - storedValue); + }, storedValue); } template <typename... Args> @@ -226,8 +224,8 @@ void appendClearedCodes(std::string& clearedCodes, const StateChangeArg& value, T&&) { - std::string codesText = std::visit( - [](auto& storedValue) -> std::string { + std::string codesText = + std::visit([](auto& storedValue) -> std::string { using StoredType = std::decay_t<decltype(storedValue)>; if constexpr (std::is_same_v<StoredType, utils::Bitfield256>) { @@ -240,8 +238,7 @@ // should not be reached, because of checking allowed types during // compilation return ""; - }, - value); + }, value); if (!codesText.empty()) {
diff --git a/nsmd/test/meson.build b/nsmd/test/meson.build index 99c2064..c3d818b 100644 --- a/nsmd/test/meson.build +++ b/nsmd/test/meson.build
@@ -39,10 +39,7 @@ include_directories: dep_src_headers, ) -tests = [ - 'nsmDevice_test', - 'stateChangeLogger_test', -] +tests = ['nsmDevice_test', 'stateChangeLogger_test'] tests_deps = [ test_src, @@ -72,4 +69,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/nsmtool/cmd_helper.cpp b/nsmtool/cmd_helper.cpp index 85fb98c..588d105 100644 --- a/nsmtool/cmd_helper.cpp +++ b/nsmtool/cmd_helper.cpp
@@ -57,8 +57,7 @@ } Logger(verbose, "Success in creating the socket : RC = ", sockFd); - struct sockaddr_un addr - {}; + struct sockaddr_un addr{}; addr.sun_family = AF_UNIX; memcpy(addr.sun_path, devPath, sizeof(devPath) - 1); @@ -441,8 +440,7 @@ CustomFD socketFd(sockFd); - struct sockaddr_un addr - {}; + struct sockaddr_un addr{}; addr.sun_family = AF_UNIX; memcpy(addr.sun_path, sockAddress.data(), sockAddress.size()); rc = connect(sockFd, reinterpret_cast<struct sockaddr*>(&addr),
diff --git a/nsmtool/cmd_helper.hpp b/nsmtool/cmd_helper.hpp index 6c1712e..7f2384e 100644 --- a/nsmtool/cmd_helper.hpp +++ b/nsmtool/cmd_helper.hpp
@@ -125,8 +125,8 @@ public: explicit CommandInterface(const char* type, const char* name, CLI::App* app) : - nsmType(type), - commandName(name), mctpEid(NSM_ENTITY_ID), verbose(false), instanceId(0) + nsmType(type), commandName(name), mctpEid(NSM_ENTITY_ID), + verbose(false), instanceId(0) { app->add_option("-m,--mctp_eid", mctpEid, "MCTP endpoint ID"); app->add_flag("-v, --verbose", verbose);
diff --git a/nsmtool/meson.build b/nsmtool/meson.build index f8644da..63fc7d9 100644 --- a/nsmtool/meson.build +++ b/nsmtool/meson.build
@@ -28,12 +28,7 @@ sources, implicit_include_directories: false, include_directories: include_directories(nsmtool_headers), - dependencies: [ - CLI11_dep, - nlohmann_json, - sdbusplus, - phosphor_logging, - ], + dependencies: [CLI11_dep, nlohmann_json, sdbusplus, phosphor_logging], install: true, install_dir: get_option('bindir'), -) \ No newline at end of file +)
diff --git a/nsmtool/nsm_diag_cmd.cpp b/nsmtool/nsm_diag_cmd.cpp index 24173b3..f6e1ffe 100644 --- a/nsmtool/nsm_diag_cmd.cpp +++ b/nsmtool/nsm_diag_cmd.cpp
@@ -515,8 +515,7 @@ using CommandInterface::CommandInterface; explicit QueryTokenStatus(const char* type, const char* name, - CLI::App* app) : - CommandInterface(type, name, app) + CLI::App* app) : CommandInterface(type, name, app) { auto ccOptionGroup = app->add_option_group( "Required", "Query token status for the specified token type");
diff --git a/nsmtool/nsm_discovery_cmd.cpp b/nsmtool/nsm_discovery_cmd.cpp index 6384f0c..ab8098d 100644 --- a/nsmtool/nsm_discovery_cmd.cpp +++ b/nsmtool/nsm_discovery_cmd.cpp
@@ -473,8 +473,7 @@ using CommandInterface::CommandInterface; explicit GetHistogramData(const char* type, const char* name, - CLI::App* app) : - CommandInterface(type, name, app) + CLI::App* app) : CommandInterface(type, name, app) { auto histoDataOptionGroup = app->add_option_group( "Required",
diff --git a/nsmtool/nsm_firmware_cmd.cpp b/nsmtool/nsm_firmware_cmd.cpp index 3b00316..ea93e2c 100644 --- a/nsmtool/nsm_firmware_cmd.cpp +++ b/nsmtool/nsm_firmware_cmd.cpp
@@ -721,8 +721,7 @@ case QUERY_IRREVERSIBLE_CFG: { struct nsm_firmware_irreversible_config_request_0_resp - cfg_0_resp - {}; + cfg_0_resp{}; auto rc = decode_nsm_firmware_irreversible_config_request_0_resp( responsePtr, payloadLength, &cc, &reason_code, @@ -755,8 +754,7 @@ case ENABLE_IRREVERSIBLE_CFG: { struct nsm_firmware_irreversible_config_request_2_resp - cfg_2_resp - {}; + cfg_2_resp{}; auto rc = decode_nsm_firmware_irreversible_config_request_2_resp( responsePtr, payloadLength, &cc, &reason_code,
diff --git a/nsmtool/nsm_telemetry_cmd.cpp b/nsmtool/nsm_telemetry_cmd.cpp index 394c72b..eea6ab4 100644 --- a/nsmtool/nsm_telemetry_cmd.cpp +++ b/nsmtool/nsm_telemetry_cmd.cpp
@@ -461,8 +461,7 @@ using CommandInterface::CommandInterface; explicit QueryPortStatus(const char* type, const char* name, - CLI::App* app) : - CommandInterface(type, name, app) + CLI::App* app) : CommandInterface(type, name, app) { auto portStatusOptionGroup = app->add_option_group( "Required", @@ -3618,8 +3617,7 @@ using CommandInterface::CommandInterface; explicit GetCurrClockFreq(const char* type, const char* name, - CLI::App* app) : - CommandInterface(type, name, app) + CLI::App* app) : CommandInterface(type, name, app) { auto currClockFreqOptionGroup = app->add_option_group( "Required", @@ -4554,8 +4552,7 @@ { public: QueryPerInstanceGPMMetricsAggregateResponseParser( - const MetricsInfo* info) : - info(info) + const MetricsInfo* info) : info(info) {} private:
diff --git a/nsmtool/test/meson.build b/nsmtool/test/meson.build index 92edbbb..ca3c217 100644 --- a/nsmtool/test/meson.build +++ b/nsmtool/test/meson.build
@@ -13,13 +13,7 @@ '../../libnsm/requester/mctp.c', ] -dep_src_headers = [ - '.', - '..', - '../../', - '../../common', - '../../libnsm', -] +dep_src_headers = ['.', '..', '../../', '../../common', '../../libnsm'] test_src = declare_dependency( sources: dep_src_files, @@ -49,4 +43,4 @@ ), workdir: meson.current_source_dir(), ) -endforeach \ No newline at end of file +endforeach
diff --git a/requester/handler.hpp b/requester/handler.hpp index 8a37710..0bb303e 100644 --- a/requester/handler.hpp +++ b/requester/handler.hpp
@@ -100,9 +100,8 @@ uint8_t numRetries = static_cast<uint8_t>(NUMBER_OF_REQUEST_RETRIES), std::chrono::milliseconds responseTimeOut = std::chrono::milliseconds(RESPONSE_TIME_OUT)) : - event(event), - instanceIdDb(instanceIdDb), sockManager(sockManager), verbose(verbose), - instanceIdExpiryInterval(instanceIdExpiryInterval), + event(event), instanceIdDb(instanceIdDb), sockManager(sockManager), + verbose(verbose), instanceIdExpiryInterval(instanceIdExpiryInterval), numRetries(numRetries), responseTimeOut(responseTimeOut), socketHandler(nullptr) {} @@ -492,8 +491,7 @@ SendRecvNsmMsg(RequesterHandler& handler, eid_t eid, std::vector<uint8_t>& request, const nsm_msg** responseMsg, size_t* responseLen) : - handler(handler), - eid(eid), request(request), responseMsg(responseMsg), + handler(handler), eid(eid), request(request), responseMsg(responseMsg), responseLen(responseLen), rc(NSM_ERROR) {}
diff --git a/requester/request.hpp b/requester/request.hpp index 28af08d..1293b03 100644 --- a/requester/request.hpp +++ b/requester/request.hpp
@@ -72,8 +72,7 @@ explicit RequestRetryTimer(sdeventplus::Event& event, uint8_t numRetries, std::chrono::milliseconds timeout) : - event(event), - numRetries(numRetries), timeout(timeout), + event(event), numRetries(numRetries), timeout(timeout), timer(event.get(), std::bind_front(&RequestRetryTimer::callback, this)) {} @@ -177,9 +176,9 @@ const mctp_socket::Handler* handler, std::vector<uint8_t>&& requestMsg, uint8_t numRetries, std::chrono::milliseconds timeout, bool verbose) : - RequestRetryTimer(event, numRetries, timeout), - fd(fd), eid(eid), tag(tag), requestMsg(std::move(requestMsg)), - verbose(verbose), socketHandler(handler) + RequestRetryTimer(event, numRetries, timeout), fd(fd), eid(eid), + tag(tag), requestMsg(std::move(requestMsg)), verbose(verbose), + socketHandler(handler) {} uint8_t getInstanceId()
diff --git a/services/meson.build b/services/meson.build index b099fdd..7c2db9a 100644 --- a/services/meson.build +++ b/services/meson.build
@@ -1,6 +1,4 @@ -unit_files = [ - 'nsmd.service', -] +unit_files = ['nsmd.service'] foreach unit : unit_files @@ -12,4 +10,4 @@ install_dir: systemd_system_unit_dir, ) -endforeach \ No newline at end of file +endforeach