Skip to content

Commit

Permalink
Code cleanup: change uint64_t assignments from -1 to 0. (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Mar 5, 2024
1 parent f7bb01f commit 6c79e5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/variorum/AMD_GPU/amd_gpu_power_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6c79e5a

Please sign in to comment.