diff --git a/module/thermal_mgmt/src/mod_thermal_mgmt.c b/module/thermal_mgmt/src/mod_thermal_mgmt.c index 1b380fa26ba61edc61130e05c1bfbc627a5da404..8d2fd04211b8c8e2d89f8b513ea52e867af1ea45 100644 --- a/module/thermal_mgmt/src/mod_thermal_mgmt.c +++ b/module/thermal_mgmt/src/mod_thermal_mgmt.c @@ -98,6 +98,9 @@ struct mod_thermal_mgmt_ctx { /* Table of thermal actors */ struct mod_thermal_mgmt_dev_ctx *dev_ctx_table; + + /* Sensor data */ + struct mod_sensor_data sensor_data; }; #if THERMAL_HAS_ASYNC_SENSORS @@ -377,9 +380,10 @@ static int read_temperature(void) int status; uint64_t value; - status = mod_ctx.sensor_api->get_value(mod_ctx.config->sensor_id, &value); + status = mod_ctx.sensor_api->get_data( + mod_ctx.config->sensor_id, &mod_ctx.sensor_data); if (status == FWK_SUCCESS) { - mod_ctx.cur_temp = (uint32_t)value; + mod_ctx.cur_temp = (uint32_t)mod_ctx.sensor_data.value; mod_ctx.pi_control_needs_update = true; } @@ -573,23 +577,19 @@ static int thermal_mgmt_process_event( const struct fwk_event *event, struct fwk_event *resp_event) { - struct mod_sensor_event_params *params; - uint64_t value; int status; if (fwk_id_is_equal(event->id, mod_thermal_event_id_read_temp)) { /* Temperature-reading event */ - status = - mod_ctx.sensor_api->get_value(mod_ctx.config->sensor_id, &value); + status = mod_ctx.sensor_api->get_data( + mod_ctx.config->sensor_id, &mod_ctx.sensor_data); if (status == FWK_SUCCESS) { - mod_ctx.cur_temp = (uint32_t)value; + mod_ctx.cur_temp = (uint32_t)mod_ctx.sensor_data.value; } } else if (fwk_id_is_equal(event->id, mod_sensor_event_id_read_request)) { /* Response event from Sensor HAL */ - params = (struct mod_sensor_event_params *)event->params; - - if (params->status == FWK_SUCCESS) { - mod_ctx.cur_temp = (uint32_t)params->value; + if (mod_ctx.sensor_data.status == FWK_SUCCESS) { + mod_ctx.cur_temp = (uint32_t)mod_ctx.sensor_data.value; status = FWK_SUCCESS; } else { status = FWK_E_DEVICE; diff --git a/module/traffic_cop/include/mod_traffic_cop.h b/module/traffic_cop/include/mod_traffic_cop.h index 26cbcdb10eb9cc6f051a8ddfc0b83dbfb6f455c3..7f2231c65ea2bf4d72223007f2a26d24a2d21018 100644 --- a/module/traffic_cop/include/mod_traffic_cop.h +++ b/module/traffic_cop/include/mod_traffic_cop.h @@ -6,12 +6,12 @@ */ #ifndef MOD_TRAFFIC_COP_H -# define MOD_TRAFIC_COP_H +#define MOD_TRAFFIC_COP_H -# include +#include -# include -# include +#include +#include /*! * \ingroup GroupModules diff --git a/module/traffic_cop/src/mod_traffic_cop.c b/module/traffic_cop/src/mod_traffic_cop.c index f872551a2591d0ec5a08e421b40d0c9d6cfc6efa..f67fac5adf294e9dcd099c34b6ab13aa43ac8de3 100644 --- a/module/traffic_cop/src/mod_traffic_cop.c +++ b/module/traffic_cop/src/mod_traffic_cop.c @@ -95,7 +95,7 @@ static uint32_t tcop_evaluate_perf_limit(struct mod_tcop_domain_ctx *ctx) FWK_LOG_WARN( "[TRAFFIC_COP] No entry found in the PCT for %ld online cores", - ctx->num_cores_online); + (long)ctx->num_cores_online); return 0; } diff --git a/tools/cppcheck_suppress_list.txt b/tools/cppcheck_suppress_list.txt index 43ea80a4dc7912f305fa7fb9031de09c56100231..11c5dbef22ef54ea12345d14d3b4cd75d048fe42 100755 --- a/tools/cppcheck_suppress_list.txt +++ b/tools/cppcheck_suppress_list.txt @@ -65,13 +65,16 @@ nullPointerRedundantCheck:*module/dmc500/src/mod_dmc500.c:65 nullPointerRedundantCheck:*module/mhu2/src/mod_mhu2.c:74 nullPointerRedundantCheck:*module/pl011/src/mod_pl011.c:139 nullPointerRedundantCheck:*module/pl011/src/mod_pl011.c:140 +nullPointerRedundantCheck:*module/ppu_v1/src/mod_ppu_v1.c:609 nullPointerRedundantCheck:*module/ppu_v1/src/mod_ppu_v1.c:620 +nullPointerRedundantCheck:*module/ppu_v1/src/mod_ppu_v1.c:642 nullPointerRedundantCheck:*module/ppu_v1/src/mod_ppu_v1.c:953 nullPointerRedundantCheck:*module/ppu_v1/src/mod_ppu_v1.c:954 nullPointerRedundantCheck:*module/reg_sensor/src/mod_reg_sensor.c:52 nullPointerRedundantCheck:*module/sds/src/mod_sds.c:273 nullPointerRedundantCheck:*module/sds/src/mod_sds.c:279 nullPointerRedundantCheck:*module/timer/src/mod_timer.c:541 +nullPointerRedundantCheck:*module/timer/src/mod_timer.c:551 nullPointerRedundantCheck:*module/timer/src/mod_timer.c:546 nullPointerRedundantCheck:*product/n1sdp/module/n1sdp_dmc620/src/mod_n1sdp_dmc620.c:1275 nullPointerRedundantCheck:*product/n1sdp/module/n1sdp_dmc620/src/mod_n1sdp_dmc620.c:1276