Replace printf/fprintf with pr_xxx

Libraries normally don't print messages. We use pr_err, pr_warn,
pr_info, and pr_debug to print messages to stderr when prints are
enabled for debugging.

Change-Id: I9caf719343aa618c88e7b500f9737a46702e424a
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Este commit está contenido en:
Amber Lin
2017-06-27 16:42:18 -04:00
padre ccfe739929
commit 897c4e2fff
Se han modificado 6 ficheros con 49 adiciones y 60 borrados
+3 -4
Ver fichero
@@ -141,7 +141,7 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtOpenKFD(void)
goto init_doorbell_failed;
if (init_device_debugging_memory(sys_props.NumNodes) != HSAKMT_STATUS_SUCCESS)
printf("Insufficient Memory. Debugging unavailable\n");
pr_warn("Insufficient Memory. Debugging unavailable\n");
mask = umask(0); /* save the current umask */
/* We don't want the existing umask to mask out S_IWOTH */
@@ -151,11 +151,10 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtOpenKFD(void)
0666);
umask(mask); /* restore the original umask */
if (amd_hsa_thunk_lock_fd < 0)
fprintf(stderr,
"Profiling of privileged counters is not available\n");
pr_warn("Profiling of privileged counters is not available\n");
if (init_counter_props(sys_props.NumNodes) !=
HSAKMT_STATUS_SUCCESS)
fprintf(stderr, "Profiling is not available\n");
pr_warn("Profiling is not available\n");
} else {
kfd_open_count++;
result = HSAKMT_STATUS_SUCCESS;