f9886b9f | 07-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Suppress pessimizing-move warning
This commit introduces a temporary fix to suppress the "moving a temporary object prevents copy elision" warning using pragma directives. This is necess
clang-tidy: Suppress pessimizing-move warning
This commit introduces a temporary fix to suppress the "moving a temporary object prevents copy elision" warning using pragma directives. This is necessary to support the ongoing Clang-Tidy migration.
''' power-supply/record_manager.cpp:83:28: error: moving a temporary object prevents copy elision [-Werror 1m/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/functional:552:2: error: 'result_of<(lambda at ../power-supply/power_supply.cpp:50:31) &()>' is deprecated: use 'std::invoke_result' instead [-Werror 1m/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/functional:552:2: error: 'result_of<(lambda at ../power-supply/power_supply.cpp:62:31) &()>' is deprecated: use 'std::invoke_result' instead [-Werror '''
Changes: - Added pragma directives to suppress the -Wpessimizing-move warning in specific code sections.
Tested: Build and unit testing verified.
Change-Id: I464674a5da5992368627a6b2f54fabc65c402aea Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
f5402197 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I7b90380845efee6bf6a1fe342a793d71aa9ff181 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5c6a693e | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I37fcb391dcb215a86a60c26f7512f6ccb8312dc4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
319b0ddd | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I49d4d5d177ce54d7e1bff7d734666a3a935b38a0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
9c446cda | 01-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: add cli11 dependency as necessary
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie18e6ed2ee8d0f0ecdb7a6f328ba3209b2fcd61c |
b60823fa | 14-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
power-supply: Replace Argument class with CLI11
Phosphor-power already depends on cli11, delete Argument class and use cli11 instead.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4ca
power-supply: Replace Argument class with CLI11
Phosphor-power already depends on cli11, delete Argument class and use cli11 instead.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4caebf3f9fcb432fd1a80535b9b067aab66b1b71
show more ...
|
888bebde | 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: add necessary subprojects
Add subprojects for all the direct dependencies of the project such that the project can be built outside of a Yocto SDK on a typical Linux development system.
-
meson: add necessary subprojects
Add subprojects for all the direct dependencies of the project such that the project can be built outside of a Yocto SDK on a typical Linux development system.
- Update the .gitignore to ignore the subproject source directories. - Update the .gitignore to ignore alternative build subdirectory names as is typical with most projects in the openbmc organization. - Add wrap files for direct dependencies, copied from other repositories that already have the same dependencies. - Modify the meson.build dependency for libgpiod so that the C++ bindings are included. - Add many missing dependencies throughout. - Sort all dependencies alphabetically for consistency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0feb6f0f175e6dba0b00a2c2b666eb0801575734
show more ...
|
41a6b9f3 | 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
remove unnecessary std::move calls
GCC 13 now flags a std::move of an returned temporary as unnecessary and likely preventing RVO. Remove the unnecessary std::move.
Signed-off-by: Patrick Williams
remove unnecessary std::move calls
GCC 13 now flags a std::move of an returned temporary as unnecessary and likely preventing RVO. Remove the unnecessary std::move.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibde052b5a4efd84bdbbac2f2f6e673729b32e6cd
show more ...
|
48781aef | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: If66f68c96df4baf8dc07abf8729a3cb7657e932d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
86433ae8 | 28-Feb-2023 |
George Liu <liuxiwei@inspur.com> |
power-supply: Fix warning by cppcheck
style: Class 'RecordManager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] RecordManager(size_t maxRec):RecordManager(maxRec,
power-supply: Fix warning by cppcheck
style: Class 'RecordManager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] RecordManager(size_t maxRec):RecordManager(maxRec, LAST_SEQUENCE_ID) ^
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I794f90968beb5ead2fb9612eb5a02284bcbfa659
show more ...
|
7354ce62 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ief05bd757cffb1453e058a719ee4b060861752e7
show more ...
|
c1d4de5e | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If6aba71f482f75143e6d669763b8853db22318cf |
0c9a33d6 | 13-Sep-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
clang updates
The openbmc CI was recently updated to clang-12 which requires some formatting updates to the code: https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be048242690
clang updates
The openbmc CI was recently updated to clang-12 which requires some formatting updates to the code: https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be0482426908bb5497fad08
Make those updates and refresh the clang-format file with the one from docs: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Change-Id: Ieb3626526373a053ec84431e7560003f229f338d Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
070c1bc6 | 11-Oct-2020 |
George Liu <liuxiwei@inspur.com> |
Update OperationalStatus interface according to the Present property value
When the Present property value changes, the corresponding OperationalStatus interface needs to be updated at the same time
Update OperationalStatus interface according to the Present property value
When the Present property value changes, the corresponding OperationalStatus interface needs to be updated at the same time. Refer to: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/ openbmc_project/State/Decorator/OperationalStatus.interface.yaml
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I9eee9196125cf82605b20009b49a3ed7f65be53a
show more ...
|
6687f125 | 02-Jun-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
power-supply: Fix variant build issue
The data type sdbusplus::message::variant has been removed. Most of the instances of usage within the phosphor-power repository were already changed to std::va
power-supply: Fix variant build issue
The data type sdbusplus::message::variant has been removed. Most of the instances of usage within the phosphor-power repository were already changed to std::variant. However, there was one remaining instance that needs to be fixed.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie763530fa01a2917c220ff34537e5c8c3db8d25e
show more ...
|
abe49418 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I96011a7be0c4577617fdbfcd95ffbc5a3177be49 |
365d61c6 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I369662a8ebaac80417cd75be26cc11a2f0dab535 |
01779a6a | 16-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
include needed file for runtime_error
Upstream yocto appears to have removed a free include that provided the def of the std::runtime_error. This causes compile failures when bringing in the new yoc
include needed file for runtime_error
Upstream yocto appears to have removed a free include that provided the def of the std::runtime_error. This causes compile failures when bringing in the new yocto.
Change-Id: I0d38ee2426999f6807b1d8f1f968bc3adb158dfe Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
c60b9751 | 16-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
include needed file for 64 bit defs
Upstream yocto appears to have removed a free include that provided the def of the int64_t/uint64_t typedefs. This causes compile failures when bringing in the ne
include needed file for 64 bit defs
Upstream yocto appears to have removed a free include that provided the def of the int64_t/uint64_t typedefs. This causes compile failures when bringing in the new yocto.
Change-Id: I0407ee4fc0f20ceb85a1502a45bcd735b8a5dc14 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
dc8e9312 | 14-Feb-2020 |
Brandon Wyman <bjwyman@gmail.com> |
Add OE-SDK option to Meson
Add option to enable oe-sdk which will setup linker arguments to allow for building and running tests with the x86 SDK.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> C
Add OE-SDK option to Meson
Add option to enable oe-sdk which will setup linker arguments to allow for building and running tests with the x86 SDK.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I8279b7d862e29235d2d4eae39405cc35a51b762f
show more ...
|
ff481438 | 13-Feb-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
Only build tests if -Dtests=enabled specified
A meson build option named 'tests' is defined for this repository. It indicates whether gtest/gmock tests should be built.
However, some tests are cur
Only build tests if -Dtests=enabled specified
A meson build option named 'tests' is defined for this repository. It indicates whether gtest/gmock tests should be built.
However, some tests are currently always built even if -Dtests=enabled isn't specified. This causes build errors in some environments where gtest and gmock are not available.
Modify meson.build files to only descend into 'test' subdirectories and build test cases if -Dtests=enabled was specified.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ic0da2326e3d9c273ff76d54b5ac27cbe00d78876
show more ...
|
3d1ebcb4 | 05-Jan-2020 |
Lei YU <mine260309@gmail.com> |
power-supply: Remove version interface
In power supply monitor, a version interface is created in the PSU object in inventory (/xyz/openbmc_project/inventory).
With PSU code manager implemented in
power-supply: Remove version interface
In power supply monitor, a version interface is created in the PSU object in inventory (/xyz/openbmc_project/inventory).
With PSU code manager implemented in OpenBMC, the version object is created under software (/xyz/openbmc_project/software), so the version interface in inventory is not necessary anymore.
Tested: Verify the version and purpose do not exist anymore in /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply[0|1] on Witherspoon, after factory reset.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: If61762a79195998a25c56aeec50af724f049ab4f
show more ...
|
d1bc4cec | 13-Dec-2019 |
Brandon Wyman <bjwyman@gmail.com> |
Update .clang-format to latest version from docs
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ie6e7f43e7554429704dca86b21320c90aed18791 |
cfc040c7 | 29-Oct-2019 |
Lei YU <mine260309@gmail.com> |
Refactor: Move isPoweredOn to utility
The check of power on will be used by other components, so move it to utility. There are several constexpr definitions are used by multiple components, move the
Refactor: Move isPoweredOn to utility
The check of power on will be used by other components, so move it to utility. There are several constexpr definitions are used by multiple components, move them into types.hpp so that we do not have duplicated constexprs.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I42ad142d6e7ae8da9c0cf6d8f5cb21dee229eba2
show more ...
|
4070546e | 09-Oct-2019 |
Lei YU <mine260309@gmail.com> |
Refactor: move get pmbus access type to utility
The function to get the pmbus access type is common, move it to utility.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I26e7da044c88c1efba1
Refactor: move get pmbus access type to utility
The function to get the pmbus access type is common, move it to utility.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I26e7da044c88c1efba141349ee4c18b24cdef81f
show more ...
|