Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
slabasan committed Jan 7, 2024
1 parent 7bf30e8 commit 7cf60b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/examples/variorum-get-node-frequency-json-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include <variorum.h>


int main(int argc, char **argv)
{
int ret;
Expand Down
2 changes: 0 additions & 2 deletions src/variorum/AMD_GPU/amd_gpu_power_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ void get_clocks_data(int chipid, int total_sockets, int verbose, FILE *output)

void get_clocks_json(int chipid, int total_sockets, json_t *output)
{

rsmi_status_t ret;
uint32_t num_devices;
int gpus_per_socket;
Expand All @@ -596,7 +595,6 @@ void get_clocks_json(int chipid, int total_sockets, json_t *output)
VARIORUM_ERROR_PLATFORM_ENV,
getenv("HOSTNAME"), __FILE__, __FUNCTION__,
__LINE__);
exit(-1);
}

ret = rsmi_num_monitor_devices(&num_devices);
Expand Down
2 changes: 0 additions & 2 deletions src/variorum/IBM/Power9.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,13 +598,11 @@ int ibm_cpu_p9_get_node_frequency_json(json_t *get_frequency_obj_json)
return -1;
}


for (iter = 0; iter < nsockets; iter++)
{
lseek(fd, iter * OCC_SENSOR_DATA_BLOCK_SIZE, SEEK_SET);

buf = malloc(OCC_SENSOR_DATA_BLOCK_SIZE);

if (!buf)
{
printf("Failed to allocate\n");
Expand Down
7 changes: 7 additions & 0 deletions src/variorum/variorum.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,13 @@ int variorum_get_node_power_domain_info_json(char **get_domain_obj_str);
/// - AMD Instinct
/// - Nvidia Volta
/// - IBM Power9
///
/// @param [out] get_frequency_obj_str String (passed by reference) that contains the
/// node-level frequency information.
///
/// @return 0 if successful, otherwise -1. Note that feature not implemented
/// returns a -1 for the JSON APIs so that users don't have to explicitly
/// check for NULL strings.
int variorum_get_node_frequency_json(char **get_frequency_obj_str);

/// @brief Populate a string in nested JSON format for temperature readouts
Expand Down

0 comments on commit 7cf60b3

Please sign in to comment.