Remove unnecessary new line 29/297329/1 accepted/tizen/8.0/unified/20231005.094222 accepted/tizen/unified/20230818.054607 tizen_8.0_m2_release
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 17 Aug 2023 03:22:20 +0000 (12:22 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 17 Aug 2023 03:22:35 +0000 (12:22 +0900)
Change-Id: Id5e39d8dd60ee1c145efe11adc95f67ef1a2510d

14 files changed:
include/tbm_log.h
src/tbm_backend.c
src/tbm_bo.c
src/tbm_bufmgr.c
src/tbm_bufmgr_backend.c
src/tbm_drm_helper_client.c
src/tbm_drm_helper_server.c
src/tbm_dummy_display.c
src/tbm_log.c
src/tbm_module.c
src/tbm_surface.c
src/tbm_surface_internal.c
src/tbm_surface_queue.c
src/tbm_sync.c

index d133933..94d6e78 100644 (file)
@@ -116,26 +116,26 @@ void tbm_log_print_stdout(int level, const char *fmt, ...);
 /* check condition */
 #define TBM_RETURN_IF_FAIL(cond) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                return;\
        } \
 }
 #define TBM_RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                return val;\
        } \
 }
 #define TBM_GOTO_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                goto val;\
        } \
 }
 
 #define TBM_RETURN_SET_ERR_IF_FAIL(cond, error, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                error = error_type;\
                return;\
        } \
@@ -143,7 +143,7 @@ void tbm_log_print_stdout(int level, const char *fmt, ...);
 
 #define TBM_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                error = error_type;\
                return val;\
        } \
@@ -151,7 +151,7 @@ void tbm_log_print_stdout(int level, const char *fmt, ...);
 
 #define TBM_GOTO_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                error = error_type;\
                goto val;\
        } \
index 4da842c..b1bc692 100644 (file)
@@ -68,7 +68,7 @@ tbm_backend_bufmgr_alloc_bufmgr_func(tbm_bufmgr bufmgr, tbm_error_e *error)
 
        bufmgr_func = calloc(1, sizeof(struct _tbm_backend_bufmgr_func));
        if (!bufmgr_func) {
-               TBM_ERR("error: fail to allocate the tbm_backend_bufmgr_func\n");
+               TBM_ERR("error: fail to allocate the tbm_backend_bufmgr_func");
                if (error)
                        *error = TBM_ERROR_OUT_OF_MEMORY;
                return NULL;
@@ -110,7 +110,7 @@ tbm_backend_bufmgr_alloc_bo_func(tbm_bufmgr bufmgr, tbm_error_e *error)
 
        bufmgr_bo = calloc(1, sizeof(struct _tbm_backend_bo_func));
        if (!bufmgr_bo) {
-               TBM_ERR("error: fail to allocate the tbm_backend_bo_func\n");
+               TBM_ERR("error: fail to allocate the tbm_backend_bo_func");
                if (error)
                        *error = TBM_ERROR_OUT_OF_MEMORY;
                return NULL;
index ca47734..17abfa3 100644 (file)
@@ -37,7 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 /* check condition */
 #define TBM_BO_RETURN_IF_FAIL(cond) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_bufmgr_mutex_unlock();\
                return;\
@@ -46,7 +46,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define TBM_BO_RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_bufmgr_mutex_unlock();\
                return val;\
@@ -112,7 +112,7 @@ user_data_create(unsigned long key, tbm_data_free data_free_func)
        user_data = calloc(1, sizeof(tbm_user_data));
        if (!user_data) {
                /* LCOV_EXCL_START */
-               TBM_ERR("fail to allocate an user_date\n");
+               TBM_ERR("fail to allocate an user_date");
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                return NULL;
                /* LCOV_EXCL_STOP */
@@ -192,7 +192,7 @@ _tbm_bo_lock(tbm_bo bo, int device, int opt)
                return 1;
 
        if (bo->lock_cnt < 0) {
-               TBM_ERR("error bo:%p LOCK_CNT=%d\n",
+               TBM_ERR("error bo:%p LOCK_CNT=%d",
                        bo, bo->lock_cnt);
                return 0;
        }
@@ -218,13 +218,13 @@ _tbm_bo_lock(tbm_bo bo, int device, int opt)
                        bo->lock_cnt++;
                break;
        default:
-               TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.\n",
+               TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.",
                                bo, bo->bufmgr->bo_lock_type);
                ret = 0;
                break;
        }
 
-       TBM_DBG(">> LOCK bo:%p(%d->%d)\n", bo, old, bo->lock_cnt);
+       TBM_DBG(">> LOCK bo:%p(%d->%d)", bo, old, bo->lock_cnt);
 
        return ret;
 }
@@ -255,7 +255,7 @@ _tbm_bo_unlock(tbm_bo bo)
                }
                break;
        default:
-               TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.\n",
+               TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.",
                                bo, bo->bufmgr->bo_lock_type);
                break;
        }
@@ -263,7 +263,7 @@ _tbm_bo_unlock(tbm_bo bo)
        if (bo->lock_cnt < 0)
                bo->lock_cnt = 0;
 
-       TBM_DBG(">> UNLOCK bo:%p(%d->%d)\n", bo, old, bo->lock_cnt);
+       TBM_DBG(">> UNLOCK bo:%p(%d->%d)", bo, old, bo->lock_cnt);
 }
 
 static int
@@ -279,12 +279,12 @@ static int
 _tbm_bo_is_valid(tbm_bo bo)
 {
        if (!bo) {
-               TBM_ERR("error: bo is NULL.\n");
+               TBM_ERR("error: bo is NULL.");
                return 0;
        }
 
        if (!_tbm_bo_magic_check(bo)) {
-               TBM_ERR("error: No valid bo(%p).\n", bo);
+               TBM_ERR("error: No valid bo(%p).", bo);
                return 0;
        }
 
@@ -326,7 +326,7 @@ tbm_bo_ref(tbm_bo bo)
 
        bo->ref_cnt++;
 
-       TBM_TRACE_BO("bo(%p) ref_cnt(%d)\n", bo, bo->ref_cnt);
+       TBM_TRACE_BO("bo(%p) ref_cnt(%d)", bo, bo->ref_cnt);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -341,7 +341,7 @@ tbm_bo_unref(tbm_bo bo)
 
        TBM_BO_RETURN_IF_FAIL(_tbm_bo_is_valid(bo));
 
-       TBM_TRACE_BO("bo(%p) ref_cnt(%d)\n", bo, bo->ref_cnt - 1);
+       TBM_TRACE_BO("bo(%p) ref_cnt(%d)", bo, bo->ref_cnt - 1);
 
        if (bo->ref_cnt <= 0) {
                _tbm_bufmgr_mutex_unlock();
@@ -367,7 +367,7 @@ tbm_bo_map(tbm_bo bo, int device, int opt)
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), (tbm_bo_handle) NULL);
 
        if (!_tbm_bo_lock(bo, device, opt)) {
-               TBM_ERR("error: fail to lock bo:%p)\n", bo);
+               TBM_ERR("error: fail to lock bo:%p)", bo);
                _tbm_bufmgr_mutex_unlock();
                return (tbm_bo_handle) NULL;
        }
@@ -375,7 +375,7 @@ tbm_bo_map(tbm_bo bo, int device, int opt)
        bo_handle = tbm_bo_data_map(bo->bo_data, device, opt, &error);
        if (bo_handle.ptr == NULL) {
                /* LCOV_EXCL_START */
-               TBM_ERR("error: fail to map bo:%p error:%d\n", bo, error);
+               TBM_ERR("error: fail to map bo:%p error:%d", bo, error);
                _tbm_bo_unlock(bo);
                _tbm_set_last_result(error);
                _tbm_bufmgr_mutex_unlock();
@@ -386,7 +386,7 @@ tbm_bo_map(tbm_bo bo, int device, int opt)
        /* increase the map_count */
        bo->map_cnt++;
 
-       TBM_TRACE_BO("bo(%p) map_cnt(%d)\n", bo, bo->map_cnt);
+       TBM_TRACE_BO("bo(%p) map_cnt(%d)", bo, bo->map_cnt);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -407,7 +407,7 @@ tbm_bo_unmap(tbm_bo bo)
        error = tbm_bo_data_unmap(bo->bo_data);
        if (error != TBM_ERROR_NONE) {
                /* LCOV_EXCL_START */
-               TBM_ERR("error: bo(%p) map_cnt(%d) error(%d)\n", bo, bo->map_cnt, error);
+               TBM_ERR("error: bo(%p) map_cnt(%d) error(%d)", bo, bo->map_cnt, error);
                _tbm_set_last_result(error);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -417,7 +417,7 @@ tbm_bo_unmap(tbm_bo bo)
        /* decrease the map_count */
        bo->map_cnt--;
 
-       TBM_TRACE_BO("bo(%p) map_cnt(%d)\n", bo, bo->map_cnt);
+       TBM_TRACE_BO("bo(%p) map_cnt(%d)", bo, bo->map_cnt);
 
        _tbm_bo_unlock(bo);
 
@@ -440,14 +440,14 @@ tbm_bo_get_handle(tbm_bo bo, int device)
        bo_handle = tbm_bo_data_get_handle(bo->bo_data, device, &error);
        if (bo_handle.ptr == NULL) {
                /* LCOV_EXCL_START */
-               TBM_ERR("error: bo(%p) bo_handle(%p) error(%d)\n", bo, bo_handle.ptr, error);
+               TBM_ERR("error: bo(%p) bo_handle(%p) error(%d)", bo, bo_handle.ptr, error);
                _tbm_set_last_result(error);
                _tbm_bufmgr_mutex_unlock();
                return (tbm_bo_handle)NULL;
                /* LCOV_EXCL_STOP */
        }
 
-       TBM_TRACE_BO("bo(%p) bo_handle(%p)\n", bo, bo_handle.ptr);
+       TBM_TRACE_BO("bo(%p) bo_handle(%p)", bo, bo_handle.ptr);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -556,7 +556,7 @@ tbm_bo_size(tbm_bo bo)
        size = tbm_bo_data_get_size(bo->bo_data, &error);
        _tbm_set_last_result(error);
 
-       TBM_TRACE_BO("bo(%p) size(%d)\n", bo, size);
+       TBM_TRACE_BO("bo(%p) size(%d)", bo, size);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -572,19 +572,19 @@ tbm_bo_locked(tbm_bo bo)
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
 
        if (bo->bufmgr->bo_lock_type == TBM_BUFMGR_BO_LOCK_TYPE_NEVER) {
-               TBM_ERR("bo(%p) lock_cnt(%d)\n", bo, bo->lock_cnt);
+               TBM_ERR("bo(%p) lock_cnt(%d)", bo, bo->lock_cnt);
                _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
                _tbm_bufmgr_mutex_unlock();
                return 0;
        }
 
        if (bo->lock_cnt > 0) {
-               TBM_TRACE_BO("error: bo(%p) lock_cnt(%d)\n", bo, bo->lock_cnt);
+               TBM_TRACE_BO("error: bo(%p) lock_cnt(%d)", bo, bo->lock_cnt);
                _tbm_bufmgr_mutex_unlock();
                return 1;
        }
 
-       TBM_TRACE_BO("bo(%p) lock_cnt(%d)\n", bo, bo->lock_cnt);
+       TBM_TRACE_BO("bo(%p) lock_cnt(%d)", bo, bo->lock_cnt);
        _tbm_bufmgr_mutex_unlock();
 
        return 0;
@@ -603,7 +603,7 @@ tbm_bo_swap(tbm_bo bo1, tbm_bo bo2)
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo1), 0);
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo2), 0);
 
-       TBM_TRACE_BO("before: bo1(%p) bo2(%p)\n", bo1, bo2);
+       TBM_TRACE_BO("before: bo1(%p) bo2(%p)", bo1, bo2);
 
        size1 = tbm_bo_data_get_size(bo1->bo_data, &error1);
        _tbm_set_last_result(error1);
@@ -620,14 +620,14 @@ tbm_bo_swap(tbm_bo bo1, tbm_bo bo2)
        bo1->bo_data = bo2->bo_data;
        bo2->bo_data = temp;
 
-       TBM_TRACE_BO("after: bo1(%p) bo2(%p)\n", bo1, bo2);
+       TBM_TRACE_BO("after: bo1(%p) bo2(%p)", bo1, bo2);
 
        _tbm_bufmgr_mutex_unlock();
 
        return 1;
 
 fail:
-       TBM_ERR("error: bo1(%p) bo2(%p)\n", bo1, bo2);
+       TBM_ERR("error: bo1(%p) bo2(%p)", bo1, bo2);
        _tbm_bufmgr_mutex_unlock();
 
        return 0;
@@ -647,7 +647,7 @@ tbm_bo_add_user_data(tbm_bo bo, unsigned long key,
        /* check if the data according to the key exist if so, return false. */
        data = user_data_lookup(&bo->user_data_list, key);
        if (data) {
-               TBM_TRACE_BO("warning: user data already exist key(%ld)\n", key);
+               TBM_TRACE_BO("warning: user data already exist key(%ld)", key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -655,13 +655,13 @@ tbm_bo_add_user_data(tbm_bo bo, unsigned long key,
 
        data = user_data_create(key, data_free_func);
        if (!data) {
-               TBM_ERR("error: bo(%p) key(%lu)\n", bo, key);
+               TBM_ERR("error: bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
        }
 
-       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, data->data);
+       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, data->data);
 
        LIST_ADD(&data->item_link, &bo->user_data_list);
 
@@ -681,7 +681,7 @@ tbm_bo_delete_user_data(tbm_bo bo, unsigned long key)
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
 
        if (LIST_IS_EMPTY(&bo->user_data_list)) {
-               TBM_TRACE_BO("bo(%p) key(%lu)\n", bo, key);
+               TBM_TRACE_BO("bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -689,13 +689,13 @@ tbm_bo_delete_user_data(tbm_bo bo, unsigned long key)
 
        old_data = user_data_lookup(&bo->user_data_list, key);
        if (!old_data) {
-               TBM_TRACE_BO("bo(%p) key(%lu)\n", bo, key);
+               TBM_TRACE_BO("bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
        }
 
-       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, old_data->data);
+       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, old_data->data);
 
        user_data_delete(old_data);
 
@@ -715,7 +715,7 @@ tbm_bo_set_user_data(tbm_bo bo, unsigned long key, void *data)
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
 
        if (LIST_IS_EMPTY(&bo->user_data_list)) {
-               TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+               TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -723,7 +723,7 @@ tbm_bo_set_user_data(tbm_bo bo, unsigned long key, void *data)
 
        old_data = user_data_lookup(&bo->user_data_list, key);
        if (!old_data) {
-               TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+               TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -733,7 +733,7 @@ tbm_bo_set_user_data(tbm_bo bo, unsigned long key, void *data)
                old_data->free_func(old_data->data);
        old_data->data = data;
 
-       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, old_data->data);
+       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, old_data->data);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -751,7 +751,7 @@ tbm_bo_get_user_data(tbm_bo bo, unsigned long key, void **data)
        TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
 
        if (!data || LIST_IS_EMPTY(&bo->user_data_list)) {
-               TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+               TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -760,7 +760,7 @@ tbm_bo_get_user_data(tbm_bo bo, unsigned long key, void **data)
        old_data = user_data_lookup(&bo->user_data_list, key);
        if (!old_data) {
                *data = NULL;
-               TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+               TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_bufmgr_mutex_unlock();
                return 0;
@@ -768,7 +768,7 @@ tbm_bo_get_user_data(tbm_bo bo, unsigned long key, void **data)
 
        *data = old_data->data;
 
-       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, old_data->data);
+       TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, old_data->data);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -793,7 +793,7 @@ tbm_bo_get_flags(tbm_bo bo)
                _tbm_set_last_result(error);
        }
 
-       TBM_TRACE_BO("bo(%p)\n", bo);
+       TBM_TRACE_BO("bo(%p)", bo);
 
        _tbm_bufmgr_mutex_unlock();
 
@@ -824,7 +824,7 @@ _tbm_bo_free(tbm_bo bo)
                tbm_user_data *old_data = NULL, *tmp;
 
                LIST_FOR_EACH_ENTRY_SAFE(old_data, tmp, &bo->user_data_list, item_link) {
-                       TBM_DBG("free user_data\n");
+                       TBM_DBG("free user_data");
                        user_data_delete(old_data);
                }
 
@@ -832,7 +832,7 @@ _tbm_bo_free(tbm_bo bo)
        }
 
        while (bo->lock_cnt > 0) {
-               TBM_ERR("error lock_cnt:%d\n", bo->lock_cnt);
+               TBM_ERR("error lock_cnt:%d", bo->lock_cnt);
                _bo_unlock(bo);
                bo->lock_cnt--;
        }
index 0d15240..8d73eea 100644 (file)
@@ -56,7 +56,7 @@ static char *_tbm_bufmgr_debug_tbm_info_get(tbm_bufmgr bufmgr, tbm_error_e *erro
 /* check condition */
 #define TBM_BUFMGR_RETURN_IF_FAIL(cond) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_bufmgr_mutex_unlock();\
                return;\
@@ -65,7 +65,7 @@ static char *_tbm_bufmgr_debug_tbm_info_get(tbm_bufmgr bufmgr, tbm_error_e *erro
 
 #define TBM_BUFMGR_RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_bufmgr_mutex_unlock();\
                return val;\
@@ -74,7 +74,7 @@ static char *_tbm_bufmgr_debug_tbm_info_get(tbm_bufmgr bufmgr, tbm_error_e *erro
 
 #define TBM_BUFMGR_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                error = error_type;\
                _tbm_bufmgr_mutex_unlock();\
                return val;\
@@ -92,7 +92,7 @@ _tbm_bufmgr_check_bo_cnt(tbm_bufmgr bufmgr)
 
        if ((bufmgr->bo_cnt >= 500) && ((bufmgr->bo_cnt % 20) == 0) &&
                (bufmgr->bo_cnt > last_chk_bo_cnt)) {
-               TBM_DBG("============TBM BO CNT DEBUG: bo_cnt=%d\n", bufmgr->bo_cnt);
+               TBM_DBG("============TBM BO CNT DEBUG: bo_cnt=%d", bufmgr->bo_cnt);
                str = _tbm_bufmgr_debug_tbm_info_get(bufmgr, &error);
                if (str) {
                        TBM_DBG("       %s", str);
@@ -187,12 +187,12 @@ _tbm_util_get_appname_from_pid(unsigned int pid, char *str)
 
        fp = fopen(fn_cmdline, "r");
        if (fp == 0) {
-               TBM_ERR("cannot file open %s\n", fn_cmdline);
+               TBM_ERR("cannot file open %s", fn_cmdline);
                return;
        }
 
        if (!fgets(cmdline, 255, fp)) {
-               TBM_ERR("fail to get appname for pid(%d)\n", pid);
+               TBM_ERR("fail to get appname for pid(%d)", pid);
                fclose(fp);
                return;
        }
@@ -230,7 +230,7 @@ _tbm_bufmgr_init(int fd, int server)
        env = getenv("TBM_TRACE");
        if (env) {
                trace_mask = atoi(env);
-               TBM_DBG("TBM_TRACE=%s\n", env);
+               TBM_DBG("TBM_TRACE=%s", env);
        } else
                trace_mask = 0;
 #endif
@@ -240,25 +240,25 @@ _tbm_bufmgr_init(int fd, int server)
        _tbm_set_last_result(TBM_ERROR_NONE);
 
        if (fd >= 0) {
-               TBM_WRN("!!!!!WARNING:: The tbm_bufmgr_init DOSE NOT use argument fd ANYMORE.\n");
-               TBM_WRN("!!!!!WARNING:: IT WILL BE CHANGED like tbm_bufmgr_init(int fd) --> tbm_bufmgr_init(void).\n");
+               TBM_WRN("!!!!!WARNING:: The tbm_bufmgr_init DOSE NOT use argument fd ANYMORE.");
+               TBM_WRN("!!!!!WARNING:: IT WILL BE CHANGED like tbm_bufmgr_init(int fd) --> tbm_bufmgr_init(void).");
        }
 
 
        /* initialize buffer manager */
        if (gBufMgr) {
                gBufMgr->ref_count++;
-               TBM_DBG("reuse  tbm_bufmgr(%p) ref_count(%d) fd(%d)\n", gBufMgr, gBufMgr->ref_count, gBufMgr->fd);
+               TBM_DBG("reuse  tbm_bufmgr(%p) ref_count(%d) fd(%d)", gBufMgr, gBufMgr->ref_count, gBufMgr->fd);
                pthread_mutex_unlock(&gLock);
                return gBufMgr;
        }
 
-       TBM_DBG("bufmgr init\n");
+       TBM_DBG("bufmgr init");
 
        /* allocate bufmgr */
        gBufMgr = calloc(1, sizeof(struct _tbm_bufmgr));
        if (!gBufMgr) {
-               TBM_ERR("error: fail to alloc bufmgr fd(%d)\n", fd);
+               TBM_ERR("error: fail to alloc bufmgr fd(%d)", fd);
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                pthread_mutex_unlock(&gLock);
                return NULL;
@@ -268,14 +268,14 @@ _tbm_bufmgr_init(int fd, int server)
 
        /* set the display_server flag before loading the backend module */
        if (server) {
-               TBM_INFO("The tbm_bufmgr(%p) is used by display server. Need to bind the native_display.\n", gBufMgr);
+               TBM_INFO("The tbm_bufmgr(%p) is used by display server. Need to bind the native_display.", gBufMgr);
                gBufMgr->display_server = 1;
        }
 
        /* load bufmgr priv from env */
        gBufMgr->module = tbm_module_load(gBufMgr->fd);
        if (!gBufMgr->module) {
-               TBM_ERR("error : Fail to load bufmgr backend\n");
+               TBM_ERR("error : Fail to load bufmgr backend");
                _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
                free(gBufMgr);
                gBufMgr = NULL;
@@ -312,7 +312,7 @@ _tbm_bufmgr_init(int fd, int server)
 
        gBufMgr->ref_count = 1;
 
-       TBM_INFO("create tizen bufmgr:%p ref_count:%d\n",
+       TBM_INFO("create tizen bufmgr:%p ref_count:%d",
            gBufMgr, gBufMgr->ref_count);
 
        /* setup the bo_lock_type */
@@ -326,7 +326,7 @@ _tbm_bufmgr_init(int fd, int server)
        else
                gBufMgr->bo_lock_type = TBM_BUFMGR_BO_LOCK_TYPE_ALWAYS;
 
-       TBM_DBG("BUFMGR_LOCK_TYPE=%s\n", env ? env : "default:once");
+       TBM_DBG("BUFMGR_LOCK_TYPE=%s", env ? env : "default:once");
 
        /* intialize bo_list */
        LIST_INITHEAD(&gBufMgr->bo_list);
@@ -371,7 +371,7 @@ tbm_bufmgr_deinit(tbm_bufmgr bufmgr)
        _tbm_set_last_result(TBM_ERROR_NONE);
 
        if (!gBufMgr) {
-               TBM_ERR("gBufmgr already destroy: bufmgr:%p\n", bufmgr);
+               TBM_ERR("gBufmgr already destroy: bufmgr:%p", bufmgr);
                _tbm_bufmgr_mutex_unlock();
                pthread_mutex_unlock(&gLock);
                return;
@@ -379,7 +379,7 @@ tbm_bufmgr_deinit(tbm_bufmgr bufmgr)
 
        bufmgr->ref_count--;
        if (bufmgr->ref_count > 0) {
-               TBM_DBG("reduce a ref_count(%d) of tbm_bufmgr(%p)\n", bufmgr->ref_count, bufmgr);
+               TBM_DBG("reduce a ref_count(%d) of tbm_bufmgr(%p)", bufmgr->ref_count, bufmgr);
                _tbm_bufmgr_mutex_unlock();
                pthread_mutex_unlock(&gLock);
                return;
@@ -390,7 +390,7 @@ tbm_bufmgr_deinit(tbm_bufmgr bufmgr)
                tbm_bo bo = NULL, tmp;
 
                LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &bufmgr->bo_list, item_link) {
-                       TBM_ERR("Un-freed bo(%p, ref:%d)\n", bo, bo->ref_cnt);
+                       TBM_ERR("Un-freed bo(%p, ref:%d)", bo, bo->ref_cnt);
                        _tbm_bo_free(bo);
                }
                LIST_DELINIT(&bufmgr->bo_list);
@@ -401,7 +401,7 @@ tbm_bufmgr_deinit(tbm_bufmgr bufmgr)
                tbm_surface_h surf = NULL, tmp;
 
                LIST_FOR_EACH_ENTRY_SAFE(surf, tmp, &bufmgr->surf_list, item_link) {
-                       TBM_ERR("Un-freed surf(%p, ref:%d)\n", surf, surf->refcnt);
+                       TBM_ERR("Un-freed surf(%p, ref:%d)", surf, surf->refcnt);
                        tbm_surface_destroy(surf);
                }
                LIST_DELINIT(&bufmgr->surf_list);
@@ -412,7 +412,7 @@ tbm_bufmgr_deinit(tbm_bufmgr bufmgr)
        if (bufmgr->fd > 0)
                close(bufmgr->fd);
 
-       TBM_INFO("destroy tbm_bufmgr(%p)\n", bufmgr);
+       TBM_INFO("destroy tbm_bufmgr(%p)", bufmgr);
 
        free(bufmgr);
        gBufMgr = NULL;
@@ -452,14 +452,14 @@ _tbm_bufmgr_debug_tbm_info_get(tbm_bufmgr bufmgr, tbm_error_e *error)
        long pid = 0;
 
        if (!TBM_BUFMGR_IS_VALID(bufmgr) || (bufmgr != gBufMgr)) {
-               TBM_ERR("invalid bufmgr\n");
+               TBM_ERR("invalid bufmgr");
                *error = TBM_ERROR_INVALID_PARAMETER;
                return NULL;
        }
 
        str = malloc(len);
        if (!str) {
-               TBM_ERR("Fail to allocate the string.\n");
+               TBM_ERR("Fail to allocate the string.");
                *error = TBM_ERROR_OUT_OF_MEMORY;
                return NULL;
        }
index ff6050f..2ab1d53 100644 (file)
@@ -44,7 +44,7 @@ tbm_bufmgr_backend tbm_backend_alloc(void)
 
        bufmgr_backend = calloc(1, sizeof(struct _tbm_bufmgr_backend));
        if (!bufmgr_backend) {
-               TBM_ERR("error: fail to allocate the bufmgr_backend\n");
+               TBM_ERR("error: fail to allocate the bufmgr_backend");
                return NULL;
        }
 
@@ -65,12 +65,12 @@ int tbm_backend_init(tbm_bufmgr bufmgr, tbm_bufmgr_backend backend)
        tbm_module *module = NULL;
 
        if (!bufmgr) {
-               TBM_ERR("error: fail to init tbm backend... bufmgr is null\n");
+               TBM_ERR("error: fail to init tbm backend... bufmgr is null");
                return 0;
        }
 
        if (!backend) {
-               TBM_ERR("error: fail to init tbm backend... backend is null\n");
+               TBM_ERR("error: fail to init tbm backend... backend is null");
                return 0;
        }
 
@@ -121,7 +121,7 @@ int tbm_backend_is_display_server(void)
        const char *value;
 
        if (gBufMgr == NULL) {
-               TBM_ERR("error: no gBufMgr.\n");
+               TBM_ERR("error: no gBufMgr.");
                return 0;
        }
 
index 29d9409..95b6851 100644 (file)
@@ -108,7 +108,7 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
 
        display = wl_display_connect("tbm-drm-auth");
        if (!display) {
-               TBM_ERR("Failed to connect display\n");
+               TBM_ERR("Failed to connect display");
                free(tbm_drm_client);
 
                return 0;
@@ -118,7 +118,7 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
 
        wl_registry = wl_display_get_registry(display);
        if (!wl_registry) {
-               TBM_ERR("Failed to get registry\n");
+               TBM_ERR("Failed to get registry");
                wl_display_disconnect(display);
                free(tbm_drm_client);
 
@@ -127,7 +127,7 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
 
        wl_registry_add_listener(wl_registry, &registry_listener, tbm_drm_client);
        if (wl_display_roundtrip(display) < 0) { //For Gloabl registry
-               TBM_ERR("Failed to wl_display_roundtrip for global registry\n");
+               TBM_ERR("Failed to wl_display_roundtrip for global registry");
                wl_registry_destroy(wl_registry);
                wl_display_disconnect(display);
                free(tbm_drm_client);
@@ -135,7 +135,7 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
        }
 
        if (!tbm_drm_client->wl_tbm_drm_auth) {
-               TBM_ERR("Failed to get wl_tbm_drm_auth interface\n");
+               TBM_ERR("Failed to get wl_tbm_drm_auth interface");
                wl_registry_destroy(wl_registry);
                wl_display_disconnect(display);
                free(tbm_drm_client);
@@ -145,7 +145,7 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
 
        wl_tbm_drm_auth_get_authentication_info(tbm_drm_client->wl_tbm_drm_auth);
        if (wl_display_roundtrip(display) < 0) {
-               TBM_ERR("Failed to wl_display_roundtrip get auth info\n");
+               TBM_ERR("Failed to wl_display_roundtrip get auth info");
                wl_tbm_drm_auth_set_user_data(tbm_drm_client->wl_tbm_drm_auth, NULL);
                wl_tbm_drm_auth_destroy(tbm_drm_client->wl_tbm_drm_auth);
                wl_registry_destroy(wl_registry);
@@ -155,7 +155,7 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
        }
 
        if (tbm_drm_client->auth_fd < 0) {
-               TBM_ERR("Failed to get auth info\n");
+               TBM_ERR("Failed to get auth info");
                wl_tbm_drm_auth_set_user_data(tbm_drm_client->wl_tbm_drm_auth, NULL);
                wl_tbm_drm_auth_destroy(tbm_drm_client->wl_tbm_drm_auth);
                wl_registry_destroy(wl_registry);
@@ -204,23 +204,23 @@ tbm_drm_helper_set_fd(int fd)
                return;
 
        if (fd < 0 || fd > fd_max) {
-               TBM_ERR("%d out of fd range\n", fd);
+               TBM_ERR("%d out of fd range", fd);
                return;
        }
 
        if (tbm_drm_fd != -1)
-               TBM_WRN("already has TBM_DRM_FD: %d\n", tbm_drm_fd);
+               TBM_WRN("already has TBM_DRM_FD: %d", tbm_drm_fd);
 
        tbm_drm_fd = fd;
 
-       TBM_INFO("TBM_DRM_FD: %d\n", tbm_drm_fd);
+       TBM_INFO("TBM_DRM_FD: %d", tbm_drm_fd);
 }
 
 void
 tbm_drm_helper_unset_fd(void)
 {
        tbm_drm_fd = -1;
-       TBM_INFO("TBM_DRM_FD: %d\n", tbm_drm_fd);
+       TBM_INFO("TBM_DRM_FD: %d", tbm_drm_fd);
 }
 
 int
@@ -233,7 +233,7 @@ tbm_drm_helper_get_fd(void)
                return -1;
        }
 
-       TBM_INFO("TBM_DRM_FD: %d\n", tbm_drm_fd);
+       TBM_INFO("TBM_DRM_FD: %d", tbm_drm_fd);
 
        flags = fcntl(tbm_drm_fd, F_GETFD);
        if (flags == -1) {
@@ -248,12 +248,12 @@ tbm_drm_helper_get_fd(void)
        }
 
        if (fcntl(new_fd, F_SETFD, flags|FD_CLOEXEC) == -1) {
-               TBM_ERR("failed to set fd\n");
+               TBM_ERR("failed to set fd");
                close(new_fd);
                return -1;
        }
 
-       TBM_INFO("Return TBM_FD: %d\n", new_fd);
+       TBM_INFO("Return TBM_FD: %d", new_fd);
 
        return new_fd;
 }
index 09bde7a..297f51e 100644 (file)
@@ -71,14 +71,14 @@ _send_server_auth_info(struct wayland_tbm_drm_auth_server *tbm_drm_auth_srv,
                fd = open(tbm_drm_auth_srv->device_name, O_RDWR);
                if (fd != -1) {
                        if (fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC) == -1) {
-                               TBM_ERR("failed to set fd\n");
+                               TBM_ERR("failed to set fd");
                                goto fini;
                        }
                }
        }
 
        if (fd < 0) {
-               TBM_ERR("failed to open drm : device_name, %s (%m)\n", tbm_drm_auth_srv->device_name);
+               TBM_ERR("failed to open drm : device_name, %s (%m)", tbm_drm_auth_srv->device_name);
 
                wl_resource_post_error(resource, WL_TBM_DRM_AUTH_ERROR_AUTHENTICATE_FAIL,
                                       "authenicate failed::open_drm");
@@ -87,7 +87,7 @@ _send_server_auth_info(struct wayland_tbm_drm_auth_server *tbm_drm_auth_srv,
 
        if (drmGetMagic(fd, &magic) < 0) {
                if (errno != EACCES) {
-                       TBM_ERR("failed to get magic\n");
+                       TBM_ERR("failed to get magic");
 
                        wl_resource_post_error(resource, WL_TBM_DRM_AUTH_ERROR_AUTHENTICATE_FAIL,
                                               "authenicate failed::get_magic");
@@ -96,7 +96,7 @@ _send_server_auth_info(struct wayland_tbm_drm_auth_server *tbm_drm_auth_srv,
        }
 
        if (drmAuthMagic(tbm_drm_auth_srv->fd, magic) < 0) {
-               TBM_ERR("failed to authenticate magic\n");
+               TBM_ERR("failed to authenticate magic");
 
                wl_resource_post_error(resource, WL_TBM_DRM_AUTH_ERROR_AUTHENTICATE_FAIL,
                                       "authenicate failed::auth_magic");
@@ -171,24 +171,24 @@ _tbm_getgrnam_r(const char *name)
 
        buf = calloc(1, buf_len * sizeof(char));
        if (!buf) {
-               TBM_ERR("creating buffer failed\n");
+               TBM_ERR("creating buffer failed");
                goto failed;
        }
 
        grp = calloc(1, sizeof(struct group));
        if (!grp) {
-               TBM_ERR("creating group failed\n");
+               TBM_ERR("creating group failed");
                goto failed;
        }
 
        ret = getgrnam_r(name, grp, buf, buf_len, &grp_res);
        if (ret < 0) {
-               TBM_ERR("getgrnam_r failed errno:%d(%m)\n", ret);
+               TBM_ERR("getgrnam_r failed errno:%d(%m)", ret);
                goto failed;
        }
 
        if (grp_res == NULL) {
-               TBM_ERR("finding name:%s group failed\n", name);
+               TBM_ERR("finding name:%s group failed", name);
                goto failed;
        }
 
@@ -218,7 +218,7 @@ _tbm_drm_auth_socket_init(struct wayland_tbm_drm_auth_server *tbm_drm_auth_srv)
 
        dir = getenv("XDG_RUNTIME_DIR");
        if (!dir) {
-               TBM_WRN("getting XDG_RUNTIME_DIR failed\n");
+               TBM_WRN("getting XDG_RUNTIME_DIR failed");
                return;
        }
 
@@ -226,27 +226,27 @@ _tbm_drm_auth_socket_init(struct wayland_tbm_drm_auth_server *tbm_drm_auth_srv)
 
        ret = chmod(socket_path, 509);
        if (ret < 0) {
-               TBM_WRN("changing modes of socket file failed:%s (%m)\n", socket_path);
+               TBM_WRN("changing modes of socket file failed:%s (%m)", socket_path);
                return;
        }
 
        ret = _tbm_getgrnam_r("root");
        if (ret < 0) {
-               TBM_WRN("getting uid failed\n");
+               TBM_WRN("getting uid failed");
                return;
        }
        uid = ret;
 
        ret = _tbm_getgrnam_r("display");
        if (ret < 0) {
-               TBM_WRN("getting gid failed\n");
+               TBM_WRN("getting gid failed");
                return;
        }
        gid = ret;
 
        ret = chown(socket_path, uid, gid);
        if (ret < 0) {
-               TBM_WRN("changing owner of socket file failed:%s (%m)\n", socket_path);
+               TBM_WRN("changing owner of socket file failed:%s (%m)", socket_path);
                return;
        }
 }
@@ -351,7 +351,7 @@ tbm_drm_helper_get_master_fd(void)
                return -1;
        }
 
-       TBM_INFO("TBM DRM MASTER FD: %d\n", fd);
+       TBM_INFO("TBM DRM MASTER FD: %d", fd);
 
        flags = fcntl(fd, F_GETFD);
        if (flags == -1) {
@@ -366,12 +366,12 @@ tbm_drm_helper_get_master_fd(void)
        }
 
        if (fcntl(new_fd, F_SETFD, flags|FD_CLOEXEC) == -1) {
-               TBM_ERR("failed to set fd\n");
+               TBM_ERR("failed to set fd");
                close(new_fd);
                return -1;
        }
 
-       TBM_INFO("Return MASTER_FD: %d\n", new_fd);
+       TBM_INFO("Return MASTER_FD: %d", new_fd);
 
        return new_fd;
 }
@@ -385,23 +385,23 @@ tbm_drm_helper_set_tbm_master_fd(int fd)
                return;
 
        if (fd < 0 || fd > fd_max) {
-               TBM_ERR("%d out of fd range\n", fd);
+               TBM_ERR("%d out of fd range", fd);
                return;
        }
 
        if (tbm_drm_master_fd != -1)
-               TBM_WRN("already has TBM DRM MASTER FD: %d\n", tbm_drm_master_fd);
+               TBM_WRN("already has TBM DRM MASTER FD: %d", tbm_drm_master_fd);
 
        tbm_drm_master_fd = fd;
 
-       TBM_INFO("TBM DRM MASTER FD: %d\n", tbm_drm_master_fd);
+       TBM_INFO("TBM DRM MASTER FD: %d", tbm_drm_master_fd);
 }
 
 void
 tbm_drm_helper_unset_tbm_master_fd(void)
 {
        tbm_drm_master_fd = -1;
-       TBM_INFO("TBM DRM MASTER FD: %d\n", tbm_drm_master_fd);
+       TBM_INFO("TBM DRM MASTER FD: %d", tbm_drm_master_fd);
 }
 
 int
index 0839cb2..f57fb2a 100644 (file)
@@ -70,7 +70,7 @@ _tbm_dummy_display_is_valid(struct _tbm_dummy_display *dummy_dpy)
        if (!LIST_IS_EMPTY(&g_dummy_display_list)) {
                LIST_FOR_EACH_ENTRY(tmp_dpy, &g_dummy_display_list, link) {
                        if (tmp_dpy == dummy_dpy) {
-                               TBM_INFO("tbm_dummy_display(%p)\n", dummy_dpy);
+                               TBM_INFO("tbm_dummy_display(%p)", dummy_dpy);
                                return 1;
                        }
                }
@@ -98,7 +98,7 @@ tbm_dummy_display_create(void)
        dpy = calloc(1, sizeof(struct _tbm_dummy_display));
        if (!dpy) {
                /* LCOV_EXCL_START */
-               TBM_ERR("fail to allocate struct _tbm_dummy_display.\n");
+               TBM_ERR("fail to allocate struct _tbm_dummy_display.");
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                _tbm_dummy_display_mutex_unlock();
                return NULL;
index 7b104e3..e2f4ce1 100644 (file)
@@ -108,7 +108,7 @@ tbm_log_set_path(const char *path)
 
                log_fl = fopen(fd_name, "a");
                if (!log_fl) {
-                       TBM_ERR("failed: open file(%s)\n", fd_name);
+                       TBM_ERR("failed: open file(%s)", fd_name);
                        return;
                }
 
@@ -116,7 +116,7 @@ tbm_log_set_path(const char *path)
                        fflush(stdout);
                        stdout_fd = dup(STDOUT_FILENO);
                        if (stdout_fd < 0) {
-                               TBM_ERR("dup failed: %m\n");
+                               TBM_ERR("dup failed: %m");
                                fclose(log_fl);
                                return;
                        }
index 8d4a955..fe7e5a1 100644 (file)
@@ -129,22 +129,22 @@ _check_version(TBMModuleVersionInfo *data)
        backend_module_major = GET_ABI_MAJOR(data->abiversion);
        backend_module_minor = GET_ABI_MINOR(data->abiversion);
 
-       TBM_DBG("TBM module %s: vendor=\"%s\" ABI=%d,%d\n",
+       TBM_DBG("TBM module %s: vendor=\"%s\" ABI=%d,%d",
            data->modname ? data->modname : "UNKNOWN!",
            data->vendor ? data->vendor : "UNKNOWN!", backend_module_major, backend_module_minor);
 
        tbm_backend_major = GET_ABI_MAJOR(TBM_ABI_VERSION);
        tbm_backend_minor = GET_ABI_MINOR(TBM_ABI_VERSION);
 
-       TBM_DBG("TBM ABI version %d.%d\n",
+       TBM_DBG("TBM ABI version %d.%d",
            tbm_backend_major, tbm_backend_minor);
 
        if (backend_module_major != tbm_backend_major) {
-               TBM_ERR("TBM module ABI major ver(%d) doesn't match the TBM's ver(%d)\n",
+               TBM_ERR("TBM module ABI major ver(%d) doesn't match the TBM's ver(%d)",
                        backend_module_major, tbm_backend_major);
                return 0;
        } else if (backend_module_minor > tbm_backend_minor) {
-               TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)\n",
+               TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)",
                        backend_module_minor, tbm_backend_minor);
                return 0;
        }
@@ -206,51 +206,51 @@ _tbm_backend_load_module(tbm_module *module, const char *file)
 
        module_data = dlopen(path, RTLD_LAZY);
        if (!module_data) {
-               TBM_ERR("failed to load module: %s(%s)\n", dlerror(), file);
+               TBM_ERR("failed to load module: %s(%s)", dlerror(), file);
                return 0;
        }
 
        backend_module_data = dlsym(module_data, "tbm_backend_module_data");
        if (!backend_module_data) {
-               TBM_ERR("Error: module does not have data object.\n");
+               TBM_ERR("Error: module does not have data object.");
                goto err;
        }
 
        tbm_backend_major = GET_ABI_MAJOR(TBM_BACKEND_ABI_LATEST_VERSION);
        tbm_backend_minor = GET_ABI_MINOR(TBM_BACKEND_ABI_LATEST_VERSION);
-       TBM_INFO("TBM Backend ABI version %d.%d\n", tbm_backend_major, tbm_backend_minor);
+       TBM_INFO("TBM Backend ABI version %d.%d", tbm_backend_major, tbm_backend_minor);
 
        backend_module_major = GET_ABI_MAJOR(backend_module_data->abi_version);
        backend_module_minor = GET_ABI_MINOR(backend_module_data->abi_version);
 
-       TBM_INFO("TBM module %s: vendor=\"%s\" Backend ABI version=%d.%d\n",
+       TBM_INFO("TBM module %s: vendor=\"%s\" Backend ABI version=%d.%d",
            backend_module_data->name ? backend_module_data->name : "UNKNOWN!",
            backend_module_data->vendor ? backend_module_data->vendor : "UNKNOWN!",
                backend_module_major, backend_module_minor);
 
        if (backend_module_major > tbm_backend_major) {
-               TBM_ERR("TBM module ABI major ver(%d) is newer than the TBM's ver(%d)\n",
+               TBM_ERR("TBM module ABI major ver(%d) is newer than the TBM's ver(%d)",
                        backend_module_major, tbm_backend_major);
                goto err;
        } else if (backend_module_minor > tbm_backend_minor) {
-               TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)\n",
+               TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)",
                        backend_module_minor, tbm_backend_minor);
                goto err;
        }
 
        if (!backend_module_data->init) {
-               TBM_ERR("Error: module does not supply init symbol.\n");
+               TBM_ERR("Error: module does not supply init symbol.");
                goto err;
        }
 
        if (!backend_module_data->deinit)       {
-               TBM_ERR("Error: module does not supply deinit symbol.\n");
+               TBM_ERR("Error: module does not supply deinit symbol.");
                goto err;
        }
 
        bufmgr_data = backend_module_data->init((tbm_bufmgr)module, &error);
        if (!bufmgr_data) {
-               TBM_ERR("Fail to init module(%s)\n", file);
+               TBM_ERR("Fail to init module(%s)", file);
                goto err;
        }
 
@@ -269,7 +269,7 @@ _tbm_backend_load_module(tbm_module *module, const char *file)
        module->backend_module_data = backend_module_data;
        module->bufmgr_data = bufmgr_data;
 
-       TBM_INFO("Success to load module(%s)\n", file);
+       TBM_INFO("Success to load module(%s)", file);
 
        return 1;
 
@@ -295,46 +295,46 @@ _tbm_backend_load_bufmgr_module(tbm_module *module, int fd, const char *file)
 
        module_data = dlopen(path, RTLD_LAZY);
        if (!module_data) {
-               TBM_ERR("failed to load module: %s(%s)\n", dlerror(), file);
+               TBM_ERR("failed to load module: %s(%s)", dlerror(), file);
                return 0;
        }
 
        initdata = dlsym(module_data, "tbmModuleData");
        if (!initdata) {
-               TBM_ERR("Error: module does not have data object.\n");
+               TBM_ERR("Error: module does not have data object.");
                goto err;
        }
 
        vers = initdata->vers;
        if (!vers) {
-               TBM_ERR("Error: module does not supply version information.\n");
+               TBM_ERR("Error: module does not supply version information.");
                goto err;
        }
 
        init = initdata->init;
        if (!init) {
-               TBM_ERR("Error: module does not supply init symbol.\n");
+               TBM_ERR("Error: module does not supply init symbol.");
                goto err;
        }
 
        if (!_check_version(vers)) {
-               TBM_ERR("Fail to check version.\n");
+               TBM_ERR("Fail to check version.");
                goto err;
        }
 
        if (!init((tbm_bufmgr)module, fd)) {
-               TBM_ERR("Fail to init module(%s)\n", file);
+               TBM_ERR("Fail to init module(%s)", file);
                goto err;
        }
 
        if (!module->backend || !module->backend->priv) {
-               TBM_ERR("Error: module(%s) wrong operation. Check backend or backend's priv.\n", file);
+               TBM_ERR("Error: module(%s) wrong operation. Check backend or backend's priv.", file);
                goto err;
        }
 
        module->module_data = module_data;
 
-       TBM_DBG("Success to load module(%s)\n", file);
+       TBM_DBG("Success to load module(%s)", file);
 
        return 1;
 
@@ -382,7 +382,7 @@ tbm_module_load(int fd)
        /* load backend_module from configured path */
        n = scandir(BUFMGR_MODULE_DIR, &namelist, 0, alphasort);
        if (n < 0) {
-               TBM_ERR("no files : %s\n", BUFMGR_MODULE_DIR);
+               TBM_ERR("no files : %s", BUFMGR_MODULE_DIR);
                tbm_module_unload(module);
                return NULL;
        }
@@ -512,7 +512,7 @@ tbm_module_bind_native_display(tbm_module *module, void *native_display)
                if (hal_tbm_backend_has_drm_device(module->hal_backend, &ret)) {
                        int fd = tbm_drm_helper_get_fd(); // this must be the auth drm_fd.(master drm_fd);
                        if (fd < 0) {
-                               TBM_ERR("error: module(%p) native_display(%p)\n", module, native_display);
+                               TBM_ERR("error: module(%p) native_display(%p)", module, native_display);
                                return TBM_ERROR_INVALID_OPERATION;
                        }
 
@@ -523,7 +523,7 @@ tbm_module_bind_native_display(tbm_module *module, void *native_display)
                        } else {
                                // make the wayland server socket for sending the authenticated drm_fd to wayland clients.
                                if (!tbm_drm_helper_wl_auth_server_init(native_display, fd, NULL, 0)) {
-                                       TBM_ERR("error: tbm_drm_helper_wl_auth_server_init failed\n");
+                                       TBM_ERR("error: tbm_drm_helper_wl_auth_server_init failed");
                                        close(fd);
                                        return TBM_ERROR_INVALID_OPERATION;
                                }
index 0766cf5..cf43a4e 100644 (file)
@@ -38,7 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 int
 tbm_surface_query_formats(uint32_t **formats, uint32_t *num)
 {
-       TBM_TRACE_SURFACE("\n");
+       TBM_TRACE_SURFACE(" ");
 
        if (!tbm_surface_internal_query_supported_formats(formats, num))
                return tbm_get_last_error();
@@ -49,7 +49,7 @@ tbm_surface_query_formats(uint32_t **formats, uint32_t *num)
 tbm_surface_h
 tbm_surface_create(int width, int height, tbm_format format)
 {
-       TBM_TRACE_SURFACE("width(%d) height(%d)\n", width, height);
+       TBM_TRACE_SURFACE("width(%d) height(%d)", width, height);
 
        _tbm_set_last_result(TBM_ERROR_NONE);
 
@@ -82,7 +82,7 @@ tbm_surface_create(int width, int height, tbm_format format)
 int
 tbm_surface_destroy(tbm_surface_h surface)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
 
@@ -94,7 +94,7 @@ tbm_surface_destroy(tbm_surface_h surface)
 int
 tbm_surface_map(tbm_surface_h surface, int opt, tbm_surface_info_s *info)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
        TBM_RETURN_VAL_IF_FAIL(info != NULL, TBM_SURFACE_ERROR_INVALID_PARAMETER);
@@ -111,7 +111,7 @@ tbm_surface_map(tbm_surface_h surface, int opt, tbm_surface_info_s *info)
 int
 tbm_surface_unmap(tbm_surface_h surface)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
 
@@ -123,7 +123,7 @@ tbm_surface_unmap(tbm_surface_h surface)
 int
 tbm_surface_get_info(tbm_surface_h surface, tbm_surface_info_s *info)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
        TBM_RETURN_VAL_IF_FAIL(info != NULL, TBM_SURFACE_ERROR_INVALID_PARAMETER);
@@ -140,7 +140,7 @@ tbm_surface_get_info(tbm_surface_h surface, tbm_surface_info_s *info)
 int
 tbm_surface_get_width(tbm_surface_h surface)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        int width = 0;
 
@@ -172,7 +172,7 @@ tbm_surface_get_width(tbm_surface_h surface)
 int
 tbm_surface_get_height(tbm_surface_h surface)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        int height = 0;
 
@@ -204,7 +204,7 @@ tbm_surface_get_height(tbm_surface_h surface)
 tbm_format
 tbm_surface_get_format(tbm_surface_h surface)
 {
-       TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
 
        _tbm_set_last_result(TBM_ERROR_NONE);
 
index 54bad1c..c1024c5 100644 (file)
@@ -50,7 +50,7 @@ void _tbm_surface_mutex_unlock(void);
 /* check condition */
 #define TBM_SURFACE_RETURN_IF_FAIL(cond) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_surface_mutex_unlock();\
                return;\
@@ -59,7 +59,7 @@ void _tbm_surface_mutex_unlock(void);
 
 #define TBM_SURFACE_RETURN_ERR_IF_FAIL(cond, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(error_type);\
                _tbm_surface_mutex_unlock();\
                return;\
@@ -68,7 +68,7 @@ void _tbm_surface_mutex_unlock(void);
 
 #define TBM_SURFACE_RETURN_SET_ERR_IF_FAIL(cond, error, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                error = error_type;\
                _tbm_set_last_result(error_type);\
                _tbm_surface_mutex_unlock();\
@@ -78,7 +78,7 @@ void _tbm_surface_mutex_unlock(void);
 
 #define TBM_SURFACE_RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_surface_mutex_unlock();\
                return val;\
@@ -88,7 +88,7 @@ void _tbm_surface_mutex_unlock(void);
 
 #define TBM_SURFACE_RETURN_VAL_ERR_IF_FAIL(cond, val, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(error_type);\
                _tbm_surface_mutex_unlock();\
                return val;\
@@ -97,7 +97,7 @@ void _tbm_surface_mutex_unlock(void);
 
 #define TBM_SURFACE_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                if (error)\
                        *error = error_type;\
                _tbm_set_last_result(error_type);\
@@ -298,13 +298,13 @@ _tbm_surface_internal_is_valid(tbm_surface_h surface)
 {
        if (!surface) {
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
-               TBM_ERR("error: No valid tbm_surface is NULL\n");
+               TBM_ERR("error: No valid tbm_surface is NULL");
                return 0;
        }
 
        if (!_tbm_surface_internal_magic_check(surface)) {
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
-               TBM_ERR("error: No valid tbm_surface(%p)\n", surface);
+               TBM_ERR("error: No valid tbm_surface(%p)", surface);
                return 0;
        }
 
@@ -349,7 +349,7 @@ _tbm_surface_internal_destroy(tbm_surface_h surface)
                LIST_FOR_EACH_ENTRY_SAFE(func_info, func_next, &surface->destroy_funcs, item_link) {
                        func_info->destroy_func(surface, func_info->user_data);
                }
-               TBM_DBG("free destroy_funcs %p\n", surface);
+               TBM_DBG("free destroy_funcs %p", surface);
                LIST_FOR_EACH_ENTRY_SAFE(func_info, func_next, &surface->destroy_funcs, item_link) {
                        LIST_DEL(&func_info->item_link);
                        free(func_info);
@@ -359,7 +359,7 @@ _tbm_surface_internal_destroy(tbm_surface_h surface)
        /* destory the user_data_list */
        if (!LIST_IS_EMPTY(&surface->user_data_list)) {
                LIST_FOR_EACH_ENTRY_SAFE(old_data, tmp, &surface->user_data_list, item_link) {
-                       TBM_DBG("free user_data\n");
+                       TBM_DBG("free user_data");
                        user_data_delete(old_data);
                }
        }
@@ -894,7 +894,7 @@ tbm_surface_internal_query_supported_formats(uint32_t **formats,
        if (!g_surface_bufmgr) {
                _init_surface_bufmgr();
                if (!g_surface_bufmgr) {
-                       TBM_ERR("fail bufmgr initialization\n");
+                       TBM_ERR("fail bufmgr initialization");
                        _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
                        goto fail;
                }
@@ -910,7 +910,7 @@ tbm_surface_internal_query_supported_formats(uint32_t **formats,
                goto fail;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_bufmgr(%p) format num(%u)\n", g_surface_bufmgr, *num);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_bufmgr(%p) format num(%u)", g_surface_bufmgr, *num);
 
        if (bufmgr_initialized) {
                LIST_DELINIT(&g_surface_bufmgr->surf_list);
@@ -929,7 +929,7 @@ fail:
        }
        _tbm_surface_mutex_unlock();
 
-       TBM_ERR("error: tbm_bufmgr(%p)\n", g_surface_bufmgr);
+       TBM_ERR("error: tbm_bufmgr(%p)", g_surface_bufmgr);
 
        return 0;
 /* LCOV_EXCL_STOP */
@@ -945,12 +945,12 @@ tbm_surface_internal_get_num_planes(tbm_format format)
 
        num_planes = _tbm_surface_internal_get_num_planes(format);
        if (!num_planes) {
-               TBM_ERR("error: tbm_error(%s)\n", tbm_error_str(tbm_get_last_error()));
+               TBM_ERR("error: tbm_error(%s)", tbm_error_str(tbm_get_last_error()));
                _tbm_surface_mutex_unlock();
                return 0;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) num_planes(%d)\n", _tbm_surface_internal_format_to_str(format), num_planes);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) num_planes(%d)", _tbm_surface_internal_format_to_str(format), num_planes);
 
        _tbm_surface_mutex_unlock();
 
@@ -967,14 +967,14 @@ tbm_surface_internal_get_bpp(tbm_format format)
 
        bpp = _tbm_surface_internal_get_bpp(format);
        if (!bpp) {
-               TBM_ERR("error: tbm_error(%s)\n", tbm_error_str(tbm_get_last_error()));
+               TBM_ERR("error: tbm_error(%s)", tbm_error_str(tbm_get_last_error()));
                _tbm_surface_mutex_unlock();
                return 0;
        }
 
        _tbm_surface_mutex_unlock();
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) bpp(%d)\n", _tbm_surface_internal_format_to_str(format), bpp);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) bpp(%d)", _tbm_surface_internal_format_to_str(format), bpp);
 
        return bpp;
 }
@@ -997,7 +997,7 @@ tbm_surface_internal_create_with_flags(int width, int height,
        if (!g_surface_bufmgr) {
                _init_surface_bufmgr();
                if (!g_surface_bufmgr) {
-                       TBM_ERR("fail bufmgr initialization\n");
+                       TBM_ERR("fail bufmgr initialization");
                        error = TBM_ERROR_INVALID_OPERATION;
                        goto check_valid_fail;
                }
@@ -1007,7 +1007,7 @@ tbm_surface_internal_create_with_flags(int width, int height,
 
        bufmgr = g_surface_bufmgr;
        if (!TBM_BUFMGR_IS_VALID(bufmgr)) {
-               TBM_ERR("The bufmgr is invalid\n");
+               TBM_ERR("The bufmgr is invalid");
                error = TBM_ERROR_INVALID_PARAMETER;
                goto check_valid_fail;
        }
@@ -1018,7 +1018,7 @@ tbm_surface_internal_create_with_flags(int width, int height,
                goto surface_alloc_fail;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("width(%d) height(%d) format(%s) flags(%d) tbm_surface(%p)\n",
+       TBM_TRACE_SURFACE_INTERNAL("width(%d) height(%d) format(%s) flags(%d) tbm_surface(%p)",
                        width, height, _tbm_surface_internal_format_to_str(format), flags, surf);
 
        LIST_INITHEAD(&surf->user_data_list);
@@ -1041,7 +1041,7 @@ check_valid_fail:
                _deinit_surface_bufmgr();
        }
 
-       TBM_ERR("error: width(%d) height(%d) format(%s) flags(%d)\n",
+       TBM_ERR("error: width(%d) height(%d) format(%s) flags(%d)",
                width, height, _tbm_surface_internal_format_to_str(format), flags);
 
        _tbm_set_last_result(error);
@@ -1073,7 +1073,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
        if (!g_surface_bufmgr) {
                _init_surface_bufmgr();
                if (!g_surface_bufmgr) {
-                       TBM_ERR("fail bufmgr initialization\n");
+                       TBM_ERR("fail bufmgr initialization");
                        _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
                        goto check_valid_fail;
                }
@@ -1083,7 +1083,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
 
        bufmgr = g_surface_bufmgr;
        if (!TBM_BUFMGR_IS_VALID(bufmgr)) {
-               TBM_ERR("fail to validate the Bufmgr.\n");
+               TBM_ERR("fail to validate the Bufmgr.");
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                goto check_valid_fail;
        }
@@ -1091,7 +1091,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
        surf = calloc(1, sizeof(struct _tbm_surface));
        if (!surf) {
                /* LCOV_EXCL_START */
-               TBM_ERR("fail to allocate struct _tbm_surface.\n");
+               TBM_ERR("fail to allocate struct _tbm_surface.");
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                goto alloc_surf_fail;
                /* LCOV_EXCL_STOP */
@@ -1107,7 +1107,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
        else {
                surf->info.bpp = _tbm_surface_internal_get_bpp(info->format);
                if (!surf->info.bpp) {
-                       TBM_ERR("fail to get bpp. error(%s)\n", tbm_error_str(tbm_get_last_error()));
+                       TBM_ERR("fail to get bpp. error(%s)", tbm_error_str(tbm_get_last_error()));
                        goto bpp_fail;
                }
        }
@@ -1126,7 +1126,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
                        int32_t bo_idx = 0;
 
                        if (!_tbm_surface_internal_query_plane_data(surf, i, &size, &offset, &stride, &bo_idx)) {
-                               TBM_ERR("fail to get plane_data. error(%s)\n", tbm_error_str(tbm_get_last_error()));
+                               TBM_ERR("fail to get plane_data. error(%s)", tbm_error_str(tbm_get_last_error()));
                                goto plane_data_fail;
                        }
                        surf->info.planes[i].size = size;
@@ -1152,7 +1152,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
        surf->num_bos = num;
        for (i = 0; i < num; i++) {
                if (bos[i] == NULL) {
-                       TBM_ERR("bos[%d] is null.\n", i);
+                       TBM_ERR("bos[%d] is null.", i);
                        _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
                        goto check_bo_fail;
                }
@@ -1161,7 +1161,7 @@ tbm_surface_internal_create_with_bos(tbm_surface_info_s *info,
                _tbm_bo_set_surface(bos[i], surf);
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u) height(%u) format(%s) bo_num(%d)\n", surf,
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u) height(%u) format(%s) bo_num(%d)", surf,
                        info->width, info->height, _tbm_surface_internal_format_to_str(info->format), num);
 
        LIST_INITHEAD(&surf->user_data_list);
@@ -1191,7 +1191,7 @@ check_valid_fail:
        }
        _tbm_surface_mutex_unlock();
 
-       TBM_ERR("error: width(%u) height(%u) format(%s) bo_num(%d)\n",
+       TBM_ERR("error: width(%u) height(%u) format(%s) bo_num(%d)",
                        info->width, info->height,
                        _tbm_surface_internal_format_to_str(info->format), num);
 /* LCOV_EXCL_STOP */
@@ -1210,12 +1210,12 @@ tbm_surface_internal_destroy(tbm_surface_h surface)
        surface->refcnt--;
 
        if (surface->refcnt > 0) {
-               TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)\n", surface->refcnt, surface);
+               TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)", surface->refcnt, surface);
                _tbm_surface_mutex_unlock();
                return;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)\n", surface, surface->refcnt);
+       TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)", surface, surface->refcnt);
 
        if (surface->refcnt == 0)
                _tbm_surface_internal_destroy(surface);
@@ -1235,7 +1235,7 @@ tbm_surface_internal_ref(tbm_surface_h surface)
 
        surface->refcnt++;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) refcnt(%d)\n", surface, surface->refcnt);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) refcnt(%d)", surface, surface->refcnt);
 
        _tbm_surface_mutex_unlock();
 }
@@ -1251,12 +1251,12 @@ tbm_surface_internal_unref(tbm_surface_h surface)
        surface->refcnt--;
 
        if (surface->refcnt > 0) {
-               TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)\n", surface->refcnt, surface);
+               TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)", surface->refcnt, surface);
                _tbm_surface_mutex_unlock();
                return;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)\n", surface, surface->refcnt);
+       TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)", surface, surface->refcnt);
 
        if (surface->refcnt == 0)
                _tbm_surface_internal_destroy(surface);
@@ -1281,7 +1281,7 @@ tbm_surface_internal_get_num_bos(tbm_surface_h surface)
        if (!num)
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) num_bos(%d)\n", surface, num);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) num_bos(%d)", surface, num);
 
        _tbm_surface_mutex_unlock();
 
@@ -1303,7 +1303,7 @@ tbm_surface_internal_get_bo(tbm_surface_h surface, int bo_idx)
        surf = (struct _tbm_surface *)surface;
        bo = surf->bos[bo_idx];
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) bo_idx(%d) tbm_bo(%p)\n", surface, bo_idx, bo);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) bo_idx(%d) tbm_bo(%p)", surface, bo_idx, bo);
 
        _tbm_surface_mutex_unlock();
 
@@ -1324,7 +1324,7 @@ tbm_surface_internal_get_size(tbm_surface_h surface)
        surf = (struct _tbm_surface *)surface;
        size = surf->info.size;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) size(%u)\n", surface, size);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) size(%u)", surface, size);
 
        _tbm_surface_mutex_unlock();
 
@@ -1346,7 +1346,7 @@ tbm_surface_internal_get_plane_data(tbm_surface_h surface, int plane_idx,
        surf = (struct _tbm_surface *)surface;
 
        if (plane_idx >= surf->info.num_planes) {
-               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) plane_idx(%d)\n", surface, plane_idx);
+               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) plane_idx(%d)", surface, plane_idx);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_surface_mutex_unlock();
                return 0;
@@ -1361,7 +1361,7 @@ tbm_surface_internal_get_plane_data(tbm_surface_h surface, int plane_idx,
        if (pitch)
                *pitch = surf->info.planes[plane_idx].stride;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) size(%u) offset(%u) pitch(%u)\n", surface, plane_idx,
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) size(%u) offset(%u) pitch(%u)", surface, plane_idx,
                                surf->info.planes[plane_idx].size, surf->info.planes[plane_idx].offset,
                                surf->info.planes[plane_idx].stride);
 
@@ -1421,7 +1421,7 @@ tbm_surface_internal_get_info(tbm_surface_h surface, int opt,
                                        tbm_bo_unmap(bos[j]);
 
                                _tbm_set_last_result(error);
-                               TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+                               TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)", surface, opt, map);
                                return 0;
                        }
                }
@@ -1430,7 +1430,7 @@ tbm_surface_internal_get_info(tbm_surface_h surface, int opt,
                for (i = 0; i < num_bos; i++) {
                        bo_handles[i] = tbm_bo_get_handle(bos[i], TBM_DEVICE_CPU);
                        if (bo_handles[i].ptr == NULL) {
-                               TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+                               TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)", surface, opt, map);
                                _tbm_surface_mutex_unlock();
                                return 0;
                        }
@@ -1442,7 +1442,7 @@ tbm_surface_internal_get_info(tbm_surface_h surface, int opt,
                        info->planes[i].ptr = bo_handles[planes_bo_idx[i]].ptr + info->planes[i].offset;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) opt(%d) map(%d)", surface, opt, map);
 
        _tbm_surface_mutex_unlock();
 
@@ -1465,7 +1465,7 @@ tbm_surface_internal_unmap(tbm_surface_h surface)
        for (i = 0; i < surf->num_bos; i++)
                tbm_bo_unmap(surf->bos[i]);
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p)\n", surface);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p)", surface);
 
        _tbm_surface_mutex_unlock();
 }
@@ -1484,7 +1484,7 @@ tbm_surface_internal_get_width(tbm_surface_h surface)
        surf = (struct _tbm_surface *)surface;
        width = surf->info.width;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u)\n", surface, width);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u)", surface, width);
 
        _tbm_surface_mutex_unlock();
 
@@ -1505,7 +1505,7 @@ tbm_surface_internal_get_height(tbm_surface_h surface)
        surf = (struct _tbm_surface *)surface;
        height = surf->info.height;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) height(%u)\n", surface, height);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) height(%u)", surface, height);
 
        _tbm_surface_mutex_unlock();
 
@@ -1527,7 +1527,7 @@ tbm_surface_internal_get_format(tbm_surface_h surface)
        surf = (struct _tbm_surface *)surface;
        format = surf->info.format;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) format(%s)\n", surface, _tbm_surface_internal_format_to_str(format));
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) format(%s)", surface, _tbm_surface_internal_format_to_str(format));
 
        _tbm_surface_mutex_unlock();
 
@@ -1549,7 +1549,7 @@ tbm_surface_internal_get_plane_bo_idx(tbm_surface_h surface, int plane_idx)
        surf = (struct _tbm_surface *)surface;
        bo_idx = surf->planes_bo_idx[plane_idx];
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) bo_idx(%d)\n", surface, plane_idx, bo_idx);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) bo_idx(%d)", surface, plane_idx, bo_idx);
 
        _tbm_surface_mutex_unlock();
 
@@ -1570,7 +1570,7 @@ tbm_surface_internal_add_user_data(tbm_surface_h surface, unsigned long key,
        /* check if the data according to the key exist if so, return false. */
        data = user_data_lookup(&surface->user_data_list, key);
        if (data) {
-               TBM_TRACE_SURFACE_INTERNAL("warning: user data already exist tbm_surface(%p) key(%lu)\n", surface, key);
+               TBM_TRACE_SURFACE_INTERNAL("warning: user data already exist tbm_surface(%p) key(%lu)", surface, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_surface_mutex_unlock();
                return 0;
@@ -1578,12 +1578,12 @@ tbm_surface_internal_add_user_data(tbm_surface_h surface, unsigned long key,
 
        data = user_data_create(key, data_free_func);
        if (!data) {
-               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
                _tbm_surface_mutex_unlock();
                return 0;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, data);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, data);
 
        LIST_ADD(&data->item_link, &surface->user_data_list);
 
@@ -1605,7 +1605,7 @@ tbm_surface_internal_set_user_data(tbm_surface_h surface, unsigned long key,
 
        old_data = user_data_lookup(&surface->user_data_list, key);
        if (!old_data) {
-               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_surface_mutex_unlock();
                return 0;
@@ -1616,7 +1616,7 @@ tbm_surface_internal_set_user_data(tbm_surface_h surface, unsigned long key,
 
        old_data->data = data;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, old_data->data);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, old_data->data);
 
        _tbm_surface_mutex_unlock();
 
@@ -1635,7 +1635,7 @@ tbm_surface_internal_get_user_data(tbm_surface_h surface, unsigned long key,
        TBM_SURFACE_RETURN_VAL_IF_FAIL(_tbm_surface_internal_is_valid(surface), 0);
 
        if (!data) {
-               TBM_ERR("error: tbm_surface(%p) key(%lu)\n", surface, key);
+               TBM_ERR("error: tbm_surface(%p) key(%lu)", surface, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_surface_mutex_unlock();
                return 0;
@@ -1644,7 +1644,7 @@ tbm_surface_internal_get_user_data(tbm_surface_h surface, unsigned long key,
 
        old_data = user_data_lookup(&surface->user_data_list, key);
        if (!old_data) {
-               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_surface_mutex_unlock();
                return 0;
@@ -1652,7 +1652,7 @@ tbm_surface_internal_get_user_data(tbm_surface_h surface, unsigned long key,
 
        *data = old_data->data;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, old_data->data);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, old_data->data);
 
        _tbm_surface_mutex_unlock();
 
@@ -1672,13 +1672,13 @@ tbm_surface_internal_delete_user_data(tbm_surface_h surface,
 
        old_data = user_data_lookup(&surface->user_data_list, key);
        if (!old_data) {
-               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+               TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
                _tbm_surface_mutex_unlock();
                return 0;
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, old_data->data);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, old_data->data);
 
        user_data_delete(old_data);
 
@@ -1783,7 +1783,7 @@ tbm_surface_internal_set_debug_data(tbm_surface_h surface, char *key, char *valu
        } else {
                debug_data = _tbm_surface_internal_debug_data_create(key, value);
                if (!debug_data) {
-                       TBM_ERR("error: tbm_surface(%p) key(%s) value(%s)\n", surface, key, value);
+                       TBM_ERR("error: tbm_surface(%p) key(%s) value(%s)", surface, key, value);
                        _tbm_surface_mutex_unlock();
                        return 0;
                }
@@ -1799,7 +1799,7 @@ tbm_surface_internal_set_debug_data(tbm_surface_h surface, char *key, char *valu
                        LIST_ADDTAIL(&debug_data->item_link, &bufmgr->debug_key_list);
        }
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%s) value(%s)\n", surface, key, value);
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%s) value(%s)", surface, key, value);
 
        _tbm_surface_mutex_unlock();
 
@@ -1861,7 +1861,7 @@ _tbm_surface_internal_dump_file_raw(const char *file, void *data1, int size1,
        unsigned int *blocks;
 
        if (_tbm_surface_check_file_is_symbolic_link(file))
-               TBM_ERR("%s is symbolic link\n", file);
+               TBM_ERR("%s is symbolic link", file);
 
        fp = fopen(file, "w+");
        TBM_RETURN_IF_FAIL(fp != NULL);
@@ -1892,7 +1892,7 @@ _tbm_surface_internal_dump_file_png(const char *file, const void *data, int widt
        int depth = 8, y;
 
        if (_tbm_surface_check_file_is_symbolic_link(file))
-               TBM_ERR("%s is symbolic link\n", file);
+               TBM_ERR("%s is symbolic link", file);
 
        fp = fopen(file, "wb");
        TBM_RETURN_IF_FAIL(fp != NULL);
@@ -1900,14 +1900,14 @@ _tbm_surface_internal_dump_file_png(const char *file, const void *data, int widt
        png_structp pPngStruct = png_create_write_struct(PNG_LIBPNG_VER_STRING,
                                                        NULL, NULL, NULL);
        if (!pPngStruct) {
-               TBM_ERR("fail to create a png write structure.\n");
+               TBM_ERR("fail to create a png write structure.");
                fclose(fp);
                return;
        }
 
        png_infop pPngInfo = png_create_info_struct(pPngStruct);
        if (!pPngInfo) {
-               TBM_ERR("fail to create a png info structure.\n");
+               TBM_ERR("fail to create a png info structure.");
                png_destroy_write_struct(&pPngStruct, NULL);
                fclose(fp);
                return;
@@ -1915,7 +1915,7 @@ _tbm_surface_internal_dump_file_png(const char *file, const void *data, int widt
 
        if (setjmp(png_jmpbuf(pPngStruct))) {
                /* if png has problem of writing the file, we get here */
-               TBM_ERR("fail to write png file.\n");
+               TBM_ERR("fail to write png file.");
                png_destroy_write_struct(&pPngStruct, &pPngInfo);
                fclose(fp);
                return;
@@ -1949,7 +1949,7 @@ _tbm_surface_internal_dump_file_png(const char *file, const void *data, int widt
 
        row_pointers = png_malloc(pPngStruct, height * sizeof(png_byte *));
        if (!row_pointers) {
-               TBM_ERR("fail to allocate the png row_pointers.\n");
+               TBM_ERR("fail to allocate the png row_pointers.");
                png_destroy_write_struct(&pPngStruct, &pPngInfo);
                fclose(fp);
                return;
@@ -1961,7 +1961,7 @@ _tbm_surface_internal_dump_file_png(const char *file, const void *data, int widt
 
                row = png_malloc(pPngStruct, sizeof(png_byte) * width * pixel_size);
                if (!row) {
-                       TBM_ERR("fail to allocate the png row.\n");
+                       TBM_ERR("fail to allocate the png row.");
                        for (x = 0; x < y; x++)
                                png_free(pPngStruct, row_pointers[x]);
                        png_free(pPngStruct, row_pointers);
@@ -2027,7 +2027,7 @@ tbm_surface_internal_dump_start(char *path, int w, int h, int count)
 
        /* check running */
        if (g_dump_info) {
-               TBM_WRN("waring already running the tbm_surface_internal_dump.\n");
+               TBM_WRN("waring already running the tbm_surface_internal_dump.");
                return;
        }
 
@@ -2041,14 +2041,14 @@ tbm_surface_internal_dump_start(char *path, int w, int h, int count)
        /* get buffer size */
        tbm_surface = tbm_surface_create(w, h, TBM_FORMAT_ARGB8888);
        if (tbm_surface == NULL) {
-               TBM_ERR("tbm_surface_create fail\n");
+               TBM_ERR("tbm_surface_create fail");
                free(g_dump_info);
                g_dump_info = NULL;
                return;
        }
 
        if (TBM_SURFACE_ERROR_NONE != tbm_surface_get_info(tbm_surface, &info)) {
-               TBM_ERR("tbm_surface_get_info fail\n");
+               TBM_ERR("tbm_surface_get_info fail");
                tbm_surface_destroy(tbm_surface);
                free(g_dump_info);
                g_dump_info = NULL;
@@ -2066,7 +2066,7 @@ tbm_surface_internal_dump_start(char *path, int w, int h, int count)
 
                bo = tbm_bo_alloc(g_surface_bufmgr, buffer_size, TBM_BO_DEFAULT);
                if (bo == NULL) {
-                       TBM_ERR("fail to allocate the tbm_bo[%d]\n", i);
+                       TBM_ERR("fail to allocate the tbm_bo[%d]", i);
                        free(buf_info);
                        goto fail;
                }
@@ -2083,7 +2083,7 @@ tbm_surface_internal_dump_start(char *path, int w, int h, int count)
 
        scale_factor = 0.0;
 
-       TBM_INFO("Dump Start.. path:%s, count:%d\n", g_dump_info->path, count);
+       TBM_INFO("Dump Start.. path:%s, count:%d", g_dump_info->path, count);
 
        return;
 
@@ -2099,7 +2099,7 @@ fail:
                }
        }
 
-       TBM_ERR("Dump Start fail.. path:%s\n", g_dump_info->path);
+       TBM_ERR("Dump Start fail.. path:%s", g_dump_info->path);
 
        free(g_dump_info);
        g_dump_info = NULL;
@@ -2147,7 +2147,7 @@ tbm_surface_internal_dump_end(void)
                }
 
                snprintf(file, sizeof(file), "%s/%s", g_dump_info->path, buf_info->name);
-               TBM_INFO("Dump File.. %s generated.\n", file);
+               TBM_INFO("Dump File.. %s generated.", file);
 
                if (buf_info->dirty) {
                        void *ptr1 = NULL, *ptr2 = NULL;
@@ -2226,7 +2226,7 @@ tbm_surface_internal_dump_end(void)
        free(g_dump_info);
        g_dump_info = NULL;
 
-       TBM_INFO("Dump End..\n");
+       TBM_INFO("Dump End..");
 }
 
 static pixman_format_code_t
@@ -2389,7 +2389,7 @@ tbm_surface_internal_dump_buffer(tbm_surface_h surface, const char *type)
 
                if ((info.format != TBM_FORMAT_ARGB8888) && (info.format != TBM_FORMAT_XRGB8888) &&
                    (info.format != TBM_FORMAT_ABGR8888) && (info.format != TBM_FORMAT_XBGR8888)) {
-                       TBM_WRN("Dump with scale skip. unsupported format(%s)\n",
+                       TBM_WRN("Dump with scale skip. unsupported format(%s)",
                                          _tbm_surface_internal_format_to_str(info.format));
                        tbm_surface_unmap(surface);
                        return;
@@ -2402,7 +2402,7 @@ tbm_surface_internal_dump_buffer(tbm_surface_h surface, const char *type)
                buf_info->info.format = info.format;
                buf_info->info.bpp = _tbm_surface_internal_get_bpp(buf_info->info.format);
                if (!buf_info->info.bpp) {
-                       TBM_ERR("fail to get bpp. error(%s)\n", tbm_error_str(tbm_get_last_error()));
+                       TBM_ERR("fail to get bpp. error(%s)", tbm_error_str(tbm_get_last_error()));
                        tbm_surface_unmap(surface);
                        return;
                }
@@ -2411,14 +2411,14 @@ tbm_surface_internal_dump_buffer(tbm_surface_h surface, const char *type)
                buf_info->info.size = buf_info->info.width * buf_info->info.height * bpp;
 
                if (buf_info->info.size > buf_info->size) {
-                       TBM_WRN("Dump with scale skip. surface over created buffer size(%u, %d)\n",
+                       TBM_WRN("Dump with scale skip. surface over created buffer size(%u, %d)",
                                        buf_info->info.size, buf_info->size);
                        tbm_surface_unmap(surface);
                        return;
                }
        } else {
                if (info.size > buf_info->size) {
-                       TBM_WRN("Dump skip. surface over created buffer size(%u, %d)\n",
+                       TBM_WRN("Dump skip. surface over created buffer size(%u, %d)",
                                        info.size, buf_info->size);
                        tbm_surface_unmap(surface);
                        return;
@@ -2538,7 +2538,7 @@ tbm_surface_internal_dump_buffer(tbm_surface_h surface, const char *type)
 
        g_dump_info->link = next_link;
 
-       TBM_INFO("Dump %s \n", buf_info->name);
+       TBM_INFO("Dump %s ", buf_info->name);
 }
 
 void tbm_surface_internal_dump_shm_buffer(void *ptr, int w, int h, int stride,
@@ -2581,7 +2581,7 @@ void tbm_surface_internal_dump_shm_buffer(void *ptr, int w, int h, int stride,
                size = stride * h;
 
        if (size > buf_info->size) {
-               TBM_WRN("Dump skip. shm buffer over created buffer size(%d, %d)\n",
+               TBM_WRN("Dump skip. shm buffer over created buffer size(%d, %d)",
                                size, buf_info->size);
                return;
        }
@@ -2625,7 +2625,7 @@ void tbm_surface_internal_dump_shm_buffer(void *ptr, int w, int h, int stride,
 
        g_dump_info->link = next_link;
 
-       TBM_INFO("Dump %s \n", buf_info->name);
+       TBM_INFO("Dump %s ", buf_info->name);
 }
 
 int
@@ -2723,7 +2723,7 @@ tbm_surface_internal_capture_buffer(tbm_surface_h surface, const char *path, con
 
        tbm_surface_unmap(surface);
 
-       TBM_TRACE_SURFACE_INTERNAL("Capture %s \n", file);
+       TBM_TRACE_SURFACE_INTERNAL("Capture %s ", file);
 
        return 1;
 }
@@ -2755,7 +2755,7 @@ tbm_surface_internal_capture_shm_buffer(void *ptr, int w, int h, int stride,
 
        _tbm_surface_internal_dump_file_png(file, ptr, w, h, stride, 0);
 
-       TBM_TRACE_SURFACE_INTERNAL("Capture %s \n", file);
+       TBM_TRACE_SURFACE_INTERNAL("Capture %s ", file);
 
        return 1;
 }
@@ -2779,7 +2779,7 @@ tbm_surface_internal_set_damage(tbm_surface_h surface, int x, int y, int width,
        surf->damage.width = width;
        surf->damage.height = height;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)\n",
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)",
                                                        surface, x, y, width, height);
 
        _tbm_surface_mutex_unlock();
@@ -2804,7 +2804,7 @@ tbm_surface_internal_get_damage(tbm_surface_h surface, int *x, int *y, int *widt
        if (width) *width = surf->damage.width;
        if (height) *height = surf->damage.height;
 
-       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)\n",
+       TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)",
                                                        surface, surf->damage.x, surf->damage.y, surf->damage.width, surf->damage.height);
 
        _tbm_surface_mutex_unlock();
index 5d59296..ff82ad8 100644 (file)
@@ -47,7 +47,7 @@ void _tbm_surface_queue_mutex_unlock(void);
 /* check condition */
 #define TBM_SURF_QUEUE_RETURN_IF_FAIL(cond) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_surf_queue_mutex_unlock();\
                return;\
@@ -56,7 +56,7 @@ void _tbm_surface_queue_mutex_unlock(void);
 
 #define TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
+               TBM_ERR("'%s' failed.", #cond);\
                _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
                _tbm_surf_queue_mutex_unlock();\
                return val;\
@@ -180,12 +180,12 @@ static int
 _tbm_surface_queue_is_valid(tbm_surface_queue_h surface_queue)
 {
        if (!surface_queue) {
-               TBM_ERR("error: surface_queue is NULL.\n");
+               TBM_ERR("error: surface_queue is NULL.");
                return 0;
        }
 
        if (!_tbm_surface_queue_magic_check(surface_queue)) {
-               TBM_ERR("error: Invalid tbm_surface_queue(%p)\n", surface_queue);
+               TBM_ERR("error: Invalid tbm_surface_queue(%p)", surface_queue);
                return 0;
        }
 
@@ -304,7 +304,7 @@ _queue_get_node(tbm_surface_queue_h surface_queue, int type,
                }
        }
 
-       TBM_ERR("fail to get the queue_node.\n");
+       TBM_ERR("fail to get the queue_node.");
 
        return NULL;
 }
@@ -364,7 +364,7 @@ _notify_remove(struct list_head *list,
                }
        }
 
-       TBM_ERR("Cannot find notifiy\n");
+       TBM_ERR("Cannot find notifiy");
 }
 
 static void
@@ -424,7 +424,7 @@ _trace_remove(struct list_head *list,
                }
        }
 
-       TBM_ERR("Cannot find notifiy\n");
+       TBM_ERR("Cannot find notifiy");
 }
 
 static void
@@ -641,7 +641,7 @@ tbm_surface_queue_add_destroy_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_add(&surface_queue->destory_noti, destroy_cb, data);
 
@@ -665,7 +665,7 @@ tbm_surface_queue_remove_destroy_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_remove(&surface_queue->destory_noti, destroy_cb, data);
 
@@ -691,7 +691,7 @@ tbm_surface_queue_add_dequeuable_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_add(&surface_queue->dequeuable_noti, dequeuable_cb, data);
 
@@ -715,7 +715,7 @@ tbm_surface_queue_remove_dequeuable_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_remove(&surface_queue->dequeuable_noti, dequeuable_cb, data);
 
@@ -741,7 +741,7 @@ tbm_surface_queue_add_dequeue_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_add(&surface_queue->dequeue_noti, dequeue_cb, data);
 
@@ -765,7 +765,7 @@ tbm_surface_queue_remove_dequeue_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_remove(&surface_queue->dequeue_noti, dequeue_cb, data);
 
@@ -791,7 +791,7 @@ tbm_surface_queue_add_can_dequeue_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_add(&surface_queue->can_dequeue_noti, can_dequeue_cb, data);
 
@@ -815,7 +815,7 @@ tbm_surface_queue_remove_can_dequeue_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_remove(&surface_queue->can_dequeue_noti, can_dequeue_cb, data);
 
@@ -841,7 +841,7 @@ tbm_surface_queue_add_acquirable_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_add(&surface_queue->acquirable_noti, acquirable_cb, data);
 
@@ -865,7 +865,7 @@ tbm_surface_queue_remove_acquirable_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_remove(&surface_queue->acquirable_noti, acquirable_cb, data);
 
@@ -891,7 +891,7 @@ tbm_surface_queue_add_trace_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _trace_add(&surface_queue->trace_noti, trace_cb, data);
 
@@ -915,7 +915,7 @@ tbm_surface_queue_remove_trace_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _trace_remove(&surface_queue->trace_noti, trace_cb, data);
 
@@ -941,7 +941,7 @@ tbm_surface_queue_set_alloc_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (surface_queue->alloc_cb2) {
                TBM_ERR("must use either alloc_cb or alloc_cb2");
@@ -977,7 +977,7 @@ tbm_surface_queue_set_alloc_cb2(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (surface_queue->alloc_cb) {
                TBM_ERR("must use either alloc_cb or alloc_cb2");
@@ -1008,7 +1008,7 @@ tbm_surface_queue_get_width(tbm_surface_queue_h surface_queue)
 
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        width = surface_queue->width;
 
@@ -1027,7 +1027,7 @@ tbm_surface_queue_get_height(tbm_surface_queue_h surface_queue)
 
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        height = surface_queue->height;
 
@@ -1046,7 +1046,7 @@ tbm_surface_queue_get_format(tbm_surface_queue_h surface_queue)
 
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        format = surface_queue->format;
 
@@ -1065,7 +1065,7 @@ tbm_surface_queue_get_size(tbm_surface_queue_h surface_queue)
 
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        queue_size = surface_queue->queue_size;
 
@@ -1089,7 +1089,7 @@ tbm_surface_queue_add_reset_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_add(&surface_queue->reset_noti, reset_cb, data);
 
@@ -1113,7 +1113,7 @@ tbm_surface_queue_remove_reset_cb(
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _notify_remove(&surface_queue->reset_noti, reset_cb, data);
 
@@ -1144,11 +1144,11 @@ tbm_surface_queue_enqueue(tbm_surface_queue_h
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
 
        node = _queue_get_node(surface_queue, 0, surface, &queue_type);
        if (node == NULL || queue_type != NODE_LIST) {
-               TBM_ERR("tbm_surface_queue_enqueue::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+               TBM_ERR("tbm_surface_queue_enqueue::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
                        node, queue_type);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1169,7 +1169,7 @@ tbm_surface_queue_enqueue(tbm_surface_queue_h
                _tbm_surface_queue_enqueue(surface_queue, node, 1);
 
        if (!_queue_get_node(surface_queue, DIRTY_QUEUE, surface, NULL)) {
-               TBM_ERR("enqueue surface(%p) but surface isn't present in the dirty_queue\n", surface);
+               TBM_ERR("enqueue surface(%p) but surface isn't present in the dirty_queue", surface);
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SEQUENCE);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1219,11 +1219,11 @@ tbm_surface_queue_cancel_dequeue(tbm_surface_queue_h
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
 
        node = _queue_get_node(surface_queue, 0, surface, &queue_type);
        if (node == NULL || queue_type != NODE_LIST) {
-               TBM_ERR("tbm_surface_queue_cancel_dequeue::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+               TBM_ERR("tbm_surface_queue_cancel_dequeue::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
                        node, queue_type);
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE);
                pthread_mutex_unlock(&surface_queue->lock);
@@ -1233,7 +1233,7 @@ tbm_surface_queue_cancel_dequeue(tbm_surface_queue_h
        }
 
        if (node->delete_pending) {
-               TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+               TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
 
                _queue_delete_node(surface_queue, node);
 
@@ -1247,7 +1247,7 @@ tbm_surface_queue_cancel_dequeue(tbm_surface_queue_h
        }
 
        if (surface_queue->queue_size < surface_queue->num_attached) {
-               TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+               TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
 
                if (surface_queue->impl && surface_queue->impl->need_detach)
                        surface_queue->impl->need_detach(surface_queue, node);
@@ -1269,7 +1269,7 @@ tbm_surface_queue_cancel_dequeue(tbm_surface_queue_h
                _tbm_surface_queue_release(surface_queue, node, 1);
 
        if (_queue_is_empty(&surface_queue->free_queue)) {
-               TBM_ERR("surface_queue->free_queue is empty.\n");
+               TBM_ERR("surface_queue->free_queue is empty.");
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1320,7 +1320,7 @@ tbm_surface_queue_dequeue(tbm_surface_queue_h
                node = _tbm_surface_queue_dequeue(surface_queue);
 
        if (node == NULL || node->surface == NULL) {
-               TBM_ERR("_queue_node_pop_front failed\n");
+               TBM_ERR("_queue_node_pop_front failed");
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_EMPTY);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1331,7 +1331,7 @@ tbm_surface_queue_dequeue(tbm_surface_queue_h
        node->type = QUEUE_NODE_TYPE_DEQUEUE;
        *surface = node->surface;
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, *surface);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, *surface);
 
        pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1367,7 +1367,7 @@ tbm_surface_queue_can_dequeue_wait_timeout(tbm_surface_queue_h surface_queue, in
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (_queue_is_empty(&surface_queue->free_queue)) {
                if (surface_queue->impl && surface_queue->impl->need_attach)
@@ -1438,7 +1438,7 @@ tbm_surface_queue_can_dequeue(tbm_surface_queue_h surface_queue, int wait)
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (_queue_is_empty(&surface_queue->free_queue)) {
                if (surface_queue->impl && surface_queue->impl->need_attach)
@@ -1492,11 +1492,11 @@ tbm_surface_queue_release(tbm_surface_queue_h
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
 
        node = _queue_get_node(surface_queue, 0, surface, &queue_type);
        if (node == NULL || queue_type != NODE_LIST) {
-               TBM_ERR("tbm_surface_queue_release::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+               TBM_ERR("tbm_surface_queue_release::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
                        node, queue_type);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1512,7 +1512,7 @@ tbm_surface_queue_release(tbm_surface_queue_h
        }
 
        if (node->delete_pending) {
-               TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+               TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
 
                _queue_delete_node(surface_queue, node);
 
@@ -1526,7 +1526,7 @@ tbm_surface_queue_release(tbm_surface_queue_h
        }
 
        if (surface_queue->queue_size < surface_queue->num_attached) {
-               TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+               TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
 
                if (surface_queue->impl && surface_queue->impl->need_detach)
                        surface_queue->impl->need_detach(surface_queue, node);
@@ -1548,7 +1548,7 @@ tbm_surface_queue_release(tbm_surface_queue_h
                _tbm_surface_queue_release(surface_queue, node, 1);
 
        if (!_queue_get_node(surface_queue, FREE_QUEUE, surface, NULL)) {
-               TBM_ERR("release surface(%p) but surface isn't present in the free_queue\n", surface);
+               TBM_ERR("release surface(%p) but surface isn't present in the free_queue", surface);
                _tbm_set_last_result(TBM_SURFACE_ERROR_INVALID_OPERATION);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1587,11 +1587,11 @@ tbm_surface_queue_cancel_acquire(tbm_surface_queue_h
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
 
        node = _queue_get_node(surface_queue, 0, surface, &queue_type);
        if (node == NULL || queue_type != NODE_LIST) {
-               TBM_ERR("tbm_surface_queue_cancel_acquire::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+               TBM_ERR("tbm_surface_queue_cancel_acquire::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
                        node, queue_type);
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST);
                pthread_mutex_unlock(&surface_queue->lock);
@@ -1606,7 +1606,7 @@ tbm_surface_queue_cancel_acquire(tbm_surface_queue_h
                _tbm_surface_queue_enqueue(surface_queue, node, 1);
 
        if (_queue_is_empty(&surface_queue->dirty_queue)) {
-               TBM_ERR("enqueue surface but queue is empty node:%p\n", node);
+               TBM_ERR("enqueue surface but queue is empty node:%p", node);
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1652,7 +1652,7 @@ tbm_surface_queue_acquire(tbm_surface_queue_h
                node = _tbm_surface_queue_acquire(surface_queue);
 
        if (node == NULL || node->surface == NULL) {
-               TBM_ERR("_queue_node_pop_front failed\n");
+               TBM_ERR("_queue_node_pop_front failed");
                _tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_EMPTY);
                pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1677,7 +1677,7 @@ tbm_surface_queue_acquire(tbm_surface_queue_h
 
        if (surface_queue->acquire_sync_count > 0) surface_queue->acquire_sync_count--;
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, *surface);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, *surface);
 
        pthread_mutex_unlock(&surface_queue->lock);
 
@@ -1701,7 +1701,7 @@ tbm_surface_queue_can_acquire(tbm_surface_queue_h surface_queue, int wait)
 
        pthread_mutex_lock(&surface_queue->lock);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (!_queue_is_empty(&surface_queue->dirty_queue)) {
                pthread_mutex_unlock(&surface_queue->lock);
@@ -1732,7 +1732,7 @@ tbm_surface_queue_destroy(tbm_surface_queue_h surface_queue)
 
        TBM_SURF_QUEUE_RETURN_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue));
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        surface_queue->magic = 0;
 
@@ -1771,7 +1771,7 @@ tbm_surface_queue_reset(tbm_surface_queue_h
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue),
                               TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (width == surface_queue->width && height == surface_queue->height &&
                format == surface_queue->format) {
@@ -1868,7 +1868,7 @@ tbm_surface_queue_set_size(tbm_surface_queue_h
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(queue_size > 0,
                                        TBM_ERROR_INVALID_PARAMETER);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if ((surface_queue->queue_size == queue_size) && !flush) {
                _tbm_surf_queue_mutex_unlock();
@@ -1922,7 +1922,7 @@ tbm_surface_queue_set_size(tbm_surface_queue_h
                        int need_del = surface_queue->queue_size - queue_size;
 
                        LIST_FOR_EACH_ENTRY_SAFE(node, tmp, &surface_queue->free_queue.head, item_link) {
-                               TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+                               TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
 
                                if (surface_queue->impl && surface_queue->impl->need_detach)
                                        surface_queue->impl->need_detach(surface_queue, node);
@@ -1957,7 +1957,7 @@ tbm_surface_queue_free_flush(tbm_surface_queue_h surface_queue)
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue),
                               TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (surface_queue->num_attached == 0) {
                _tbm_surf_queue_mutex_unlock();
@@ -2000,7 +2000,7 @@ tbm_surface_queue_flush(tbm_surface_queue_h surface_queue)
        TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue),
                               TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE);
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        if (surface_queue->num_attached == 0) {
                _tbm_surf_queue_mutex_unlock();
@@ -2177,13 +2177,13 @@ tbm_surface_queue_create(int queue_size, int width,
        tbm_surface_queue_h surface_queue = (tbm_surface_queue_h) calloc(1,
                                            sizeof(struct _tbm_surface_queue));
        if (!surface_queue) {
-               TBM_ERR("cannot allocate the surface_queue.\n");
+               TBM_ERR("cannot allocate the surface_queue.");
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                _tbm_surf_queue_mutex_unlock();
                return NULL;
        }
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        _tbm_surface_queue_init(surface_queue,
                                queue_size,
@@ -2299,18 +2299,18 @@ tbm_surface_queue_sequence_create(int queue_size, int width,
        tbm_surface_queue_h surface_queue = (tbm_surface_queue_h) calloc(1,
                                            sizeof(struct _tbm_surface_queue));
        if (surface_queue == NULL) {
-               TBM_ERR("cannot allocate the surface_queue.\n");
+               TBM_ERR("cannot allocate the surface_queue.");
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                _tbm_surf_queue_mutex_unlock();
                return NULL;
        }
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
 
        tbm_queue_sequence *data = (tbm_queue_sequence *) calloc(1,
                                   sizeof(tbm_queue_sequence));
        if (data == NULL) {
-               TBM_ERR("cannot allocate the tbm_queue_sequence.\n");
+               TBM_ERR("cannot allocate the tbm_queue_sequence.");
                _tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
                free(surface_queue);
                _tbm_surf_queue_mutex_unlock();
@@ -2373,7 +2373,7 @@ tbm_surface_queue_set_sync_count(tbm_surface_queue_h surface_queue,
        else
                surface_queue->enqueue_sync_count = dequeue_num + sync_count;
 
-       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) enqueue_sync_count:(%d) acquire_sync_count:(%d)\n",
+       TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) enqueue_sync_count:(%d) acquire_sync_count:(%d)",
                                surface_queue, surface_queue->enqueue_sync_count, surface_queue->acquire_sync_count);
 
        pthread_mutex_unlock(&surface_queue->lock);
index d4bcd66..9421436 100644 (file)
@@ -94,10 +94,10 @@ _log_errno()
        char    buf[ERRNO_BUF_SIZE];
 
        if (strerror_r(errnum, buf, ERRNO_BUF_SIZE) == 0) {
-               TBM_ERR("errno : %d(%s)\n", errnum, buf);
+               TBM_ERR("errno : %d(%s)", errnum, buf);
                return;
        } else {
-               TBM_ERR("errno : %d()\n", errnum);
+               TBM_ERR("errno : %d()", errnum);
                return;
        }
 }