Skip to content

Commit

Permalink
fix(system_monitor): fix unusedStructMember (#8401)
Browse files Browse the repository at this point in the history
* fix:unusedStructMember

Signed-off-by: kobayu858 <[email protected]>

* fix:clang format

Signed-off-by: kobayu858 <[email protected]>

* fix:clang format

Signed-off-by: kobayu858 <[email protected]>

---------

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Aug 9, 2024
1 parent e0fa943 commit 7a4cb68
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 28 deletions.
39 changes: 24 additions & 15 deletions system/system_monitor/reader/hdd_reader/hdd_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,34 @@ constexpr int PORT = 7635;
*/
struct AtaPassThrough12
{
uint8_t operation_code_; //!< @brief OPERATION CODE (A1h)
uint8_t reserved0_ : 1; //!< @brief Reserved
uint8_t protocol_ : 4; //!< @brief PROTOCOL
uint8_t operation_code_; //!< @brief OPERATION CODE (A1h)
// cppcheck-suppress unusedStructMember
uint8_t reserved0_ : 1; //!< @brief Reserved
uint8_t protocol_ : 4; //!< @brief PROTOCOL
// cppcheck-suppress unusedStructMember
uint8_t multiple_count_ : 3; //!< @brief MULTIPLE_COUNT
uint8_t t_length_ : 2; //!< @brief T_LENGTH
uint8_t byt_blok_ : 1; //!< @brief BYT_BLOK
uint8_t t_dir_ : 1; //!< @brief T_DIR
uint8_t reserved1_ : 1; //!< @brief Reserved
uint8_t ck_cond_ : 1; //!< @brief CK_COND
uint8_t off_line_ : 2; //!< @brief OFF_LINE
uint8_t features_; //!< @brief FEATURES (0:7)
uint8_t sector_count_; //!< @brief SECTOR_COUNT (0:7)
uint8_t lba_low_; //!< @brief LBA_LOW (0:7)
uint8_t lba_mid_; //!< @brief LBA_MID (0:7)
uint8_t lbe_high_; //!< @brief LBE_HIGH (0:7)
uint8_t device_; //!< @brief DEVICE
uint8_t command_; //!< @brief COMMAND
uint8_t reserved2_; //!< @brief Reserved
uint8_t control_; //!< @brief CONTROL
// cppcheck-suppress unusedStructMember
uint8_t reserved1_ : 1; //!< @brief Reserved
// cppcheck-suppress unusedStructMember
uint8_t ck_cond_ : 1; //!< @brief CK_COND
// cppcheck-suppress unusedStructMember
uint8_t off_line_ : 2; //!< @brief OFF_LINE
uint8_t features_; //!< @brief FEATURES (0:7)
uint8_t sector_count_; //!< @brief SECTOR_COUNT (0:7)
// cppcheck-suppress unusedStructMember
uint8_t lba_low_; //!< @brief LBA_LOW (0:7)
uint8_t lba_mid_; //!< @brief LBA_MID (0:7)
uint8_t lbe_high_; //!< @brief LBE_HIGH (0:7)
// cppcheck-suppress unusedStructMember
uint8_t device_; //!< @brief DEVICE
uint8_t command_; //!< @brief COMMAND
// cppcheck-suppress unusedStructMember
uint8_t reserved2_; //!< @brief Reserved
// cppcheck-suppress unusedStructMember
uint8_t control_; //!< @brief CONTROL
};

/**
Expand Down
40 changes: 27 additions & 13 deletions system/system_monitor/reader/msr_reader/msr_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,36 @@ constexpr int PORT = 7634;
*/
typedef struct
{
uint64_t pkg_thermal_status_ : 1; //!< @brief 0 Pkg Thermal Status (RO)
uint64_t pkg_thermal_status_log_ : 1; //!< @brief 1 Pkg Thermal Status Log (R/W)
uint64_t pkg_prochot_event_ : 1; //!< @brief 2 Pkg PROCHOT # event (RO)
uint64_t pkg_prochot_log_ : 1; //!< @brief 3 Pkg PROCHOT # log (R/WC0)
uint64_t pkg_thermal_status_ : 1; //!< @brief 0 Pkg Thermal Status (RO)
// cppcheck-suppress unusedStructMember
uint64_t pkg_thermal_status_log_ : 1; //!< @brief 1 Pkg Thermal Status Log (R/W)
// cppcheck-suppress unusedStructMember
uint64_t pkg_prochot_event_ : 1; //!< @brief 2 Pkg PROCHOT # event (RO)
// cppcheck-suppress unusedStructMember
uint64_t pkg_prochot_log_ : 1; //!< @brief 3 Pkg PROCHOT # log (R/WC0)
// cppcheck-suppress unusedStructMember
uint64_t pkg_critical_temperature_status_ : 1; //!< @brief 4 Pkg Critical Temperature Status (RO)
uint64_t //!< @brief 5 Pkg Critical Temperature
// cppcheck-suppress unusedStructMember
pkg_critical_temperature_status_log_ : 1; //!< Status Log (R/WC0)
uint64_t pkg_thermal_threshold_1_status_ : 1; //!< @brief 6 Pkg Thermal Threshold #1 Status (RO)
uint64_t pkg_thermal_threshold_1_log_ : 1; //!< @brief 7 Pkg Thermal Threshold #1 log (R/WC0)
uint64_t pkg_thermal_threshold_2_status_ : 1; //!< @brief 8 Pkg Thermal Threshold #2 Status (RO)
uint64_t pkg_thermal_threshold_2_log_ : 1; //!< @brief 9 Pkg Thermal Threshold #2 log (R/WC0)
uint64_t pkg_power_limitation_status_ : 1; //!< @brief 10 Pkg Power Limitation Status (RO)
uint64_t pkg_power_limitation_log_ : 1; //!< @brief 11 Pkg Power Limitation log (R/WC0)
uint64_t reserved1_ : 4; //!< @brief 15:12 Reserved
uint64_t pkg_digital_readout_ : 7; //!< @brief 22:16 Pkg Digital Readout (RO)
uint64_t reserved2_ : 41; //!< @brief 63:23 Reserved
// cppcheck-suppress unusedStructMember
uint64_t pkg_thermal_threshold_1_status_ : 1; //!< @brief 6 Pkg Thermal Threshold #1 Status (RO)
// cppcheck-suppress unusedStructMember
uint64_t pkg_thermal_threshold_1_log_ : 1; //!< @brief 7 Pkg Thermal Threshold #1 log (R/WC0)
// cppcheck-suppress unusedStructMember
uint64_t pkg_thermal_threshold_2_status_ : 1; //!< @brief 8 Pkg Thermal Threshold #2 Status (RO)
// cppcheck-suppress unusedStructMember
uint64_t pkg_thermal_threshold_2_log_ : 1; //!< @brief 9 Pkg Thermal Threshold #2 log (R/WC0)
// cppcheck-suppress unusedStructMember
uint64_t pkg_power_limitation_status_ : 1; //!< @brief 10 Pkg Power Limitation Status (RO)
// cppcheck-suppress unusedStructMember
uint64_t pkg_power_limitation_log_ : 1; //!< @brief 11 Pkg Power Limitation log (R/WC0)
// cppcheck-suppress unusedStructMember
uint64_t reserved1_ : 4; //!< @brief 15:12 Reserved
// cppcheck-suppress unusedStructMember
uint64_t pkg_digital_readout_ : 7; //!< @brief 22:16 Pkg Digital Readout (RO)
// cppcheck-suppress unusedStructMember
uint64_t reserved2_ : 41; //!< @brief 63:23 Reserved
} PackageThermalStatus;

/**
Expand Down

0 comments on commit 7a4cb68

Please sign in to comment.