From 895406131285ce3bc7950287be1577adedfdae0a Mon Sep 17 00:00:00 2001 From: Dongju Chae Date: Tue, 26 Nov 2019 21:53:23 +0900 Subject: [PATCH] [LOG] Remove unnecessary logs and fix some log typos This commit removes unnecessary logs and fixes some log typos. Signed-off-by: Dongju Chae --- src/core/ne-host-input-service.c | 14 +++++++------- src/core/ne-mem.c | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/core/ne-host-input-service.c b/src/core/ne-host-input-service.c index 2782e55..47f26a2 100644 --- a/src/core/ne-host-input-service.c +++ b/src/core/ne-host-input-service.c @@ -29,7 +29,7 @@ /** Enables debug level logs for NPU hardware */ #ifndef DEBUG -#define DEBUG 1 +#define DEBUG 0 #endif /** Tag for logging */ @@ -202,7 +202,7 @@ static void* loopHostService (void *data) npriv->opmode == NPUINPUT_HOST) { pthread_cond_wait (&npriv->proc_thread.cond, &npriv->proc_thread.mutex); if (npriv->proc_thread.state == HALT_REQUESTED) { - loginfo (TAG, "Service halted with HALT_NOW"); + loginfo (TAG, "Service halted with HALT_NOW\n"); goto exit; } } @@ -211,7 +211,7 @@ static void* loopHostService (void *data) status = npu_check_compute_ready(npriv->fd); if (status == -EBUSY && npriv->opmode == NPUINPUT_HOST) { /** TODO: Later change to not-error and add wait for ready here */ - logerr (TAG, "Device busy by other application??"); + logerr (TAG, "Device busy by other application??\n"); npriv->proc_thread.state = ERROR; goto exit; } else if (status < 0) { @@ -225,12 +225,12 @@ static void* loopHostService (void *data) /** use the information from npriv->proc_thread */ status = buffer_get_hwmem(npriv->proc_thread.buffer, &hwmem_ptr); if (status < 0) { - logerr (TAG, "Getting hwmem failed, errno: \n", status); + logerr (TAG, "Getting hwmem failed, errno: %d\n", status); npriv->proc_thread.state = ERROR; goto exit; } if ((status = hwmem_get_offset(hwmem_ptr, &hwmem_offset)) < 0) { - logerr (TAG, "Getting hwmem failed, errno: \n", status); + logerr (TAG, "Getting hwmem offset failed, errno: %d\n", status); npriv->proc_thread.state = ERROR; goto exit; } @@ -441,7 +441,7 @@ static n40_status getStatusHost (inputservice *me) { int status; n40_status nstatus; -#ifdef DEBUG +#if DEBUG == 1 struct srnpu_status_arg * npu_status; #endif host_inservice_priv *npriv; @@ -449,7 +449,7 @@ static n40_status getStatusHost (inputservice *me) npriv = HOST_PRIV (me); assert (npriv); -#ifdef DEBUG +#if DEBUG == 1 npu_status = npu_get_status (npriv->fd); if (npu_status != NULL) { loginfo(TAG, "CP_INFO: %x\n", npu_status->cp_info); diff --git a/src/core/ne-mem.c b/src/core/ne-mem.c index f8166ef..7986b51 100644 --- a/src/core/ne-mem.c +++ b/src/core/ne-mem.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -1728,8 +1727,6 @@ mem_reset_buffer (buffer *buffer) MEM_LOCK(); - fprintf (stderr, "buffer reset %d->0, ref_count %d\n", priv->state, priv->ref_count); - priv->state = BUFFER_STATE_EMPTY; priv->ref_count = 0; -- 2.7.4