Remove new line character in log 65/295665/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 12 Jul 2023 06:48:02 +0000 (15:48 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 12 Jul 2023 07:35:13 +0000 (16:35 +0900)
Change-Id: I7e4254e6d8be3c0f136d35c048791de5dbe3cd79

src/tbm_backend_dumb.c

index f646dc6..cdfe526 100644 (file)
@@ -171,7 +171,7 @@ _tbm_dumb_find_primary_gpu(void)
 
        udev = udev_new();
        if (!udev) {
-               TBM_BACKEND_ERR("fail to initialize udev context\n");
+               TBM_BACKEND_ERR("fail to initialize udev context");
                return NULL;
        }
 
@@ -305,14 +305,14 @@ _dumb_bo_handle(tbm_dumb_bo *bo_data, int device)
 
                        arg.handle = bo_data->gem;
                        if (drmIoctl(bo_data->fd, DRM_IOCTL_MODE_MAP_DUMB, &arg)) {
-                          TBM_BACKEND_ERR("Cannot map_ gem=%d\n", bo_data->gem);
+                          TBM_BACKEND_ERR("Cannot map_ gem=%d", bo_data->gem);
                           return (hal_tbm_bo_handle) NULL;
                        }
 
                        map = mmap(NULL, bo_data->size, PROT_READ | PROT_WRITE, MAP_SHARED,
                                                          bo_data->fd, arg.offset);
                        if (map == MAP_FAILED) {
-                               TBM_BACKEND_ERR("Cannot usrptr gem=%d\n", bo_data->gem);
+                               TBM_BACKEND_ERR("Cannot usrptr gem=%d", bo_data->gem);
                                return (hal_tbm_bo_handle) NULL;
                        }
                        bo_data->pBase = map;
@@ -325,7 +325,7 @@ _dumb_bo_handle(tbm_dumb_bo *bo_data, int device)
 
                        arg.handle = bo_data->gem;
                        if (drmIoctl(bo_data->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &arg)) {
-                               TBM_BACKEND_ERR("Cannot dmabuf=%d\n", bo_data->gem);
+                               TBM_BACKEND_ERR("Cannot dmabuf=%d", bo_data->gem);
                                return (hal_tbm_bo_handle) NULL;
                        }
                        bo_data->dmabuf = arg.fd;
@@ -339,7 +339,7 @@ _dumb_bo_handle(tbm_dumb_bo *bo_data, int device)
 
                        arg.handle = bo_data->gem;
                        if (drmIoctl(bo_data->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &arg)) {
-                               TBM_BACKEND_ERR("Cannot dmabuf=%d\n", bo_data->gem);
+                               TBM_BACKEND_ERR("Cannot dmabuf=%d", bo_data->gem);
                                return (hal_tbm_bo_handle) NULL;
                        }
                        bo_data->dmabuf = arg.fd;
@@ -348,7 +348,7 @@ _dumb_bo_handle(tbm_dumb_bo *bo_data, int device)
                bo_handle.u32 = (uint32_t)bo_data->dmabuf;
                break;
        default:
-               TBM_BACKEND_ERR("Not supported device:%d\n", device);
+               TBM_BACKEND_ERR("Not supported device:%d", device);
                bo_handle.ptr = (void *) NULL;
                break;
        }
@@ -360,7 +360,7 @@ _dumb_bo_handle(tbm_dumb_bo *bo_data, int device)
 static int
 _dumb_cache_flush(int fd, tbm_dumb_bo *bo_data, int flags)
 {
-       TBM_BACKEND_ERR("warning fail to flush the cache.\n");
+       TBM_BACKEND_ERR("warning fail to flush the cache.");
        return 1;
 }
 #endif
@@ -396,7 +396,7 @@ tbm_dumb_bufmgr_get_supported_formats(hal_tbm_bufmgr *bufmgr,
        *formats = color_formats;
        *num = TBM_COLOR_FORMAT_COUNT;
 
-       TBM_BACKEND_DBG("supported format count = %d\n", *num);
+       TBM_BACKEND_DBG("supported format count = %d", *num);
 
        return HAL_TBM_ERROR_NONE;
 }
@@ -655,7 +655,7 @@ tbm_dumb_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
        unsigned int dumb_flags;
 
        if (bufmgr_data == NULL) {
-               TBM_BACKEND_ERR("bufmgr_data is null\n");
+               TBM_BACKEND_ERR("bufmgr_data is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -663,7 +663,7 @@ tbm_dumb_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
 
        bo_data = calloc(1, sizeof(struct _tbm_dumb_bo));
        if (!bo_data) {
-               TBM_BACKEND_ERR("fail to allocate the bo_data private\n");
+               TBM_BACKEND_ERR("fail to allocate the bo_data private");
                if (error)
                        *error = HAL_TBM_ERROR_OUT_OF_MEMORY;
                return NULL;
@@ -680,7 +680,7 @@ tbm_dumb_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
        arg.width = size;
        arg.flags = dumb_flags;
        if (drmIoctl(bufmgr_data->fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg)) {
-               TBM_BACKEND_ERR("Cannot create bo_data(flag:%x, size:%d)\n", arg.flags,
+               TBM_BACKEND_ERR("Cannot create bo_data(flag:%x, size:%d)", arg.flags,
                               (unsigned int)size);
                free(bo_data);
                if (error)
@@ -699,9 +699,9 @@ tbm_dumb_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
 
        /* add bo to hash */
        if (drmHashInsert(bufmgr_data->hashBos, bo_data->name, (void *)bo_data) < 0)
-               TBM_BACKEND_ERR("error Cannot insert bo to Hash(%d)\n", bo_data->name);
+               TBM_BACKEND_ERR("error Cannot insert bo to Hash(%d)", bo_data->name);
 
-       TBM_BACKEND_DBG("     bo_data:%p, gem:%d(%d), flags:%d(%d), size:%d\n",
+       TBM_BACKEND_DBG("     bo_data:%p, gem:%d(%d), flags:%d(%d), size:%d",
                bo_data,
                bo_data->gem, bo_data->name,
            bo_data->flags_tbm,
@@ -723,7 +723,7 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
        int ret;
 
        if (bufmgr_data == NULL) {
-               TBM_BACKEND_ERR("bufmgr_data is null\n");
+               TBM_BACKEND_ERR("bufmgr_data is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -735,7 +735,7 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
        arg.fd = key;
        arg.flags = 0;
        if (drmIoctl(bufmgr_data->fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &arg)) {
-               TBM_BACKEND_ERR("Cannot get gem handle from fd:%d (%m)\n",
+               TBM_BACKEND_ERR("Cannot get gem handle from fd:%d (%m)",
                               arg.fd);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -745,7 +745,7 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
 
        name = _get_name(bufmgr_data->fd, gem);
        if (name == 0) {
-               TBM_BACKEND_ERR("Cannot get name from gem:%d, fd:%d (%m)\n",
+               TBM_BACKEND_ERR("Cannot get name from gem:%d, fd:%d (%m)",
                               gem, key);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -774,7 +774,7 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
        /* Open the same GEM object only for finding out its size */
        open_arg.name = name;
        if (drmIoctl(bufmgr_data->fd, DRM_IOCTL_GEM_OPEN, &open_arg)) {
-               TBM_BACKEND_ERR("Cannot get gem info from gem:%d, fd:%d (%m)\n",
+               TBM_BACKEND_ERR("Cannot get gem info from gem:%d, fd:%d (%m)",
                               gem, key);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -785,7 +785,7 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
        struct drm_gem_close gem_close;
        gem_close.handle = open_arg.handle;
        if (drmIoctl(bufmgr_data->fd, DRM_IOCTL_GEM_CLOSE, &gem_close)) {
-               TBM_BACKEND_ERR("Cannot close gem_handle (%m)\n");
+               TBM_BACKEND_ERR("Cannot close gem_handle (%m)");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
                return NULL;
@@ -796,7 +796,7 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
 
        bo_data = calloc(1, sizeof(struct _tbm_dumb_bo));
        if (!bo_data) {
-               TBM_BACKEND_ERR("bo_data:%p fail to allocate the bo_data\n", bo_data);
+               TBM_BACKEND_ERR("bo_data:%p fail to allocate the bo_data", bo_data);
                if (error)
                        *error = HAL_TBM_ERROR_OUT_OF_MEMORY;
                return NULL;
@@ -813,10 +813,10 @@ tbm_dumb_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error
 
        /* add bo_data to hash */
        if (drmHashInsert(bufmgr_data->hashBos, bo_data->name, (void *)bo_data) < 0)
-               TBM_BACKEND_ERR("bo_data:%p Cannot insert bo_data to Hash(%d) from gem:%d, fd:%d\n",
+               TBM_BACKEND_ERR("bo_data:%p Cannot insert bo_data to Hash(%d) from gem:%d, fd:%d",
                               bo_data, bo_data->name, gem, key);
 
-       TBM_BACKEND_DBG(" bo_data:%p, gem:%d(%d), fd:%d, key_fd:%d, flags:%d, size:%d\n",
+       TBM_BACKEND_DBG(" bo_data:%p, gem:%d(%d), fd:%d, key_fd:%d, flags:%d, size:%d",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -838,7 +838,7 @@ tbm_dumb_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_erro
        int ret;
 
        if (bufmgr_data == NULL) {
-               TBM_BACKEND_ERR("bufmgr_data is null\n");
+               TBM_BACKEND_ERR("bufmgr_data is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -855,7 +855,7 @@ tbm_dumb_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_erro
 
        arg.name = key;
        if (drmIoctl(bufmgr_data->fd, DRM_IOCTL_GEM_OPEN, &arg)) {
-               TBM_BACKEND_ERR("Cannot open gem name=%d\n", key);
+               TBM_BACKEND_ERR("Cannot open gem name=%d", key);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
                return NULL;
@@ -863,7 +863,7 @@ tbm_dumb_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_erro
 
        bo_data = calloc(1, sizeof(struct _tbm_dumb_bo));
        if (!bo_data) {
-               TBM_BACKEND_ERR("fail to allocate the bo_data private\n");
+               TBM_BACKEND_ERR("fail to allocate the bo_data private");
                if (error)
                        *error = HAL_TBM_ERROR_OUT_OF_MEMORY;
                return NULL;
@@ -882,7 +882,7 @@ tbm_dumb_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_erro
 
                arg.handle = bo_data->gem;
                if (drmIoctl(bo_data->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &arg)) {
-                       TBM_BACKEND_ERR("fail to DRM_IOCTL_PRIME_HANDLE_TO_FD gem=%d\n", bo_data->gem);
+                       TBM_BACKEND_ERR("fail to DRM_IOCTL_PRIME_HANDLE_TO_FD gem=%d", bo_data->gem);
                        if (error)
                                *error = HAL_TBM_ERROR_INVALID_OPERATION;
                        free(bo_data);
@@ -893,9 +893,9 @@ tbm_dumb_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_erro
 
        /* add bo to hash */
        if (drmHashInsert(bufmgr_data->hashBos, bo_data->name, (void *)bo_data) < 0)
-               TBM_BACKEND_ERR("Cannot insert bo_data to Hash(%d)\n", bo_data->name);
+               TBM_BACKEND_ERR("Cannot insert bo_data to Hash(%d)", bo_data->name);
 
-       TBM_BACKEND_DBG("    bo_data:%p, gem:%d(%d), fd:%d, flags:%d(%d), size:%d\n",
+       TBM_BACKEND_DBG("    bo_data:%p, gem:%d(%d), fd:%d, flags:%d(%d), size:%d",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -923,7 +923,7 @@ tbm_dumb_bo_free(hal_tbm_bo *bo)
        if (!bufmgr_data)
                return;
 
-       TBM_BACKEND_DBG("      bo_data:%p, gem:%d(%d), fd:%d, size:%d\n",
+       TBM_BACKEND_DBG("      bo_data:%p, gem:%d(%d), fd:%d, size:%d",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -931,7 +931,7 @@ tbm_dumb_bo_free(hal_tbm_bo *bo)
 
        if (bo_data->pBase) {
                if (munmap(bo_data->pBase, bo_data->size) == -1) {
-                       TBM_BACKEND_ERR("bo_data:%p fail to munmap (%m)\n",
+                       TBM_BACKEND_ERR("bo_data:%p fail to munmap (%m)",
                                       bo_data);
                }
        }
@@ -947,10 +947,10 @@ tbm_dumb_bo_free(hal_tbm_bo *bo)
        if (ret == 0)
                drmHashDelete(bufmgr_data->hashBos, bo_data->name);
        else
-               TBM_BACKEND_ERR("Cannot find bo_data to Hash(%d), ret=%d\n", bo_data->name, ret);
+               TBM_BACKEND_ERR("Cannot find bo_data to Hash(%d), ret=%d", bo_data->name, ret);
 
        if (temp != bo_data)
-               TBM_BACKEND_ERR("hashBos probably has several BOs with same name!!!\n");
+               TBM_BACKEND_ERR("hashBos probably has several BOs with same name!!!");
 
        /* Free gem handle */
        struct drm_gem_close arg = {0, };
@@ -958,7 +958,7 @@ tbm_dumb_bo_free(hal_tbm_bo *bo)
        memset(&arg, 0, sizeof(arg));
        arg.handle = bo_data->gem;
        if (drmIoctl(bo_data->fd, DRM_IOCTL_GEM_CLOSE, &arg))
-               TBM_BACKEND_ERR("bo_data:%p fail to gem close (%m)\n",
+               TBM_BACKEND_ERR("bo_data:%p fail to gem close (%m)",
                               bo_data);
 
        free(bo_data);
@@ -1011,13 +1011,13 @@ tbm_dumb_bo_get_handle(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_er
        }
 
        if (!bo_data->gem) {
-               TBM_BACKEND_ERR("Cannot map gem=%d\n", bo_data->gem);
+               TBM_BACKEND_ERR("Cannot map gem=%d", bo_data->gem);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return (hal_tbm_bo_handle) NULL;
        }
 
-       TBM_BACKEND_DBG("bo_data:%p, gem:%d(%d), fd:%d, flags:%d, size:%d, %s\n",
+       TBM_BACKEND_DBG("bo_data:%p, gem:%d(%d), fd:%d, flags:%d, size:%d, %s",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -1028,7 +1028,7 @@ tbm_dumb_bo_get_handle(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_er
        /*Get mapped bo_handle*/
        bo_handle = _dumb_bo_handle(bo_data, device);
        if (bo_handle.ptr == NULL) {
-               TBM_BACKEND_ERR("Cannot get handle: gem:%d, device:%d\n",
+               TBM_BACKEND_ERR("Cannot get handle: gem:%d, device:%d",
                        bo_data->gem, device);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -1063,13 +1063,13 @@ tbm_dumb_bo_map(hal_tbm_bo *bo, hal_tbm_bo_device_type device,
        }
 
        if (!bo_data->gem) {
-               TBM_BACKEND_ERR("Cannot map gem=%d\n", bo_data->gem);
+               TBM_BACKEND_ERR("Cannot map gem=%d", bo_data->gem);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return (hal_tbm_bo_handle) NULL;
        }
 
-       TBM_BACKEND_DBG("       bo_data:%p, gem:%d(%d), fd:%d, %s, %s\n",
+       TBM_BACKEND_DBG("       bo_data:%p, gem:%d(%d), fd:%d, %s, %s",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -1079,7 +1079,7 @@ tbm_dumb_bo_map(hal_tbm_bo *bo, hal_tbm_bo_device_type device,
        /*Get mapped bo_handle*/
        bo_handle = _dumb_bo_handle(bo_data, device);
        if (bo_handle.ptr == NULL) {
-               TBM_BACKEND_ERR("Cannot get handle: gem:%d, device:%d, opt:%d\n",
+               TBM_BACKEND_ERR("Cannot get handle: gem:%d, device:%d, opt:%d",
                               bo_data->gem, device, opt);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
@@ -1108,7 +1108,7 @@ tbm_dumb_bo_unmap(hal_tbm_bo *bo)
        if (!bo_data->gem)
                return HAL_TBM_ERROR_INVALID_PARAMETER;
 
-       TBM_BACKEND_DBG("     bo_data:%p, gem:%d(%d), fd:%d\n",
+       TBM_BACKEND_DBG("     bo_data:%p, gem:%d(%d), fd:%d",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf);
@@ -1133,14 +1133,14 @@ tbm_dumb_bo_export_fd(hal_tbm_bo *bo, hal_tbm_error *error)
        arg.handle = bo_data->gem;
        ret = drmIoctl(bo_data->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &arg);
        if (ret) {
-               TBM_BACKEND_ERR("bo_data:%p Cannot dmabuf=%d (%m)\n",
+               TBM_BACKEND_ERR("bo_data:%p Cannot dmabuf=%d (%m)",
                               bo_data, bo_data->gem);
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
                return (hal_tbm_fd)ret;
        }
 
-       TBM_BACKEND_DBG(" bo_data:%p, gem:%d(%d), fd:%d, key_fd:%d, flags:%d, size:%d\n",
+       TBM_BACKEND_DBG(" bo_data:%p, gem:%d(%d), fd:%d, key_fd:%d, flags:%d, size:%d",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -1168,14 +1168,14 @@ tbm_dumb_bo_export_key(hal_tbm_bo *bo, hal_tbm_error *error)
        if (!bo_data->name) {
                bo_data->name = _get_name(bo_data->fd, bo_data->gem);
                if (!bo_data->name) {
-                       TBM_BACKEND_ERR("error Cannot get name\n");
+                       TBM_BACKEND_ERR("error Cannot get name");
                        if (error)
                                *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                        return 0;
                }
        }
 
-       TBM_BACKEND_DBG("    bo_data:%p, gem:%d(%d), fd:%d, flags:%d, size:%d\n",
+       TBM_BACKEND_DBG("    bo_data:%p, gem:%d(%d), fd:%d, flags:%d, size:%d",
            bo_data,
            bo_data->gem, bo_data->name,
            bo_data->dmabuf,
@@ -1196,7 +1196,7 @@ _tbm_dumb_authenticated_drm_fd_handler(hal_tbm_fd auth_fd, void *user_data)
        TBM_BACKEND_RETURN_VAL_IF_FAIL(bufmgr_data != NULL, HAL_TBM_ERROR_INVALID_PARAMETER);
 
        bufmgr_data->fd = auth_fd;
-       TBM_BACKEND_INFO("Get the authenticated drm_fd(%d)!\n", bufmgr_data->fd);
+       TBM_BACKEND_INFO("Get the authenticated drm_fd(%d)!", bufmgr_data->fd);
 
        return HAL_TBM_ERROR_NONE;
 }
@@ -1251,7 +1251,7 @@ hal_backend_tbm_dumb_init(void **data)
        /* allocate a hal_tbm_backend_data */
        backend_data = calloc(1, sizeof(struct _hal_tbm_backend_data));
        if (!backend_data) {
-               TBM_BACKEND_ERR("fail to alloc backend_data!\n");
+               TBM_BACKEND_ERR("fail to alloc backend_data!");
                *data = NULL;
                return -1;
        }
@@ -1260,7 +1260,7 @@ hal_backend_tbm_dumb_init(void **data)
        /* allocate a hal_tbm_bufmgr */
        bufmgr_data = calloc(1, sizeof(struct _tbm_dumb_bufmgr));
        if (!bufmgr_data) {
-               TBM_BACKEND_ERR("fail to alloc bufmgr_data!\n");
+               TBM_BACKEND_ERR("fail to alloc bufmgr_data!");
                goto fail_alloc_bufmgr_data;
        }
        backend_data->bufmgr = (hal_tbm_bufmgr *)bufmgr_data;
@@ -1268,7 +1268,7 @@ hal_backend_tbm_dumb_init(void **data)
        // open drm_fd
        drm_fd = _tbm_dumb_open_drm();
        if (drm_fd < 0) {
-               TBM_BACKEND_ERR("fail to open drm!\n");
+               TBM_BACKEND_ERR("fail to open drm!");
                goto fail_open_drm;
        }
 
@@ -1277,7 +1277,7 @@ hal_backend_tbm_dumb_init(void **data)
 
        ret = drmGetCap(drm_fd, DRM_CAP_DUMB_BUFFER, &cap);
        if (ret || cap == 0) {
-               TBM_BACKEND_ERR("drm buffer isn't supported !\n");
+               TBM_BACKEND_ERR("drm buffer isn't supported !");
                goto fail_get_cap;
        }
 
@@ -1288,7 +1288,7 @@ hal_backend_tbm_dumb_init(void **data)
                backend_data->drm_info.is_master = 1;
 
                bufmgr_data->fd = drm_fd;
-               TBM_BACKEND_INFO("Get the master drm_fd(%d)!\n", bufmgr_data->fd);
+               TBM_BACKEND_INFO("Get the master drm_fd(%d)!", bufmgr_data->fd);
        } else {
                // drm_fd is not a master_drm_fd.
                // request authenticated fd
@@ -1298,7 +1298,7 @@ hal_backend_tbm_dumb_init(void **data)
                backend_data->drm_info.auth_drm_fd_func = _tbm_dumb_authenticated_drm_fd_handler;
                backend_data->drm_info.user_data = bufmgr_data;
 
-               TBM_BACKEND_INFO("A backend requests an authenticated drm_fd.\n");
+               TBM_BACKEND_INFO("A backend requests an authenticated drm_fd.");
        }
 
        /*Create Hash Table*/
@@ -1307,7 +1307,7 @@ hal_backend_tbm_dumb_init(void **data)
        /* alloc and register bufmgr_funcs */
        bufmgr_funcs = calloc(1, sizeof(struct _hal_tbm_bufmgr_funcs));
        if (!bufmgr_funcs) {
-               TBM_BACKEND_ERR("fail to alloc bufmgr_funcs!\n");
+               TBM_BACKEND_ERR("fail to alloc bufmgr_funcs!");
                goto fail_alloc_bufmgr_funcs;
        }
        backend_data->bufmgr_funcs = bufmgr_funcs;
@@ -1323,7 +1323,7 @@ hal_backend_tbm_dumb_init(void **data)
        /* alloc and register bo_funcs */
        bo_funcs = calloc(1, sizeof(struct _hal_tbm_bo_funcs));
        if (!bo_funcs) {
-               TBM_BACKEND_ERR("fail to alloc bo_funcs!\n");
+               TBM_BACKEND_ERR("fail to alloc bo_funcs!");
                goto fail_alloc_bo_funcs;
        }
        backend_data->bo_funcs = bo_funcs;
@@ -1339,7 +1339,7 @@ hal_backend_tbm_dumb_init(void **data)
        bo_funcs->bo_export_fd = tbm_dumb_bo_export_fd;
        bo_funcs->bo_export_key = tbm_dumb_bo_export_key;
 
-       TBM_BACKEND_DBG("drm_fd:%d\n", bufmgr_data->fd);
+       TBM_BACKEND_DBG("drm_fd:%d", bufmgr_data->fd);
 
        return HAL_TBM_ERROR_NONE;