From cf2b8938822934508adaa7cbf09dca66f1937f61 Mon Sep 17 00:00:00 2001 From: Tapasya Patki Date: Sun, 3 Mar 2024 20:00:00 -0800 Subject: [PATCH] Change uint64_t assignments from -1 to 0. Change one matching double assignment from -1 to 0. Needs testing on corona. --- src/variorum/AMD_GPU/amd_gpu_power_features.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/variorum/AMD_GPU/amd_gpu_power_features.c b/src/variorum/AMD_GPU/amd_gpu_power_features.c index ba29d9d95..a23bd10f8 100644 --- a/src/variorum/AMD_GPU/amd_gpu_power_features.c +++ b/src/variorum/AMD_GPU/amd_gpu_power_features.c @@ -199,8 +199,8 @@ void get_power_limit_data(int chipid, int total_sockets, int verbose, for (int i = chipid * gpus_per_socket; i < (chipid + 1) * gpus_per_socket; i++) { - uint64_t pwr_val = -1, pwr_min = -1, pwr_max = -1; - double pwr_val_flt = -1.0; + uint64_t pwr_val = 0, pwr_min = 0, pwr_max = 0; + double pwr_val_flt = 0.0; ret = rsmi_dev_power_cap_get(i, 0, &pwr_val); if (ret != RSMI_STATUS_SUCCESS) @@ -963,7 +963,7 @@ void get_json_power_data(json_t *get_power_obj, int total_sockets) int chipid; uint32_t num_devices; int gpus_per_socket; - uint64_t pwr_val = -1; + uint64_t pwr_val = 0; double pwr_val_flt = 0.0; double total_gpu_power = 0.0; int d;