libhsakmt: Fix and simplify debug_get_reg_status
The NULL pointer check was the only way for that function to fail. And it
was done after the pointer was accessed. Simplify this by just returning
the result as a return value instead of using a pointer as output
parameter. This way the function can never fail and the caller doesn't
need to do any error handling.
Declare the function in libhsakmt.h instead of duplicating the
declaration in fmm.c.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I91b90d66166fd3b5cdc47c73a9bbc369c45b51fe
[ROCm/ROCR-Runtime commit: 2d53430ce3]
This commit is contained in:
@@ -191,6 +191,7 @@ HSAKMT_STATUS init_process_doorbells(unsigned int NumNodes);
|
||||
void destroy_process_doorbells(void);
|
||||
HSAKMT_STATUS init_device_debugging_memory(unsigned int NumNodes);
|
||||
void destroy_device_debugging_memory(void);
|
||||
bool debug_get_reg_status(uint32_t node_id);
|
||||
HSAKMT_STATUS init_counter_props(unsigned int NumNodes);
|
||||
void destroy_counter_props(void);
|
||||
uint32_t *convert_queue_ids(HSAuint32 NumQueues, HSA_QUEUEID *Queues);
|
||||
|
||||
Reference in New Issue
Block a user