Remove unnecessary new line character of log 66/286866/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 12 Jan 2023 07:02:11 +0000 (16:02 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 16 Jan 2023 04:42:37 +0000 (13:42 +0900)
Change-Id: I2232826875d2fd68ef444a8ea61986dd76ea2ff5

src/tbm_backend_log.h
src/tbm_backend_vc4.c

index ff60777..84dcb11 100644 (file)
@@ -85,19 +85,19 @@ void tbm_backend_log_print(int level, const char *fmt, ...);
 
 #define TBM_BACKEND_RETURN_IF_FAIL(cond) {\
        if (!(cond)) {\
-               TBM_BACKEND_ERR("'%s' failed.\n", #cond);\
+               TBM_BACKEND_ERR("'%s' failed.", #cond);\
                return;\
        } \
 }
 #define TBM_BACKEND_RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_BACKEND_ERR("'%s' failed.\n", #cond);\
+               TBM_BACKEND_ERR("'%s' failed.", #cond);\
                return val;\
        } \
 }
 #define TBM_BACKEND_GOTO_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
-               TBM_BACKEND_ERR("'%s' failed.\n", #cond);\
+               TBM_BACKEND_ERR("'%s' failed.", #cond);\
                goto val;\
        } \
 }
index c82298f..bad3cdc 100644 (file)
@@ -162,7 +162,7 @@ _tbm_vc4_open_drm()
 
        udev = udev_new();
        if (!udev) {
-               TBM_BACKEND_ERR("udev_new() failed.\n");
+               TBM_BACKEND_ERR("udev_new() failed.");
                return -1;
        }
 
@@ -200,7 +200,7 @@ _tbm_vc4_open_drm()
        /* Get device file path. */
        filepath = udev_device_get_devnode(drm_device);
        if (!filepath) {
-               TBM_BACKEND_ERR("udev_device_get_devnode() failed.\n");
+               TBM_BACKEND_ERR("udev_device_get_devnode() failed.");
                udev_device_unref(drm_device);
                udev_unref(udev);
                return -1;
@@ -209,7 +209,7 @@ _tbm_vc4_open_drm()
        /* Open DRM device file and check validity. */
        fd = open(filepath, O_RDWR | O_CLOEXEC);
        if (fd < 0) {
-               TBM_BACKEND_ERR("open(%s, O_RDWR | O_CLOEXEC) failed.\n");
+               TBM_BACKEND_ERR("open(%s, O_RDWR | O_CLOEXEC) failed.");
                udev_device_unref(drm_device);
                udev_unref(udev);
                return -1;
@@ -217,7 +217,7 @@ _tbm_vc4_open_drm()
 
        ret = fstat(fd, &s);
        if (ret) {
-               TBM_BACKEND_ERR("fstat() failed %s.\n");
+               TBM_BACKEND_ERR("fstat() failed %s.");
                close(fd);
                udev_device_unref(drm_device);
                udev_unref(udev);
@@ -244,7 +244,7 @@ _check_render_node(void)
 
        udev = udev_new();
        if (!udev) {
-               TBM_BACKEND_ERR("udev_new() failed.\n");
+               TBM_BACKEND_ERR("udev_new() failed.");
                return -1;
        }
 
@@ -261,7 +261,7 @@ _check_render_node(void)
                if (device_parent) {
                        if (strcmp(udev_device_get_sysname(device_parent), "vc4-drm") == 0) {
                                drm_device = device;
-                               TBM_BACKEND_DBG("Found render device: '%s' (%s)\n",
+                               TBM_BACKEND_DBG("Found render device: '%s' (%s)",
                                    udev_device_get_syspath(drm_device),
                                    udev_device_get_sysname(device_parent));
                                break;
@@ -297,7 +297,7 @@ _get_render_node(void)
 
        udev = udev_new();
        if (!udev) {
-               TBM_BACKEND_ERR("udev_new() failed.\n");
+               TBM_BACKEND_ERR("udev_new() failed.");
                return -1;
        }
 
@@ -314,7 +314,7 @@ _get_render_node(void)
                if (device_parent) {
                        if (strcmp(udev_device_get_sysname(device_parent), "vc4-drm") == 0) {
                                drm_device = device;
-                               TBM_BACKEND_DBG("Found render device: '%s' (%s)\n",
+                               TBM_BACKEND_DBG("Found render device: '%s' (%s)",
                                    udev_device_get_syspath(drm_device),
                                    udev_device_get_sysname(device_parent));
                                break;
@@ -328,7 +328,7 @@ _get_render_node(void)
        /* Get device file path. */
        filepath = udev_device_get_devnode(drm_device);
        if (!filepath) {
-               TBM_BACKEND_ERR("udev_device_get_devnode() failed.\n");
+               TBM_BACKEND_ERR("udev_device_get_devnode() failed.");
                udev_device_unref(drm_device);
                udev_unref(udev);
                return -1;
@@ -337,7 +337,7 @@ _get_render_node(void)
        /* Open DRM device file and check validity. */
        fd = open(filepath, O_RDWR | O_CLOEXEC);
        if (fd < 0) {
-               TBM_BACKEND_ERR("open(%s, O_RDWR | O_CLOEXEC) failed.\n");
+               TBM_BACKEND_ERR("open(%s, O_RDWR | O_CLOEXEC) failed.");
                udev_device_unref(drm_device);
                udev_unref(udev);
                return -1;
@@ -345,7 +345,7 @@ _get_render_node(void)
 
        ret = fstat(fd, &s);
        if (ret) {
-               TBM_BACKEND_ERR("fstat() failed %s.\n");
+               TBM_BACKEND_ERR("fstat() failed %s.");
                udev_device_unref(drm_device);
                udev_unref(udev);
                close(fd);
@@ -392,14 +392,14 @@ _vc4_bo_handle(tbm_vc4_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_vc4 gem=%d\n", bo_data->gem);
+                               TBM_BACKEND_ERR("Cannot map_vc4 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;
@@ -413,7 +413,7 @@ _vc4_bo_handle(tbm_vc4_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;
@@ -422,7 +422,7 @@ _vc4_bo_handle(tbm_vc4_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;
        }
@@ -461,7 +461,7 @@ tbm_vc4_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;
 }
@@ -1029,7 +1029,7 @@ tbm_vc4_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
        tbm_vc4_bo *bo_data;
 
        if (bufmgr_data == NULL) {
-               TBM_BACKEND_ERR("bufmgr is null\n");
+               TBM_BACKEND_ERR("bufmgr is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -1037,7 +1037,7 @@ tbm_vc4_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
 
        bo_data = calloc(1, sizeof(struct _tbm_vc4_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;
@@ -1052,7 +1052,7 @@ tbm_vc4_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
        arg.width = size;
        arg.flags = flags;/*currently no values for the flags,but it may be used in future extension*/
        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)arg.size);
                free(bo_data);
                if (error)
@@ -1073,7 +1073,7 @@ tbm_vc4_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
 
                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);
                        free(bo_data);
                        if (error)
                                *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -1084,9 +1084,9 @@ tbm_vc4_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size,
 
        /* add bo_data 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), flags:%d, size:%d\n",
+       TBM_BACKEND_DBG("     bo_data:%p, gem:%d(%d), flags:%d, size:%d",
                bo_data,
                bo_data->gem, bo_data->name,
            bo_data->flags_tbm,
@@ -1109,7 +1109,7 @@ tbm_vc4_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error *
        char buf[STRERR_BUFSIZE];
 
        if (bufmgr_data == NULL) {
-               TBM_BACKEND_ERR("bufmgr is null\n");
+               TBM_BACKEND_ERR("bufmgr is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -1121,7 +1121,7 @@ tbm_vc4_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 (%s)\n",
+               TBM_BACKEND_ERR("Cannot get gem handle from fd:%d (%s)",
                               arg.fd, strerror_r(errno, buf, STRERR_BUFSIZE));
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -1131,7 +1131,7 @@ tbm_vc4_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error *
 
        name = _get_name(bufmgr_data->fd, gem);
        if (!name) {
-               TBM_BACKEND_ERR("Cannot get name from gem:%d, fd:%d (%s)\n",
+               TBM_BACKEND_ERR("Cannot get name from gem:%d, fd:%d (%s)",
                               gem, key, strerror_r(errno, buf, STRERR_BUFSIZE));
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -1160,7 +1160,7 @@ tbm_vc4_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error *
 
        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 (%s)\n",
+               TBM_BACKEND_ERR("Cannot get gem info from gem:%d, fd:%d (%s)",
                               gem, key, strerror_r(errno, buf, STRERR_BUFSIZE));
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -1172,7 +1172,7 @@ tbm_vc4_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error *
        memset(&close_arg, 0, sizeof(close_arg));
        close_arg.handle = open_arg.handle;
        if (drmIoctl(bufmgr_data->fd, DRM_IOCTL_GEM_CLOSE, &close_arg)) {
-               TBM_BACKEND_ERR("Cannot close gem_handle.\n",
+               TBM_BACKEND_ERR("Cannot close gem_handle.",
                              strerror_r(errno, buf, STRERR_BUFSIZE));
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_OPERATION;
@@ -1184,7 +1184,7 @@ tbm_vc4_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd key, hal_tbm_error *
 
        bo_data = calloc(1, sizeof(struct _tbm_vc4_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;
@@ -1199,10 +1199,10 @@ tbm_vc4_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,
@@ -1224,7 +1224,7 @@ tbm_vc4_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error
        int ret;
 
        if (bufmgr_data == NULL) {
-               TBM_BACKEND_ERR("bufmgr is null\n");
+               TBM_BACKEND_ERR("bufmgr is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -1241,7 +1241,7 @@ tbm_vc4_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error
 
        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;
@@ -1249,7 +1249,7 @@ tbm_vc4_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error
 
        bo_data = calloc(1, sizeof(struct _tbm_vc4_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;
@@ -1267,7 +1267,7 @@ tbm_vc4_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error
 
                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);
@@ -1278,9 +1278,9 @@ tbm_vc4_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error
 
        /* add bo_data 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, 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,
@@ -1311,14 +1311,14 @@ tbm_vc4_surface_get_bos(hal_tbm_surface *surface, int *num_bos, hal_tbm_error *e
        hal_tbm_surface **bos;
 
        if (surface_data == NULL) {
-               TBM_BACKEND_ERR("surface_data is null\n");
+               TBM_BACKEND_ERR("surface_data is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
        }
 
        if (num_bos == NULL) {
-               TBM_BACKEND_ERR("num_bos is null\n");
+               TBM_BACKEND_ERR("num_bos is null");
                if (error)
                        *error = HAL_TBM_ERROR_INVALID_PARAMETER;
                return NULL;
@@ -1433,7 +1433,7 @@ tbm_vc4_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,
@@ -1441,7 +1441,7 @@ tbm_vc4_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(%s)\n",
+                       TBM_BACKEND_ERR("bo_data:%p fail to munmap(%s)",
                                       bo_data, strerror_r(errno, buf, STRERR_BUFSIZE));
                }
        }
@@ -1457,10 +1457,10 @@ tbm_vc4_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, };
@@ -1468,7 +1468,7 @@ tbm_vc4_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.(%s)\n",
+               TBM_BACKEND_ERR("bo_data:%p fail to gem close.(%s)",
                               bo_data, strerror_r(errno, buf, STRERR_BUFSIZE));
 
        free(bo_data);
@@ -1521,13 +1521,13 @@ tbm_vc4_bo_get_handle(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_err
        }
 
        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,
@@ -1538,7 +1538,7 @@ tbm_vc4_bo_get_handle(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_err
        /*Get mapped bo_handle*/
        bo_handle = _vc4_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;
@@ -1573,13 +1573,13 @@ tbm_vc4_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,
@@ -1589,7 +1589,7 @@ tbm_vc4_bo_map(hal_tbm_bo *bo, hal_tbm_bo_device_type device,
        /*Get mapped bo_handle*/
        bo_handle = _vc4_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_OPERATION;
@@ -1626,7 +1626,7 @@ tbm_vc4_bo_unmap(hal_tbm_bo *bo)
 
        bo_data->last_map_device = -1;
 
-       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);
@@ -1665,14 +1665,14 @@ tbm_vc4_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 (%s)\n",
+               TBM_BACKEND_ERR("bo_data:%p Cannot dmabuf=%d (%s)",
                               bo_data, bo_data->gem, strerror_r(errno, buf, STRERR_BUFSIZE));
                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,
@@ -1700,14 +1700,14 @@ tbm_vc4_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,
@@ -1728,7 +1728,7 @@ _tbm_vc4_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;
 }
@@ -1790,7 +1790,7 @@ hal_backend_tbm_vc4_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;
        }
@@ -1799,7 +1799,7 @@ hal_backend_tbm_vc4_init(void **data)
        /* allocate a hal_tbm_bufmgr */
        bufmgr_data = calloc(1, sizeof(struct _tbm_vc4_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;
@@ -1807,7 +1807,7 @@ hal_backend_tbm_vc4_init(void **data)
        // open drm_fd
        drm_fd = _tbm_vc4_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;
        }
 
@@ -1821,7 +1821,7 @@ hal_backend_tbm_vc4_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
@@ -1831,7 +1831,7 @@ hal_backend_tbm_vc4_init(void **data)
                backend_data->drm_info.auth_drm_fd_func = _tbm_vc4_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*/
@@ -1843,7 +1843,7 @@ hal_backend_tbm_vc4_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;
@@ -1861,7 +1861,7 @@ hal_backend_tbm_vc4_init(void **data)
        /* alloc and register surface_funcs */
        surface_funcs = calloc(1, sizeof(struct _hal_tbm_surface_funcs));
        if (!surface_funcs) {
-               TBM_BACKEND_ERR("fail to alloc surface_funcs!\n");
+               TBM_BACKEND_ERR("fail to alloc surface_funcs!");
                goto fail_alloc_surface_funcs;
        }
        backend_data->surface_funcs = surface_funcs;
@@ -1874,7 +1874,7 @@ hal_backend_tbm_vc4_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;
@@ -1890,7 +1890,7 @@ hal_backend_tbm_vc4_init(void **data)
        bo_funcs->bo_export_fd = tbm_vc4_bo_export_fd;
        bo_funcs->bo_export_key = tbm_vc4_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;