Fix dlog format issues 87/194987/1 accepted/tizen/unified/20181210.152257 submit/tizen/20181210.061733
authorTaesoo Jun <steve.jun@samsung.com>
Mon, 10 Dec 2018 05:33:33 +0000 (14:33 +0900)
committerTaesoo Jun <steve.jun@samsung.com>
Mon, 10 Dec 2018 05:33:33 +0000 (14:33 +0900)
Change-Id: I52f47f8249e7b51e341691e66067ba882178f4de

include/util/mtp_thread.h
src/entity/mtp_object.c
src/entity/mtp_store.c
src/mtp_cmd_handler.c
src/mtp_cmd_handler_util.c
src/mtp_event_handler.c
src/ptp_container.c
src/transport/mtp_transport.c
src/transport/mtp_usb_driver_ffs.c
src/transport/mtp_usb_driver_slp.c
src/util/mtp_thread.c

index 208ea1b..4b9a0cf 100755 (executable)
@@ -30,7 +30,7 @@ typedef void *(*thread_func_t) (void *pArg);
 #define UTIL_LOCK_MUTEX(mut)\
        do {\
                int lock_ret = 0;\
-               DBG("Thread [%d] trying to lock the Mutex \n", syscall(__NR_gettid));\
+               DBG("Thread [%ld] trying to lock the Mutex \n", syscall(__NR_gettid));\
                lock_ret = pthread_mutex_lock(mut);\
                if (lock_ret != 0) {\
                        if (lock_ret == EDEADLK) {\
@@ -39,7 +39,7 @@ typedef void *(*thread_func_t) (void *pArg);
                                ERR("Error locking mutex. Error = %d \n", lock_ret);\
                        } \
                } else {\
-                       DBG("Mutex locked by thread [%d] \n", syscall(__NR_gettid));\
+                       DBG("Mutex locked by thread [%ld] \n", syscall(__NR_gettid));\
                } \
        } while (0);\
 
@@ -51,7 +51,7 @@ typedef void *(*thread_func_t) (void *pArg);
                if (unlock_ret != 0) {\
                        ERR("Error unlocking mutex. Error = %d \n", unlock_ret);\
                } else {\
-                       DBG("Mutex unlocked by thread [%d] \n", syscall(__NR_gettid));\
+                       DBG("Mutex unlocked by thread [%ld] \n", syscall(__NR_gettid));\
                } \
        } while (0);\
 
index 1fd5dae..5c8f3a1 100755 (executable)
@@ -501,7 +501,7 @@ mtp_bool _entity_check_child_obj_path(mtp_obj_t *obj,
        _prop_init_ptparray(&child_arr, UINT32_TYPE);
        _entity_get_child_handles(src_store, obj->obj_handle, &child_arr);
 
-       DBG("obj_handle[%d], src_path[%s], dest_path[%s], num elements[%ld]\n",
+       DBG("obj_handle[%d], src_path[%s], dest_path[%s], num elements[%u]\n",
                        obj->obj_handle, src_path, dest_path, child_arr.num_ele);
 
        for (idx = 0; idx < child_arr.num_ele; idx++) {
@@ -597,7 +597,7 @@ mtp_bool _entity_set_child_object_path(mtp_obj_t *obj, mtp_char *src_path,
 
        _prop_init_ptparray(&child_arr, UINT32_TYPE);
        _entity_get_child_handles(src_store, obj->obj_handle, &child_arr);
-       DBG("Object handle[%ld], src_path[%s], dest_path[%s], Numchild[%ld]\n",
+       DBG("Object handle[%u], src_path[%s], dest_path[%s], Numchild[%u]\n",
                        obj->obj_handle, src_path, dest_path, child_arr.num_ele);
 
        for (idx = 0; idx < child_arr.num_ele; idx++) {
@@ -605,7 +605,7 @@ mtp_bool _entity_set_child_object_path(mtp_obj_t *obj, mtp_char *src_path,
                child_obj = _entity_get_object_from_store(src_store, child_handle_arr[idx]);
                if (NULL == child_obj)
                        continue;
-               DBG_SECURE("obj_handle[%ld], full path[%s]\n", child_obj->obj_handle,
+               DBG_SECURE("obj_handle[%u], full path[%s]\n", child_obj->obj_handle,
                                child_obj->file_path);
                g_strlcpy(temp_child_path, child_obj->file_path,
                                sizeof(temp_child_path));
index 07dc8a1..d8fc4a8 100755 (executable)
@@ -976,7 +976,7 @@ mtp_uint16 _entity_delete_obj_mtp_store(mtp_store_t *store,
 
                }
        } else {
-               DBG("object handle is not PTP_OBJECTHANDLE_ALL. [%ld]\n",
+               DBG("object handle is not PTP_OBJECTHANDLE_ALL. [%u]\n",
                                obj_handle);
                obj = _entity_get_object_from_store(store, obj_handle);
 
index fbc1dbf..c3bbbab 100755 (executable)
@@ -3216,7 +3216,7 @@ void _receive_mq_data_cb(mtp_char *buffer, mtp_int32 buf_len)
                code = tmp->code;
                trid = tmp->tid;
 
-               DBG("len[%ld], type[0x%x], code [0x%x], trid[0x%x]\n",
+               DBG("len[%lu], type[0x%x], code [0x%x], trid[0x%lu]\n",
                                len, type, code, trid);
 
                if (_hdlr_validate_cmd_container((mtp_byte *)tmp, len)
@@ -3285,7 +3285,7 @@ void _receive_mq_data_cb(mtp_char *buffer, mtp_int32 buf_len)
                /* ignore other case */
                ERR("MTP device phase[%d], unknown device PHASE\n",
                                _device_get_phase());
-               ERR("PhaseUnknown-> pData[0x%x], length=[%d]", buffer, buf_len);
+               ERR("PhaseUnknown-> pData[0x%p], length=[%d]", buffer, buf_len);
                _device_set_phase(DEVICE_PHASE_IDLE);
                _transport_set_mtp_operation_state(MTP_STATE_ONSERVICE);
        }
index ba9d3e8..56e275b 100755 (executable)
@@ -221,7 +221,7 @@ mtp_err_t _hutil_add_object_entry(obj_info_t *obj_info, mtp_char *file_name,
        }
 
        if (store->store_info.free_space < obj_info->file_size) {
-               ERR("free space is not enough [%ld] bytes, object size[%ld]\n",
+               ERR("free space is not enough [%llu] bytes, object size[%llu]\n",
                                store->store_info.free_space, obj_info->file_size);
                _entity_dealloc_obj_info(obj_info);
                return MTP_ERROR_STORE_FULL;
@@ -407,7 +407,7 @@ mtp_err_t _hutil_add_object_entry(obj_info_t *obj_info, mtp_char *file_name,
 
                if (file_exist == FALSE) {
                        DBG_SECURE("Found a unique file name for the incoming object\
-                                       [%s]\n", temp_wfname);
+                                       [0x%p]\n", temp_wfname);
                        break;
                }
 
@@ -1534,7 +1534,7 @@ mtp_err_t _hutil_construct_object_entry(mtp_uint32 store_id,
        if ((store->store_info.free_space) == 0 ||
                        (store->store_info.free_space >
                         store->store_info.capacity)) {
-               ERR("free space is not enough [%ld:%ld]\n",
+               ERR("free space is not enough [%llu:%llu]\n",
                                store->store_info.free_space,
                                store->store_info.capacity);
                return MTP_ERROR_STORE_FULL;
@@ -1633,13 +1633,13 @@ mtp_err_t _hutil_construct_object_entry_prop_list(mtp_uint32 store_id,
 
        if ((store->store_info.free_space) == 0 ||
                        (store->store_info.free_space > store->store_info.capacity)) {
-               ERR("free space is not enough [%ld bytes]\n",
+               ERR("free space is not enough [%llu bytes]\n",
                                store->store_info.free_space);
                return MTP_ERROR_STORE_FULL;
        }
 
        if (store->store_info.free_space <= obj_sz) {
-               ERR("free space is not enough [%ld bytes]\n",
+               ERR("free space is not enough [%llu bytes]\n",
                                store->store_info.free_space);
                return MTP_ERROR_STORE_FULL;
        }
index fc63ae1..a2aa7e0 100755 (executable)
@@ -303,14 +303,14 @@ static mtp_bool __send_events_from_device_to_pc(mtp_dword store_id,
        switch (ptp_event) {
        case PTP_EVENTCODE_STOREADDED:
                DBG("case PTP_EVENTCODE_STOREADDED:");
-               DBG("store_id [0x%x]\n", store_id);
+               DBG("store_id [0x%lu]\n", store_id);
                _hdlr_init_event_container(&event, PTP_EVENTCODE_STOREADDED, 0,
                                store_id, 0);
                break;
 
        case PTP_EVENTCODE_STOREREMOVED:
                DBG("case PTP_EVENTCODE_STOREREMOVED");
-               DBG("store_id [0x%x]\n", store_id);
+               DBG("store_id [0x%lu]\n", store_id);
                _hdlr_init_event_container(&event,
                                PTP_EVENTCODE_STOREREMOVED, 0, store_id, 0);
                break;
index 87e8950..9d44f57 100755 (executable)
@@ -289,7 +289,7 @@ mtp_bool _hdlr_rcv_file_in_data_container(data_container_t *dst,
                ERR("HEADER FAILURE");
                ERR("HEADER length[%d], Type[%d], Code[%d], tid[%d]\n",
                                dst->len, dst->type, dst->code, dst->tid);
-               ERR("EXPECTED length[%d], Type[%d], Code[%d], tid[%d]\n",
+               ERR("EXPECTED length[%llu], Type[%d], Code[%d], tid[%d]\n",
                                bytes_rcvd, CONTAINER_DATA_BLK, exp_code, exp_tid);
                return FALSE;
        }
index ba76b86..bcb3125 100755 (executable)
@@ -513,7 +513,7 @@ static void *__transport_thread_data_rcv(void *func)
                }
        }
 
-       ERR("thread_data_rcv[%u] exiting\n", g_data_rcv);
+       ERR("thread_data_rcv[%lu] exiting\n", g_data_rcv);
        _util_thread_exit("__transport_thread_data_rcv is over");
        return NULL;
 }
index 68f9803..4c3e844 100755 (executable)
@@ -311,7 +311,7 @@ static int __setup(int ep0, struct usb_ctrlrequest *ctrl)
                DBG(__FILE__ "(%s):%d: USB_PTPREQUEST_%s",
                    __func__, __LINE__, requests[ctrl->bRequest-0x64]);
                if (wValue != 0 || wIndex != 0 || wLength != 6) {
-                       DBG("Invalid request parameters: wValue:%d wIndex:%d wLength:%d\n");
+                       DBG("Invalid request parameters: wValue:%hu wIndex:%hu wLength:%hu\n", wIndex, wValue, wLength);
                        rc = -EINVAL;
                        goto stall;
                }
@@ -353,7 +353,7 @@ stall:
 
        if (status != -1 || errno != EL2HLT) {
                ERR(__FILE__"(%s):%d:stall error\n",
-                   __func__, __LINE__, ctrl->bRequestType, ctrl->bRequest);
+                   __func__, __LINE__);
                rc = errno;
        }
        return rc;
index 5f42d4d..7ae85e3 100644 (file)
@@ -330,7 +330,7 @@ static void __handle_control_request(mtp_int32 request)
 
                memcpy(&(cancelreq_data.io_code), buffer, sizeof(mtp_word));
                memcpy(&(cancelreq_data.tid), &buffer[2], sizeof(mtp_dword));
-               DBG("cancel io code [%d], transaction id [%ld]\n",
+               DBG("cancel io code [%d], transaction id [%du]\n",
                    cancelreq_data.io_code, cancelreq_data.tid);
                break;
 
index 3ac847a..e779a50 100644 (file)
@@ -68,7 +68,7 @@ mtp_bool _util_thread_join(pthread_t tid, void **data)
 
        res = pthread_join(tid, data);
        if (res != 0) {
-               ERR("pthread_join Fail res = [%d] for thread [%u] errno [%d]\n",
+               ERR("pthread_join Fail res = [%d] for thread [%lu] errno [%d]\n",
                                res, tid, errno);       //      LCOV_EXCL_LINE
                return FALSE;   //      LCOV_EXCL_LINE
        }
@@ -87,7 +87,7 @@ mtp_bool _util_thread_cancel(pthread_t tid)
 
        res = pthread_cancel(tid);
        if (res != 0) {
-               ERR("pthread_cancel Fail [%d] errno [%d]\n", tid, errno);
+               ERR("pthread_cancel Fail [%lu] errno [%d]\n", tid, errno);
                return FALSE;
        }