Logging cleanup: AVRC, MCA, GATT, and SMP.

Change-Id: I6d1e61ff023b5fd19f144955cff16831cc18c6e6
diff --git a/stack/gatt/att_protocol.c b/stack/gatt/att_protocol.c
index 51ea284..53a640e 100644
--- a/stack/gatt/att_protocol.c
+++ b/stack/gatt/att_protocol.c
@@ -335,7 +335,7 @@
                 if (op_code == GATT_RSP_READ_BY_TYPE)
                     *p_pair_len = (len + 2);
 
-                GATT_TRACE_WARNING1("attribute value too long, to be truncated to %d", len);
+                GATT_TRACE_WARNING("attribute value too long, to be truncated to %d", len);
             }
 
             ARRAY_TO_STREAM (p, p_data, len);
@@ -364,7 +364,7 @@
 
     if (l2cap_ret == L2CAP_DW_FAILED)
     {
-        GATT_TRACE_ERROR1("ATT   failed to pass msg:0x%0x to L2CAP",
+        GATT_TRACE_ERROR("ATT   failed to pass msg:0x%0x to L2CAP",
             *((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset));
         GKI_freebuf(p_toL2CAP);
         return FALSE;
@@ -391,7 +391,7 @@
     {
     case GATT_RSP_READ_BLOB:
     case GATT_RSP_PREPARE_WRITE:
-        GATT_TRACE_EVENT2 ("ATT_RSP_READ_BLOB/GATT_RSP_PREPARE_WRITE: len = %d offset = %d",
+        GATT_TRACE_EVENT ("ATT_RSP_READ_BLOB/GATT_RSP_PREPARE_WRITE: len = %d offset = %d",
                     p_msg->attr_value.len, p_msg->attr_value.offset);
         offset = p_msg->attr_value.offset;
 /* Coverity: [FALSE-POSITIVE error] intended fall through */
@@ -426,12 +426,12 @@
         break;
 
     default:
-        GATT_TRACE_DEBUG1("attp_build_sr_msg: unknown op code = %d", op_code);
+        GATT_TRACE_DEBUG("attp_build_sr_msg: unknown op code = %d", op_code);
         break;
     }
 
     if (!p_cmd)
-        GATT_TRACE_ERROR0("No resources");
+        GATT_TRACE_ERROR("No resources");
 
     return p_cmd;
 }
@@ -625,7 +625,7 @@
     }
     else
     {
-        GATT_TRACE_ERROR0("Peer device not connected");
+        GATT_TRACE_ERROR("Peer device not connected");
     }
 
     return status;
diff --git a/stack/gatt/gatt_api.c b/stack/gatt/gatt_api.c
index 0321fe8..2fd0f6b 100644
--- a/stack/gatt/gatt_api.c
+++ b/stack/gatt/gatt_api.c
@@ -151,11 +151,11 @@
     tBT_UUID     *p_app_uuid128;
 
 
-    GATT_TRACE_API0 ("GATTS_CreateService" );
+    GATT_TRACE_API ("GATTS_CreateService" );
 
     if (p_reg == NULL)
     {
-        GATT_TRACE_ERROR1 ("Inavlid gatt_if=%d", gatt_if);
+        GATT_TRACE_ERROR ("Inavlid gatt_if=%d", gatt_if);
         return(0);
     }
 
@@ -164,7 +164,7 @@
     if ((p_list = gatt_find_hdl_buffer_by_app_id(p_app_uuid128, p_svc_uuid, svc_inst)) != NULL)
     {
         s_hdl = p_list->asgn_range.s_handle;
-        GATT_TRACE_DEBUG0 ("Service already been created!!");
+        GATT_TRACE_DEBUG ("Service already been created!!");
     }
     else
     {
@@ -196,14 +196,14 @@
         /* check for space */
         if (num_handles > (0xFFFF - s_hdl + 1))
         {
-            GATT_TRACE_ERROR2 ("GATTS_ReserveHandles: no handles, s_hdl: %u  needed: %u", s_hdl, num_handles);
+            GATT_TRACE_ERROR ("GATTS_ReserveHandles: no handles, s_hdl: %u  needed: %u", s_hdl, num_handles);
             return(0);
         }
 
         if ( (p_list = gatt_alloc_hdl_buffer()) == NULL)
         {
             /* No free entry */
-            GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: no free handle blocks");
+            GATT_TRACE_ERROR ("GATTS_ReserveHandles: no free handle blocks");
             return(0);
         }
 
@@ -224,7 +224,7 @@
             if ( (p_buf = gatt_add_pending_new_srv_start(&p_list->asgn_range)) == NULL)
             {
                 /* No free entry */
-                GATT_TRACE_ERROR0 ("gatt_add_pending_new_srv_start: no free blocks");
+                GATT_TRACE_ERROR ("gatt_add_pending_new_srv_start: no free blocks");
 
                 if (p_list)
                 {
@@ -234,13 +234,13 @@
                 return(0);
             }
 
-            GATT_TRACE_DEBUG0 ("Add a new srv chg item");
+            GATT_TRACE_DEBUG ("Add a new srv chg item");
         }
     }
 
     if (!gatts_init_service_db(&p_list->svc_db, p_svc_uuid, is_pri, s_hdl , num_handles))
     {
-        GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: service DB initialization failed");
+        GATT_TRACE_ERROR ("GATTS_ReserveHandles: service DB initialization failed");
         if (p_list)
         {
             gatt_remove_an_item_from_list(p_list_info, p_list);
@@ -252,7 +252,7 @@
         return(0);
     }
 
-    GATT_TRACE_DEBUG6 ("GATTS_CreateService(success): handles needed:%u s_hdl=%u e_hdl=%u %s[%x] is_primary=%d",
+    GATT_TRACE_DEBUG ("GATTS_CreateService(success): handles needed:%u s_hdl=%u e_hdl=%u %s[%x] is_primary=%d",
                        num_handles, p_list->asgn_range.s_handle , p_list->asgn_range.e_handle,
                        ((p_list->asgn_range.svc_uuid.len == 2) ? "uuid16": "uuid128" ),
                        p_list->asgn_range.svc_uuid.uu.uuid16,
@@ -281,12 +281,12 @@
 
     if ((p_decl = gatt_find_hdl_buffer_by_handle(service_handle)) == NULL)
     {
-        GATT_TRACE_DEBUG0("Service not created");
+        GATT_TRACE_DEBUG("Service not created");
         return 0;
     }
     if ((p_incl_decl = gatt_find_hdl_buffer_by_handle(include_svc_handle)) == NULL)
     {
-        GATT_TRACE_DEBUG0("Included Service not created");
+        GATT_TRACE_DEBUG("Included Service not created");
         return 0;
     }
 
@@ -319,14 +319,14 @@
 
     if ((p_decl = gatt_find_hdl_buffer_by_handle(service_handle)) == NULL)
     {
-        GATT_TRACE_DEBUG0("Service not created");
+        GATT_TRACE_DEBUG("Service not created");
         return 0;
     }
     /* data validity checking */
     if (  ((property & GATT_CHAR_PROP_BIT_AUTH) && !(perm & GATT_WRITE_SIGNED_PERM)) ||
           ((perm & GATT_WRITE_SIGNED_PERM) && !(property & GATT_CHAR_PROP_BIT_AUTH)) )
     {
-        GATT_TRACE_DEBUG2("Invalid configuration property=0x%x perm=0x%x ", property, perm);
+        GATT_TRACE_DEBUG("Invalid configuration property=0x%x perm=0x%x ", property, perm);
         return 0;
     }
 
@@ -362,14 +362,14 @@
 
     if ((p_decl = gatt_find_hdl_buffer_by_handle(service_handle)) == NULL)
     {
-        GATT_TRACE_DEBUG0("Service not created");
+        GATT_TRACE_DEBUG("Service not created");
         return 0;
     }
     if (p_descr_uuid == NULL ||
         (p_descr_uuid->len != LEN_UUID_128 && p_descr_uuid->len !=  LEN_UUID_16
          && p_descr_uuid->len !=  LEN_UUID_32))
     {
-        GATT_TRACE_DEBUG0("Illegal parameter");
+        GATT_TRACE_DEBUG("Illegal parameter");
         return 0;
     }
 
@@ -401,18 +401,18 @@
     tGATT_REG       *p_reg = gatt_get_regcb(gatt_if);
     tBT_UUID *p_app_uuid128;
 
-    GATT_TRACE_DEBUG0 ("GATTS_DeleteService");
+    GATT_TRACE_DEBUG ("GATTS_DeleteService");
 
     if (p_reg == NULL)
     {
-        GATT_TRACE_ERROR0 ("Applicaiton not foud");
+        GATT_TRACE_ERROR ("Applicaiton not foud");
         return(FALSE);
     }
     p_app_uuid128 = &p_reg->app_uuid128;
 
     if ((p_list = gatt_find_hdl_buffer_by_app_id(p_app_uuid128, p_svc_uuid, svc_inst)) == NULL)
     {
-        GATT_TRACE_ERROR0 ("No Service found");
+        GATT_TRACE_ERROR ("No Service found");
         return(FALSE);
     }
 
@@ -420,7 +420,7 @@
                                          &p_list->asgn_range.svc_uuid,
                                          p_list->asgn_range.svc_inst)) != NULL)
     {
-        GATT_TRACE_DEBUG0 ("Delete a new service changed item - the service has not yet started");
+        GATT_TRACE_DEBUG ("Delete a new service changed item - the service has not yet started");
         GKI_freebuf (GKI_remove_from_queue (&gatt_cb.pending_new_srv_start_q, p_buf));
     }
     else
@@ -435,7 +435,7 @@
         GATTS_StopService(gatt_cb.sr_reg[i_sreg].s_hdl);
     }
 
-    GATT_TRACE_DEBUG2 ("released handles s_hdl=%u e_hdl=%u",
+    GATT_TRACE_DEBUG ("released handles s_hdl=%u e_hdl=%u",
                        p_list->asgn_range.s_handle , p_list->asgn_range.e_handle  );
 
     if ( (p_list->asgn_range.s_handle >= gatt_cb.hdl_cfg.app_start_hdl)
@@ -472,19 +472,19 @@
 
     tGATTS_PENDING_NEW_SRV_START *p_buf;
 
-    GATT_TRACE_API0 ("GATTS_StartService");
+    GATT_TRACE_API ("GATTS_StartService");
 
     if (p_reg == NULL)
     {
         /* Not found  */
-        GATT_TRACE_ERROR0 ("Applicaiton not found ");
+        GATT_TRACE_ERROR ("Applicaiton not found ");
         return GATT_NOT_FOUND;
     }
 
     if ((p_list = gatt_find_hdl_buffer_by_handle(service_handle)) == NULL)
     {
         /* Not found  */
-        GATT_TRACE_ERROR0 ("no service found");
+        GATT_TRACE_ERROR ("no service found");
         return GATT_NOT_FOUND;
     }
 
@@ -492,14 +492,14 @@
                                       &p_list->asgn_range.svc_uuid,
                                       p_list->asgn_range.svc_inst) != GATT_MAX_SR_PROFILES)
     {
-        GATT_TRACE_ERROR0 ("Duplicate Service start - Service already started");
+        GATT_TRACE_ERROR ("Duplicate Service start - Service already started");
         return GATT_SERVICE_STARTED;
     }
 
     /*this is a new application servoce start */
     if ((i_sreg = gatt_sr_alloc_rcb(p_list)) ==  GATT_MAX_SR_PROFILES)
     {
-        GATT_TRACE_ERROR0 ("GATTS_StartService: no free server registration block");
+        GATT_TRACE_ERROR ("GATTS_StartService: no free server registration block");
         return GATT_NO_RESOURCES;
     }
 
@@ -526,9 +526,9 @@
 
     gatt_add_a_srv_to_list(&gatt_cb.srv_list_info, &gatt_cb.srv_list[i_sreg]);
 
-    GATT_TRACE_DEBUG1 ("allocated i_sreg=%d ",i_sreg);
+    GATT_TRACE_DEBUG ("allocated i_sreg=%d ",i_sreg);
 
-    GATT_TRACE_DEBUG5 ("s_hdl=%d e_hdl=%d type=0x%x svc_inst=%d sdp_hdl=0x%x",
+    GATT_TRACE_DEBUG ("s_hdl=%d e_hdl=%d type=0x%x svc_inst=%d sdp_hdl=0x%x",
                        p_sreg->s_hdl,p_sreg->e_hdl,
                        p_sreg->type,  p_sreg->service_instance,
                        p_sreg->sdp_handle);
@@ -561,7 +561,7 @@
 {
     UINT8           ii = gatt_sr_find_i_rcb_by_handle(service_handle);
 
-    GATT_TRACE_API1("GATTS_StopService %u", service_handle);
+    GATT_TRACE_API("GATTS_StopService %u", service_handle);
 
     /* Index 0 is reserved for GATT, and is never stopped */
     if ( (ii > 0) && (ii < GATT_MAX_SR_PROFILES) && (gatt_cb.sr_reg[ii].in_use) )
@@ -576,7 +576,7 @@
     }
     else
     {
-        GATT_TRACE_ERROR1("GATTS_StopService service_handle: %u is not in use", service_handle);
+        GATT_TRACE_ERROR("GATTS_StopService service_handle: %u is not in use", service_handle);
     }
 }
 /*******************************************************************************
@@ -606,10 +606,10 @@
     tGATT_TCB       *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
 
 
-    GATT_TRACE_API0 ("GATTS_HandleValueIndication");
+    GATT_TRACE_API ("GATTS_HandleValueIndication");
     if ( (p_reg == NULL) || (p_tcb == NULL))
     {
-        GATT_TRACE_ERROR1 ("GATTS_HandleValueIndication Unknown  conn_id: %u ", conn_id);
+        GATT_TRACE_ERROR ("GATTS_HandleValueIndication Unknown  conn_id: %u ", conn_id);
         return(tGATT_STATUS) GATT_INVALID_CONN_ID;
     }
     indication.conn_id  = conn_id;
@@ -622,7 +622,7 @@
     {
         if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle))
         {
-            GATT_TRACE_DEBUG0 ("Add a pending indication");
+            GATT_TRACE_DEBUG ("Add a pending indication");
             if ((p_buf = gatt_add_pending_ind(p_tcb, &indication)) !=NULL)
             {
                 cmd_status = GATT_SUCCESS;
@@ -675,11 +675,11 @@
     tGATT_REG       *p_reg = gatt_get_regcb(gatt_if);
     tGATT_TCB       *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
 
-    GATT_TRACE_API0 ("GATTS_HandleValueNotification");
+    GATT_TRACE_API ("GATTS_HandleValueNotification");
 
     if ( (p_reg == NULL) || (p_tcb == NULL))
     {
-        GATT_TRACE_ERROR1 ("GATTS_HandleValueNotification Unknown  conn_id: %u ", conn_id);
+        GATT_TRACE_ERROR ("GATTS_HandleValueNotification Unknown  conn_id: %u ", conn_id);
         return(tGATT_STATUS) GATT_INVALID_CONN_ID;
     }
 
@@ -724,18 +724,18 @@
     tGATT_REG       *p_reg = gatt_get_regcb(gatt_if);
     tGATT_TCB       *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
 
-    GATT_TRACE_API3 ("GATTS_SendRsp: conn_id: %u  trans_id: %u  Status: 0x%04x",
+    GATT_TRACE_API ("GATTS_SendRsp: conn_id: %u  trans_id: %u  Status: 0x%04x",
                      conn_id, trans_id, status);
 
     if ( (p_reg == NULL) || (p_tcb == NULL))
     {
-        GATT_TRACE_ERROR1 ("GATTS_SendRsp Unknown  conn_id: %u ", conn_id);
+        GATT_TRACE_ERROR ("GATTS_SendRsp Unknown  conn_id: %u ", conn_id);
         return(tGATT_STATUS) GATT_INVALID_CONN_ID;
     }
 
     if (p_tcb->sr_cmd.trans_id != trans_id)
     {
-        GATT_TRACE_ERROR2 ("GATTS_SendRsp conn_id: %u  waiting for op_code = %02x",
+        GATT_TRACE_ERROR ("GATTS_SendRsp conn_id: %u  waiting for op_code = %02x",
                            conn_id, p_tcb->sr_cmd.op_code);
 
         return(GATT_WRONG_STATE);
@@ -779,7 +779,7 @@
 
     tGATT_CLCB    *p_clcb;
 
-    GATT_TRACE_API2 ("GATTC_ConfigureMTU conn_id=%d mtu=%d", conn_id, mtu );
+    GATT_TRACE_API ("GATTC_ConfigureMTU conn_id=%d mtu=%d", conn_id, mtu );
 
     // Validate that the link is BLE, not BR/EDR
     // ????
@@ -791,7 +791,7 @@
 
     if (gatt_is_clcb_allocated(conn_id))
     {
-        GATT_TRACE_ERROR1("GATTC_ConfigureMTU GATT_BUSY conn_id = %d", conn_id);
+        GATT_TRACE_ERROR("GATTC_ConfigureMTU GATT_BUSY conn_id = %d", conn_id);
         return GATT_BUSY;
     }
 
@@ -830,19 +830,19 @@
     tGATT_REG       *p_reg = gatt_get_regcb(gatt_if);
 
 
-    GATT_TRACE_API2 ("GATTC_Discover conn_id=%d disc_type=%d",conn_id, disc_type);
+    GATT_TRACE_API ("GATTC_Discover conn_id=%d disc_type=%d",conn_id, disc_type);
 
     if ( (p_tcb == NULL) || (p_reg==NULL) ||(p_param == NULL) ||
          (disc_type >= GATT_DISC_MAX))
     {
-        GATT_TRACE_ERROR2("GATTC_Discover Illegal param: disc_type %d conn_id = %d", disc_type, conn_id);
+        GATT_TRACE_ERROR("GATTC_Discover Illegal param: disc_type %d conn_id = %d", disc_type, conn_id);
         return GATT_ILLEGAL_PARAMETER;
     }
 
 
     if (gatt_is_clcb_allocated(conn_id))
     {
-        GATT_TRACE_ERROR1("GATTC_Discover GATT_BUSY conn_id = %d", conn_id);
+        GATT_TRACE_ERROR("GATTC_Discover GATT_BUSY conn_id = %d", conn_id);
         return GATT_BUSY;
     }
 
@@ -899,17 +899,17 @@
     tGATT_REG           *p_reg = gatt_get_regcb(gatt_if);
 
 
-    GATT_TRACE_API2 ("GATTC_Read conn_id=%d type=%d", conn_id, type);
+    GATT_TRACE_API ("GATTC_Read conn_id=%d type=%d", conn_id, type);
 
     if ( (p_tcb == NULL) || (p_reg==NULL) || (p_read == NULL) || ((type >= GATT_READ_MAX) || (type == 0)))
     {
-        GATT_TRACE_ERROR2("GATT_Read Illegal param: conn_id %d, type 0%d,", conn_id, type);
+        GATT_TRACE_ERROR("GATT_Read Illegal param: conn_id %d, type 0%d,", conn_id, type);
         return GATT_ILLEGAL_PARAMETER;
     }
 
     if (gatt_is_clcb_allocated(conn_id))
     {
-        GATT_TRACE_ERROR1("GATTC_Read GATT_BUSY conn_id = %d", conn_id);
+        GATT_TRACE_ERROR("GATTC_Read GATT_BUSY conn_id = %d", conn_id);
         return GATT_BUSY;
     }
 
@@ -989,13 +989,13 @@
     if ( (p_tcb == NULL) || (p_reg==NULL) || (p_write == NULL) ||
          ((type != GATT_WRITE) && (type != GATT_WRITE_PREPARE) && (type != GATT_WRITE_NO_RSP)) )
     {
-        GATT_TRACE_ERROR2("GATT_Write Illegal param: conn_id %d, type 0%d,", conn_id, type);
+        GATT_TRACE_ERROR("GATT_Write Illegal param: conn_id %d, type 0%d,", conn_id, type);
         return GATT_ILLEGAL_PARAMETER;
     }
 
     if (gatt_is_clcb_allocated(conn_id))
     {
-        GATT_TRACE_ERROR1("GATTC_Write GATT_BUSY conn_id = %d", conn_id);
+        GATT_TRACE_ERROR("GATTC_Write GATT_BUSY conn_id = %d", conn_id);
         return GATT_BUSY;
     }
 
@@ -1060,17 +1060,17 @@
     tGATT_TCB       *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
     tGATT_REG       *p_reg = gatt_get_regcb(gatt_if);
 
-    GATT_TRACE_API2 ("GATTC_ExecuteWrite conn_id=%d is_execute=%d", conn_id, is_execute);
+    GATT_TRACE_API ("GATTC_ExecuteWrite conn_id=%d is_execute=%d", conn_id, is_execute);
 
     if ( (p_tcb == NULL) || (p_reg==NULL) )
     {
-        GATT_TRACE_ERROR1("GATTC_ExecuteWrite Illegal param: conn_id %d", conn_id);
+        GATT_TRACE_ERROR("GATTC_ExecuteWrite Illegal param: conn_id %d", conn_id);
         return GATT_ILLEGAL_PARAMETER;
     }
 
     if (gatt_is_clcb_allocated(conn_id))
     {
-        GATT_TRACE_ERROR1("GATTC_Write GATT_BUSY conn_id = %d", conn_id);
+        GATT_TRACE_ERROR("GATTC_Write GATT_BUSY conn_id = %d", conn_id);
         return GATT_BUSY;
     }
 
@@ -1082,7 +1082,7 @@
     }
     else
     {
-        GATT_TRACE_ERROR1("Unable to allocate client CB for conn_id %d ", conn_id);
+        GATT_TRACE_ERROR("Unable to allocate client CB for conn_id %d ", conn_id);
         status = GATT_NO_RESOURCES;
     }
     return status;
@@ -1106,7 +1106,7 @@
     tGATT_STATUS    ret = GATT_ILLEGAL_PARAMETER;
     tGATT_TCB     *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
 
-    GATT_TRACE_API2 ("GATTC_SendHandleValueConfirm conn_id=%d handle=0x%x", conn_id, handle);
+    GATT_TRACE_API ("GATTC_SendHandleValueConfirm conn_id=%d handle=0x%x", conn_id, handle);
 
     if (p_tcb)
     {
@@ -1114,7 +1114,7 @@
         {
             btu_stop_timer (&p_tcb->ind_ack_timer_ent);
 
-            GATT_TRACE_DEBUG1 ("notif_count=%d ", p_tcb->ind_count);
+            GATT_TRACE_DEBUG ("notif_count=%d ", p_tcb->ind_count);
             /* send confirmation now */
             ret = attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, (tGATT_CL_MSG *)&handle);
 
@@ -1123,13 +1123,13 @@
         }
         else
         {
-            GATT_TRACE_DEBUG1 ("GATTC_SendHandleValueConfirm - conn_id: %u - ignored not waiting for indicaiton ack", conn_id);
+            GATT_TRACE_DEBUG ("GATTC_SendHandleValueConfirm - conn_id: %u - ignored not waiting for indicaiton ack", conn_id);
             ret = GATT_SUCCESS;
         }
     }
     else
     {
-        GATT_TRACE_ERROR1 ("GATTC_SendHandleValueConfirm - Unknown conn_id: %u", conn_id);
+        GATT_TRACE_ERROR ("GATTC_SendHandleValueConfirm - Unknown conn_id: %u", conn_id);
     }
     return ret;
 }
@@ -1170,7 +1170,7 @@
         }
     }
 
-    GATT_TRACE_API2 ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
+    GATT_TRACE_API ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
                     idle_tout, status);
 }
 
@@ -1194,14 +1194,14 @@
     UINT8        i_gatt_if=0;
     tGATT_IF     gatt_if=0;
 
-    GATT_TRACE_API0 ("GATT_Register");
+    GATT_TRACE_API ("GATT_Register");
     gatt_dbg_display_uuid(*p_app_uuid128);
 
     for (i_gatt_if = 0, p_reg = gatt_cb.cl_rcb; i_gatt_if < GATT_MAX_APPS; i_gatt_if++, p_reg++)
     {
         if (p_reg->in_use  && !memcmp(p_app_uuid128->uu.uuid128, p_reg->app_uuid128.uu.uuid128, LEN_UUID_128))
         {
-            GATT_TRACE_ERROR0("application already registered.");
+            GATT_TRACE_ERROR("application already registered.");
             return 0;
         }
     }
@@ -1221,7 +1221,7 @@
             break;
         }
     }
-    GATT_TRACE_API1 ("allocated gatt_if=%d", gatt_if);
+    GATT_TRACE_API ("allocated gatt_if=%d", gatt_if);
     return gatt_if;
 }
 
@@ -1245,11 +1245,11 @@
     UINT8           i, ii, j;
     tGATT_SR_REG    *p_sreg;
 
-    GATT_TRACE_API1 ("GATT_Deregister gatt_if=%d", gatt_if);
+    GATT_TRACE_API ("GATT_Deregister gatt_if=%d", gatt_if);
     /* Index 0 is GAP and is never deregistered */
     if ( (gatt_if == 0) || (p_reg == NULL) )
     {
-        GATT_TRACE_ERROR1 ("GATT_Deregister with invalid gatt_if: %u", gatt_if);
+        GATT_TRACE_ERROR ("GATT_Deregister with invalid gatt_if: %u", gatt_if);
         return;
     }
 
@@ -1331,7 +1331,7 @@
     UINT16      conn_id;
     tGATT_TRANSPORT transport ;
 
-    GATT_TRACE_API1 ("GATT_StartIf gatt_if=%d", gatt_if);
+    GATT_TRACE_API ("GATT_StartIf gatt_if=%d", gatt_if);
     if ((p_reg = gatt_get_regcb(gatt_if)) != NULL)
     {
         p_reg = &gatt_cb.cl_rcb[gatt_if - 1];
@@ -1369,12 +1369,12 @@
     tGATT_REG    *p_reg;
     BOOLEAN status = FALSE;
 
-    GATT_TRACE_API1 ("GATT_Connect gatt_if=%d", gatt_if);
+    GATT_TRACE_API ("GATT_Connect gatt_if=%d", gatt_if);
 
     /* Make sure app is registered */
     if ((p_reg = gatt_get_regcb(gatt_if)) == NULL)
     {
-        GATT_TRACE_ERROR1("GATT_Connect - gatt_if =%d is not registered", gatt_if);
+        GATT_TRACE_ERROR("GATT_Connect - gatt_if =%d is not registered", gatt_if);
         return(FALSE);
     }
 
@@ -1386,7 +1386,7 @@
         status = gatt_update_auto_connect_dev(gatt_if,TRUE, bd_addr, TRUE);
         else
         {
-            GATT_TRACE_ERROR0("Unsupported transport for background connection");
+            GATT_TRACE_ERROR("Unsupported transport for background connection");
         }
     }
 
@@ -1415,11 +1415,11 @@
     tGATT_IF      temp_gatt_if;
     UINT8         start_idx, found_idx;
 
-    GATT_TRACE_API1 ("GATT_CancelConnect gatt_if=%d", gatt_if);
+    GATT_TRACE_API ("GATT_CancelConnect gatt_if=%d", gatt_if);
 
     if ((gatt_if != 0) && ((p_reg = gatt_get_regcb(gatt_if)) == NULL))
     {
-        GATT_TRACE_ERROR1("GATT_CancelConnect - gatt_if =%d is not registered", gatt_if);
+        GATT_TRACE_ERROR("GATT_CancelConnect - gatt_if =%d is not registered", gatt_if);
         return(FALSE);
     }
 
@@ -1427,7 +1427,7 @@
     {
         if (!gatt_if)
         {
-            GATT_TRACE_DEBUG0("GATT_CancelConnect - unconditional");
+            GATT_TRACE_DEBUG("GATT_CancelConnect - unconditional");
             start_idx = 0;
             /* only LE connection can be cancelled */
             p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
@@ -1441,7 +1441,7 @@
             }
             else
             {
-                GATT_TRACE_ERROR0("GATT_CancelConnect - no app found");
+                GATT_TRACE_ERROR("GATT_CancelConnect - no app found");
                 status = FALSE;
             }
         }
@@ -1461,7 +1461,7 @@
             }
             else
             {
-                GATT_TRACE_ERROR0("GATT_CancelConnect -no app associated with the bg device for unconditional removal");
+                GATT_TRACE_ERROR("GATT_CancelConnect -no app associated with the bg device for unconditional removal");
                 status = FALSE;
             }
         }
@@ -1493,7 +1493,7 @@
     tGATT_IF        gatt_if=GATT_GET_GATT_IF(conn_id);
     UINT8          tcb_idx = GATT_GET_TCB_IDX(conn_id);
 
-    GATT_TRACE_API1 ("GATT_Disconnect conn_id=%d ", conn_id);
+    GATT_TRACE_API ("GATT_Disconnect conn_id=%d ", conn_id);
 
     p_tcb = gatt_get_tcb_by_idx(tcb_idx);
 
@@ -1534,7 +1534,7 @@
     tGATT_TCB       *p_tcb= gatt_get_tcb_by_idx(tcb_idx);
     BOOLEAN         status=FALSE;
 
-    GATT_TRACE_API1 ("GATT_GetConnectionInfor conn_id=%d", conn_id);
+    GATT_TRACE_API ("GATT_GetConnectionInfor conn_id=%d", conn_id);
 
     if (p_tcb && p_reg )
     {
@@ -1575,7 +1575,7 @@
         status = TRUE;
     }
 
-    GATT_TRACE_API1 ("GATT_GetConnIdIfConnected status=%d", status);
+    GATT_TRACE_API ("GATT_GetConnIdIfConnected status=%d", status);
     return status;
 }
 
@@ -1600,12 +1600,12 @@
     tGATT_REG    *p_reg;
     BOOLEAN status = TRUE;
 
-    GATT_TRACE_API1 ("GATT_Listen gatt_if=%d", gatt_if);
+    GATT_TRACE_API ("GATT_Listen gatt_if=%d", gatt_if);
 
     /* Make sure app is registered */
     if ((p_reg = gatt_get_regcb(gatt_if)) == NULL)
     {
-        GATT_TRACE_ERROR1("GATT_Listen - gatt_if =%d is not registered", gatt_if);
+        GATT_TRACE_ERROR("GATT_Listen - gatt_if =%d is not registered", gatt_if);
         return(FALSE);
     }
 
diff --git a/stack/gatt/gatt_attr.c b/stack/gatt/gatt_attr.c
index 60beaa7..f74a268 100644
--- a/stack/gatt/gatt_attr.c
+++ b/stack/gatt/gatt_attr.c
@@ -190,16 +190,16 @@
         case GATTS_REQ_TYPE_WRITE_EXEC:
         case GATT_CMD_WRITE:
             ignore = TRUE;
-            GATT_TRACE_EVENT0("Ignore GATT_REQ_EXEC_WRITE/WRITE_CMD" );
+            GATT_TRACE_EVENT("Ignore GATT_REQ_EXEC_WRITE/WRITE_CMD" );
             break;
 
         case GATTS_REQ_TYPE_MTU:
-            GATT_TRACE_EVENT1("Get MTU exchange new mtu size: %d", p_data->mtu);
+            GATT_TRACE_EVENT("Get MTU exchange new mtu size: %d", p_data->mtu);
             ignore = TRUE;
             break;
 
         default:
-            GATT_TRACE_EVENT1("Unknown/unexpected LE GAP ATT request: 0x%02x", type);
+            GATT_TRACE_EVENT("Unknown/unexpected LE GAP ATT request: 0x%02x", type);
             break;
     }
 
@@ -223,7 +223,7 @@
 {
     UNUSED(gatt_if);
 
-    GATT_TRACE_EVENT5 ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
+    GATT_TRACE_EVENT ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
                        (bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
                        (bda[4]<<8)+bda[5], connected, conn_id, reason);
 
@@ -231,7 +231,7 @@
     {
         if (gatt_profile_clcb_alloc(conn_id, bda, transport) == NULL)
         {
-            GATT_TRACE_ERROR0 ("gatt_profile_connect_cback: no_resource");
+            GATT_TRACE_ERROR ("gatt_profile_connect_cback: no_resource");
             return;
         }
     }
@@ -272,14 +272,14 @@
     gatt_cb.gattp_attr.handle   =
     gatt_cb.handle_of_h_r       = GATTS_AddCharacteristic(service_handle, &uuid, 0, GATT_CHAR_PROP_BIT_INDICATE);
 
-    GATT_TRACE_DEBUG1 ("gatt_profile_db_init:  handle of service changed%d",
+    GATT_TRACE_DEBUG ("gatt_profile_db_init:  handle of service changed%d",
                        gatt_cb.handle_of_h_r  );
 
     /* start service
     */
     status = GATTS_StartService (gatt_cb.gatt_if, service_handle, GATTP_TRANSPORT_SUPPORTED );
 
-    GATT_TRACE_DEBUG2 ("gatt_profile_db_init:  gatt_if=%d   start status%d",
+    GATT_TRACE_DEBUG ("gatt_profile_db_init:  gatt_if=%d   start status%d",
                        gatt_cb.gatt_if,  status);
 }
 
diff --git a/stack/gatt/gatt_auth.c b/stack/gatt/gatt_auth.c
index b093725..8386d88 100644
--- a/stack/gatt/gatt_auth.c
+++ b/stack/gatt/gatt_auth.c
@@ -115,7 +115,7 @@
     else
     {
         /* if this is a bad signature, assume from attacker, ignore it  */
-        GATT_TRACE_ERROR0("Signature Verification Failed, data ignored");
+        GATT_TRACE_ERROR("Signature Verification Failed, data ignored");
     }
 
     return;
@@ -165,7 +165,7 @@
     UINT16       count;
     UNUSED(p_ref_data);
 
-    GATT_TRACE_DEBUG0("gatt_enc_cmpl_cback");
+    GATT_TRACE_DEBUG("gatt_enc_cmpl_cback");
     if ((p_tcb = gatt_find_tcb_by_addr(bd_addr, transport)) != NULL)
     {
         if (gatt_get_sec_act(p_tcb) == GATT_SEC_ENC_PENDING)
@@ -206,12 +206,12 @@
         }
         else
         {
-            GATT_TRACE_ERROR0("Unknown operation encryption completed");
+            GATT_TRACE_ERROR("Unknown operation encryption completed");
         }
     }
     else
     {
-        GATT_TRACE_ERROR0("enc callback for unknown bd_addr");
+        GATT_TRACE_ERROR("enc callback for unknown bd_addr");
     }
 }
 
@@ -262,7 +262,7 @@
     }
     else
     {
-        GATT_TRACE_DEBUG0("notify GATT for encryption completion of unknown device");
+        GATT_TRACE_DEBUG("notify GATT for encryption completion of unknown device");
     }
     return;
 }
@@ -428,7 +428,7 @@
             encrypt_status = GATT_ENCRYPED_MITM;
     }
 
-    GATT_TRACE_DEBUG1("gatt_get_link_encrypt_status status=0x%x",encrypt_status);
+    GATT_TRACE_DEBUG("gatt_get_link_encrypt_status status=0x%x",encrypt_status);
     return  encrypt_status ;
 }
 
@@ -489,7 +489,7 @@
     switch (gatt_sec_act )
     {
         case GATT_SEC_SIGN_DATA:
-            GATT_TRACE_DEBUG0("gatt_security_check_start: Do data signing");
+            GATT_TRACE_DEBUG("gatt_security_check_start: Do data signing");
             gatt_sign_data(p_clcb);
             break;
         case GATT_SEC_ENCRYPT:
@@ -497,12 +497,12 @@
         case GATT_SEC_ENCRYPT_MITM:
             if (sec_act_old < GATT_SEC_ENCRYPT)
             {
-                GATT_TRACE_DEBUG0("gatt_security_check_start: Encrypt now or key upgreade first");
+                GATT_TRACE_DEBUG("gatt_security_check_start: Encrypt now or key upgreade first");
                 gatt_convert_sec_action(gatt_sec_act, &btm_ble_sec_act);
                 btm_status = BTM_SetEncryption(p_tcb->peer_bda, p_tcb->transport , gatt_enc_cmpl_cback, &btm_ble_sec_act);
                 if ( (btm_status != BTM_SUCCESS) && (btm_status != BTM_CMD_STARTED))
                 {
-                    GATT_TRACE_ERROR1("gatt_security_check_start BTM_SetEncryption failed btm_status=%d", btm_status);
+                    GATT_TRACE_ERROR("gatt_security_check_start BTM_SetEncryption failed btm_status=%d", btm_status);
                     status = FALSE;
                 }
             }
diff --git a/stack/gatt/gatt_cl.c b/stack/gatt/gatt_cl.c
index 930cd35..55d1d59 100644
--- a/stack/gatt/gatt_cl.c
+++ b/stack/gatt/gatt_cl.c
@@ -172,7 +172,7 @@
                 else
                     p_clcb->first_read_blob_after_read = FALSE;
 
-                GATT_TRACE_DEBUG1("gatt_act_read first_read_blob_after_read=%d",
+                GATT_TRACE_DEBUG("gatt_act_read first_read_blob_after_read=%d",
                                   p_clcb->first_read_blob_after_read);
                 op_code = GATT_REQ_READ_BLOB;
                 msg.read_blob.offset = offset;
@@ -199,7 +199,7 @@
             break;
 
         default:
-            GATT_TRACE_ERROR1("Unknown read type: %d", p_clcb->op_subtype);
+            GATT_TRACE_ERROR("Unknown read type: %d", p_clcb->op_subtype);
             break;
     }
 
@@ -268,7 +268,7 @@
 
             default:
                 rt = GATT_INTERNAL_ERROR;
-                GATT_TRACE_ERROR1("Unknown write type: %d", p_clcb->op_subtype);
+                GATT_TRACE_ERROR("Unknown write type: %d", p_clcb->op_subtype);
                 break;
         }
     }
@@ -280,7 +280,7 @@
     {
         if (rt != GATT_SUCCESS)
         {
-            GATT_TRACE_ERROR1("gatt_act_write() failed op_code=0x%x", op_code);
+            GATT_TRACE_ERROR("gatt_act_write() failed op_code=0x%x", op_code);
         }
         gatt_end_operation(p_clcb, rt, NULL);
     }
@@ -298,7 +298,7 @@
 {
     UINT8       rt ;
 
-    GATT_TRACE_DEBUG0("gatt_send_queue_write_cancel ");
+    GATT_TRACE_DEBUG("gatt_send_queue_write_cancel ");
 
     rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, GATT_REQ_EXEC_WRITE, (tGATT_CL_MSG *)&flag);
 
@@ -322,7 +322,7 @@
     BOOLEAN             exec = FALSE;
     tGATT_EXEC_FLAG     flag = GATT_PREP_WRITE_EXEC;
 
-    GATT_TRACE_DEBUG0("gatt_check_write_long_terminate ");
+    GATT_TRACE_DEBUG("gatt_check_write_long_terminate ");
     /* check the first write response status */
     if (p_rsp_value != NULL)
     {
@@ -366,7 +366,7 @@
     UINT8   rt = GATT_SUCCESS;
     UINT8   type = p_clcb->op_subtype;
 
-    GATT_TRACE_DEBUG1("gatt_send_prepare_write type=0x%x", type );
+    GATT_TRACE_DEBUG("gatt_send_prepare_write type=0x%x", type );
     to_send = p_attr->len - p_attr->offset;
 
     if (to_send > (p_tcb->payload_size - GATT_WRITE_LONG_HDR_SIZE)) /* 2 = UINT16 offset bytes  */
@@ -380,7 +380,7 @@
         offset += p_clcb->start_offset;
     }
 
-    GATT_TRACE_DEBUG2("offset =0x%x len=%d", offset, to_send );
+    GATT_TRACE_DEBUG("offset =0x%x len=%d", offset, to_send );
 
     rt = gatt_send_write_msg(p_tcb,
                              p_clcb->clcb_idx,
@@ -417,7 +417,7 @@
 
     UNUSED(p_tcb);
 
-    GATT_TRACE_DEBUG0("gatt_process_find_type_value_rsp ");
+    GATT_TRACE_DEBUG("gatt_process_find_type_value_rsp ");
     /* unexpected response */
     if (p_clcb->operation != GATTC_OPTYPE_DISCOVERY || p_clcb->op_subtype != GATT_DISC_SRVC_BY_UUID)
         return;
@@ -466,7 +466,7 @@
 
     if (len < GATT_INFO_RSP_MIN_LEN)
     {
-        GATT_TRACE_ERROR0("invalid Info Response PDU received, discard.");
+        GATT_TRACE_ERROR("invalid Info Response PDU received, discard.");
         gatt_end_operation(p_clcb, GATT_INVALID_PDU, NULL);
         return;
     }
@@ -522,7 +522,7 @@
     UNUSED(p_tcb);
     UNUSED(handle);
 
-    GATT_TRACE_DEBUG2("gatt_proc_disc_error_rsp reason: %02x cmd_code %04x", reason, opcode);
+    GATT_TRACE_DEBUG("gatt_proc_disc_error_rsp reason: %02x cmd_code %04x", reason, opcode);
 
     switch (opcode)
     {
@@ -533,11 +533,11 @@
             if (reason == GATT_NOT_FOUND)
             {
                 status = GATT_SUCCESS;
-                GATT_TRACE_DEBUG0("Discovery completed");
+                GATT_TRACE_DEBUG("Discovery completed");
             }
             break;
         default:
-            GATT_TRACE_ERROR1("Incorrect discovery opcode %04x",   opcode);
+            GATT_TRACE_ERROR("Incorrect discovery opcode %04x",   opcode);
             break;
     }
 
@@ -564,7 +564,7 @@
     UNUSED(op_code);
     UNUSED(len);
 
-    GATT_TRACE_DEBUG0("gatt_process_error_rsp ");
+    GATT_TRACE_DEBUG("gatt_process_error_rsp ");
     STREAM_TO_UINT8(opcode, p);
     STREAM_TO_UINT16(handle, p);
     STREAM_TO_UINT8(reason, p);
@@ -613,11 +613,11 @@
     tGATT_VALUE  value = {0};
     UINT8        *p= p_data;
 
-    GATT_TRACE_ERROR2("value resp op_code = %s len = %d", gatt_dbg_op_name(op_code), len);
+    GATT_TRACE_ERROR("value resp op_code = %s len = %d", gatt_dbg_op_name(op_code), len);
 
     if (len < GATT_PREP_WRITE_RSP_MIN_LEN)
     {
-        GATT_TRACE_ERROR0("illegal prepare write response length, discard");
+        GATT_TRACE_ERROR("illegal prepare write response length, discard");
         gatt_end_operation(p_clcb, GATT_INVALID_PDU, &value);
         return;
     }
@@ -665,11 +665,11 @@
     UINT8           *p= p_data, i,
     event = (op_code == GATT_HANDLE_VALUE_NOTIF) ? GATTC_OPTYPE_NOTIFICATION : GATTC_OPTYPE_INDICATION;
 
-    GATT_TRACE_DEBUG0("gatt_process_notification ");
+    GATT_TRACE_DEBUG("gatt_process_notification ");
 
     if (len < GATT_NOTIFICATION_MIN_LEN)
     {
-        GATT_TRACE_ERROR0("illegal notification PDU length, discard");
+        GATT_TRACE_ERROR("illegal notification PDU length, discard");
         return;
     }
 
@@ -694,7 +694,7 @@
                For now, just log the error reset the counter.
                Later we need to disconnect the link unconditionally.
             */
-            GATT_TRACE_ERROR1("gatt_process_notification rcv Ind. but ind_count=%d (will reset ind_count)",  p_tcb->ind_count);
+            GATT_TRACE_ERROR("gatt_process_notification rcv Ind. but ind_count=%d (will reset ind_count)",  p_tcb->ind_count);
         }
         p_tcb->ind_count = 0;
     }
@@ -755,7 +755,7 @@
 
     if (len < GATT_READ_BY_TYPE_RSP_MIN_LEN)
     {
-        GATT_TRACE_ERROR0("Illegal ReadByType/ReadByGroupType Response length, discard");
+        GATT_TRACE_ERROR("Illegal ReadByType/ReadByGroupType Response length, discard");
         gatt_end_operation(p_clcb, GATT_INVALID_PDU, NULL);
         return;
     }
@@ -766,7 +766,7 @@
     {
         /* this is an error case that server's response containing a value length which is larger than MTU-2
            or value_len > message total length -1 */
-        GATT_TRACE_ERROR4("gatt_process_read_by_type_rsp: Discard response op_code=%d vale_len=%d > (MTU-2=%d or msg_len-1=%d)",
+        GATT_TRACE_ERROR("gatt_process_read_by_type_rsp: Discard response op_code=%d vale_len=%d > (MTU-2=%d or msg_len-1=%d)",
                           op_code, value_len, (p_tcb->payload_size - 2), (len-1));
         gatt_end_operation(p_clcb, GATT_ERROR, NULL);
         return;
@@ -812,7 +812,7 @@
                 record_value.group_value.e_handle = handle;
                 if (!gatt_parse_uuid_from_cmd(&record_value.group_value.service_type, value_len, &p))
                 {
-                    GATT_TRACE_ERROR0("discover all service response parsing failure");
+                    GATT_TRACE_ERROR("discover all service response parsing failure");
                     break;
                 }
             }
@@ -848,7 +848,7 @@
             }
             else
             {
-               GATT_TRACE_ERROR1("gatt_process_read_by_type_rsp INCL_SRVC failed with invalid data value_len=%d", value_len);
+               GATT_TRACE_ERROR("gatt_process_read_by_type_rsp INCL_SRVC failed with invalid data value_len=%d", value_len);
                gatt_end_operation(p_clcb, GATT_INVALID_PDU, (void *)p);
                return;
             }
@@ -980,7 +980,7 @@
                 if (len == (p_tcb->payload_size - 1) && /* full packet for read or read blob rsp */
                     len + offset < GATT_MAX_ATTR_LEN)
                 {
-                    GATT_TRACE_DEBUG3("full pkt issue read blob for remianing bytes old offset=%d len=%d new offset=%d",
+                    GATT_TRACE_DEBUG("full pkt issue read blob for remianing bytes old offset=%d len=%d new offset=%d",
                                       offset, len, p_clcb->counter);
                     gatt_act_read(p_clcb, p_clcb->counter);
                 }
@@ -991,7 +991,7 @@
             }
             else /* exception, should not happen */
             {
-                GATT_TRACE_ERROR2("attr offset = %d p_attr_buf = %d ", offset, p_clcb->p_attr_buf);
+                GATT_TRACE_ERROR("attr offset = %d p_attr_buf = %d ", offset, p_clcb->p_attr_buf);
                 gatt_end_operation(p_clcb, GATT_NO_RESOURCES, (void *)p_clcb->p_attr_buf);
             }
         }
@@ -1054,7 +1054,7 @@
 
     if (len < GATT_MTU_RSP_MIN_LEN)
     {
-        GATT_TRACE_ERROR0("invalid MTU response PDU received, discard.");
+        GATT_TRACE_ERROR("invalid MTU response PDU received, discard.");
         status = GATT_INVALID_PDU;
     }
     else
@@ -1132,7 +1132,7 @@
         }
         else
         {
-            GATT_TRACE_ERROR0("gatt_cl_send_next_cmd_inq: L2CAP sent error");
+            GATT_TRACE_ERROR("gatt_cl_send_next_cmd_inq: L2CAP sent error");
 
             memset(p_cmd, 0, sizeof(tGATT_CMD_Q));
             p_tcb->pending_cl_req ++;
@@ -1168,7 +1168,7 @@
 
         if (p_clcb == NULL || (rsp_code != op_code && op_code != GATT_RSP_ERROR))
         {
-            GATT_TRACE_WARNING2 ("ATT - Ignore wrong response. Receives (%02x) \
+            GATT_TRACE_WARNING ("ATT - Ignore wrong response. Receives (%02x) \
                                 Request(%02x) Ignored", op_code, rsp_code);
 
             return;
@@ -1183,7 +1183,7 @@
     /* The message has to be smaller than the agreed MTU, len does not count op_code */
     if (len >= p_tcb->payload_size)
     {
-        GATT_TRACE_ERROR2("invalid response/indicate pkt size: %d, PDU size: %d", len + 1, p_tcb->payload_size);
+        GATT_TRACE_ERROR("invalid response/indicate pkt size: %d, PDU size: %d", len + 1, p_tcb->payload_size);
         if (op_code != GATT_HANDLE_VALUE_NOTIF &&
             op_code != GATT_HANDLE_VALUE_IND)
             gatt_end_operation(p_clcb, GATT_ERROR, NULL);
@@ -1237,7 +1237,7 @@
                 break;
 
             default:
-                GATT_TRACE_ERROR1("Unknown opcode = %d", op_code);
+                GATT_TRACE_ERROR("Unknown opcode = %d", op_code);
                 break;
         }
     }
diff --git a/stack/gatt/gatt_db.c b/stack/gatt/gatt_db.c
index a1b0a8a..1285223 100644
--- a/stack/gatt/gatt_db.c
+++ b/stack/gatt/gatt_db.c
@@ -64,12 +64,12 @@
 {
     if (!allocate_svc_db_buf(p_db))
     {
-        GATT_TRACE_ERROR0("gatts_init_service_db failed, no resources");
+        GATT_TRACE_ERROR("gatts_init_service_db failed, no resources");
         return FALSE;
     }
 
-    GATT_TRACE_DEBUG0("gatts_init_service_db");
-    GATT_TRACE_DEBUG2("s_hdl = %d num_handle = %d", s_hdl, num_handle );
+    GATT_TRACE_DEBUG("gatts_init_service_db");
+    GATT_TRACE_DEBUG("s_hdl = %d num_handle = %d", s_hdl, num_handle );
 
     /* update service database information */
     p_db->next_handle   = s_hdl;
@@ -94,7 +94,7 @@
 {
     if (!p_db || !p_db->p_attr_list)
     {
-        GATT_TRACE_ERROR0("service DB empty");
+        GATT_TRACE_ERROR("service DB empty");
 
         return NULL;
     }
@@ -131,32 +131,32 @@
 
     if (!(perm & GATT_READ_ALLOWED))
     {
-        GATT_TRACE_ERROR0( "GATT_READ_NOT_PERMIT");
+        GATT_TRACE_ERROR( "GATT_READ_NOT_PERMIT");
         return GATT_READ_NOT_PERMIT;
     }
 
     if ((perm & GATT_READ_AUTH_REQUIRED ) && !(sec_flag & GATT_SEC_FLAG_LKEY_UNAUTHED) &&
         !(sec_flag & BTM_SEC_FLAG_ENCRYPTED))
     {
-        GATT_TRACE_ERROR0( "GATT_INSUF_AUTHENTICATION");
+        GATT_TRACE_ERROR( "GATT_INSUF_AUTHENTICATION");
         return GATT_INSUF_AUTHENTICATION;
     }
 
     if ((perm & GATT_READ_MITM_REQUIRED ) && !(sec_flag & GATT_SEC_FLAG_LKEY_AUTHED))
     {
-        GATT_TRACE_ERROR0( "GATT_INSUF_AUTHENTICATION: MITM Required");
+        GATT_TRACE_ERROR( "GATT_INSUF_AUTHENTICATION: MITM Required");
         return GATT_INSUF_AUTHENTICATION;
     }
 
     if ((perm & GATT_READ_ENCRYPTED_REQUIRED ) && !(sec_flag & GATT_SEC_FLAG_ENCRYPTED))
     {
-        GATT_TRACE_ERROR0( "GATT_INSUF_ENCRYPTION");
+        GATT_TRACE_ERROR( "GATT_INSUF_ENCRYPTION");
         return GATT_INSUF_ENCRYPTION;
     }
 
     if ( (perm & GATT_READ_ENCRYPTED_REQUIRED) && (sec_flag & GATT_SEC_FLAG_ENCRYPTED) && (key_size < min_key_size))
     {
-        GATT_TRACE_ERROR0( "GATT_INSUF_KEY_SIZE");
+        GATT_TRACE_ERROR( "GATT_INSUF_KEY_SIZE");
         return GATT_INSUF_KEY_SIZE;
     }
 
@@ -173,7 +173,7 @@
             case GATT_UUID_CHAR_CLIENT_CONFIG:
             case GATT_UUID_CHAR_SRVR_CONFIG:
             case GATT_UUID_CHAR_PRESENT_FORMAT:
-                GATT_TRACE_ERROR0("GATT_NOT_LONG");
+                GATT_TRACE_ERROR("GATT_NOT_LONG");
                 return GATT_NOT_LONG;
 
             default:
@@ -217,7 +217,7 @@
     UINT16          read_long_uuid=0;
     tGATT_ATTR16    *p_attr16  = (tGATT_ATTR16  *)p_attr;
 
-    GATT_TRACE_DEBUG5("read_attr_value uuid=0x%04x perm=0x%0x sec_flag=0x%x offset=%d read_long=%d",
+    GATT_TRACE_DEBUG("read_attr_value uuid=0x%04x perm=0x%0x sec_flag=0x%x offset=%d read_long=%d",
                       p_attr16->uuid,
                       p_attr16->permission,
                       sec_flag,
@@ -398,7 +398,7 @@
                     }
                     else
                     {
-                        GATT_TRACE_ERROR0("format mismatch");
+                        GATT_TRACE_ERROR("format mismatch");
                         status = GATT_NO_RESOURCES;
                         break;
                     }
@@ -454,12 +454,12 @@
     tGATT_ATTR16      *p_attr;
     tBT_UUID         uuid = {LEN_UUID_16, {GATT_UUID_INCLUDE_SERVICE}};
 
-    GATT_TRACE_DEBUG3("gatts_add_included_service: s_hdl = 0x%04x e_hdl = 0x%04x uuid = 0x%04x",
+    GATT_TRACE_DEBUG("gatts_add_included_service: s_hdl = 0x%04x e_hdl = 0x%04x uuid = 0x%04x",
                       s_handle, e_handle, service.uu.uuid16);
 
     if (service.len == 0 || s_handle == 0 || e_handle == 0)
     {
-        GATT_TRACE_ERROR0("gatts_add_included_service Illegal Params.");
+        GATT_TRACE_ERROR("gatts_add_included_service Illegal Params.");
         return 0;
     }
 
@@ -504,7 +504,7 @@
     tGATT_ATTR16     *p_char_decl, *p_char_val;
     tBT_UUID        uuid = {LEN_UUID_16, {GATT_UUID_CHAR_DECLARE}};
 
-    GATT_TRACE_DEBUG2("gatts_add_characteristic perm=0x%0x property=0x%0x", perm, property);
+    GATT_TRACE_DEBUG("gatts_add_characteristic perm=0x%0x property=0x%0x", perm, property);
 
     if ((p_char_decl = (tGATT_ATTR16 *)allocate_attr_in_db(p_db, &uuid, GATT_PERM_READ)) != NULL)
     {
@@ -596,7 +596,7 @@
 {
     tGATT_ATTR16    *p_char_dscptr;
 
-    GATT_TRACE_DEBUG1("gatts_add_char_descr uuid=0x%04x", p_descr_uuid->uu.uuid16);
+    GATT_TRACE_DEBUG("gatts_add_char_descr uuid=0x%04x", p_descr_uuid->uu.uuid16);
 
     /* Add characteristic descriptors */
     if ((p_char_dscptr = (tGATT_ATTR16 *)allocate_attr_in_db(p_db,
@@ -604,7 +604,7 @@
                                                              perm))
         == NULL)
     {
-        GATT_TRACE_DEBUG0("gatts_add_char_descr Fail for adding char descriptors.");
+        GATT_TRACE_DEBUG("gatts_add_char_descr Fail for adding char descriptors.");
         return 0;
     }
     else
@@ -749,7 +749,7 @@
     tGATT_PERM      perm;
     UINT16          min_key_size;
 
-    GATT_TRACE_DEBUG6( "gatts_write_attr_perm_check op_code=0x%0x handle=0x%04x offset=%d len=%d sec_flag=0x%0x key_size=%d",
+    GATT_TRACE_DEBUG( "gatts_write_attr_perm_check op_code=0x%0x handle=0x%04x offset=%d len=%d sec_flag=0x%0x key_size=%d",
                        op_code, handle, offset, len, sec_flag, key_size);
 
     if (p_db != NULL)
@@ -766,7 +766,7 @@
                 {
                     min_key_size +=6;
                 }
-                GATT_TRACE_DEBUG2( "gatts_write_attr_perm_check p_attr->permission =0x%04x min_key_size==0x%04x",
+                GATT_TRACE_DEBUG( "gatts_write_attr_perm_check p_attr->permission =0x%04x min_key_size==0x%04x",
                                    p_attr->permission,
                                    min_key_size);
 
@@ -793,45 +793,45 @@
                 if ((op_code == GATT_SIGN_CMD_WRITE) && !(perm & GATT_WRITE_SIGNED_PERM))
                 {
                     status = GATT_WRITE_NOT_PERMIT;
-                    GATT_TRACE_DEBUG0( "gatts_write_attr_perm_check - sign cmd write not allowed");
+                    GATT_TRACE_DEBUG( "gatts_write_attr_perm_check - sign cmd write not allowed");
                 }
                  if ((op_code == GATT_SIGN_CMD_WRITE) && (sec_flag & GATT_SEC_FLAG_ENCRYPTED))
                 {
                     status = GATT_INVALID_PDU;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - Error!! sign cmd write sent on a encypted link");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - Error!! sign cmd write sent on a encypted link");
                 }
                 else if (!(perm & GATT_WRITE_ALLOWED))
                 {
                     status = GATT_WRITE_NOT_PERMIT;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_WRITE_NOT_PERMIT");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_WRITE_NOT_PERMIT");
                 }
                 /* require authentication, but not been authenticated */
                 else if ((perm & GATT_WRITE_AUTH_REQUIRED ) && !(sec_flag & GATT_SEC_FLAG_LKEY_UNAUTHED))
                 {
                     status = GATT_INSUF_AUTHENTICATION;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_INSUF_AUTHENTICATION");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_INSUF_AUTHENTICATION");
                 }
                 else if ((perm & GATT_WRITE_MITM_REQUIRED ) && !(sec_flag & GATT_SEC_FLAG_LKEY_AUTHED))
                 {
                     status = GATT_INSUF_AUTHENTICATION;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_INSUF_AUTHENTICATION: MITM required");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_INSUF_AUTHENTICATION: MITM required");
                 }
                 else if ((perm & GATT_WRITE_ENCRYPTED_PERM ) && !(sec_flag & GATT_SEC_FLAG_ENCRYPTED))
                 {
                     status = GATT_INSUF_ENCRYPTION;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_INSUF_ENCRYPTION");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_INSUF_ENCRYPTION");
                 }
                 else if ((perm & GATT_WRITE_ENCRYPTED_PERM ) && (sec_flag & GATT_SEC_FLAG_ENCRYPTED) && (key_size < min_key_size))
                 {
                     status = GATT_INSUF_KEY_SIZE;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_INSUF_KEY_SIZE");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_INSUF_KEY_SIZE");
                 }
                 /* LE security mode 2 attribute  */
                 else if (perm & GATT_WRITE_SIGNED_PERM && op_code != GATT_SIGN_CMD_WRITE && !(sec_flag & GATT_SEC_FLAG_ENCRYPTED)
                     &&  (perm & GATT_WRITE_ALLOWED) == 0)
                 {
                     status = GATT_INSUF_AUTHENTICATION;
-                    GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_INSUF_AUTHENTICATION: LE security mode 2 required");
+                    GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_INSUF_AUTHENTICATION: LE security mode 2 required");
                 }
                 else /* writable: must be char value declaration or char descritpors */
                 {
@@ -882,12 +882,12 @@
                         if (op_code == GATT_REQ_PREPARE_WRITE && offset != 0) /* does not allow write blob */
                         {
                             status = GATT_NOT_LONG;
-                            GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_NOT_LONG");
+                            GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_NOT_LONG");
                         }
                         else if (len != max_size)    /* data does not match the required format */
                         {
                             status = GATT_INVALID_ATTR_LEN;
-                            GATT_TRACE_ERROR0( "gatts_write_attr_perm_check - GATT_INVALID_PDU");
+                            GATT_TRACE_ERROR( "gatts_write_attr_perm_check - GATT_INVALID_PDU");
                         }
                         else
                         {
@@ -929,7 +929,7 @@
 
     if (p_uuid == NULL)
     {
-        GATT_TRACE_ERROR0("illegal UUID");
+        GATT_TRACE_ERROR("illegal UUID");
         return NULL;
     }
 
@@ -938,11 +938,11 @@
     else if (p_uuid->len == LEN_UUID_32)
         len = sizeof(tGATT_ATTR32);
 
-    GATT_TRACE_DEBUG1("allocate attr %d bytes ",len);
+    GATT_TRACE_DEBUG("allocate attr %d bytes ",len);
 
     if (p_db->end_handle <= p_db->next_handle)
     {
-        GATT_TRACE_DEBUG2("handle space full. handle_max = %d next_handle = %d",
+        GATT_TRACE_DEBUG("handle space full. handle_max = %d next_handle = %d",
                           p_db->end_handle, p_db->next_handle);
         return NULL;
     }
@@ -951,7 +951,7 @@
     {
         if (!allocate_svc_db_buf(p_db))
         {
-            GATT_TRACE_ERROR0("allocate_attr_in_db failed, no resources");
+            GATT_TRACE_ERROR("allocate_attr_in_db failed, no resources");
             return NULL;
         }
     }
@@ -998,17 +998,17 @@
 
     if (p_attr16->uuid_type == GATT_ATTR_UUID_TYPE_16)
     {
-        GATT_TRACE_DEBUG3("=====> handle = [0x%04x] uuid16 = [0x%04x] perm=0x%02x ",
+        GATT_TRACE_DEBUG("=====> handle = [0x%04x] uuid16 = [0x%04x] perm=0x%02x ",
                           p_attr16->handle, p_attr16->uuid, p_attr16->permission);
     }
     else if (p_attr16->uuid_type == GATT_ATTR_UUID_TYPE_32)
     {
-        GATT_TRACE_DEBUG3("=====> handle = [0x%04x] uuid32 = [0x%08x] perm=0x%02x ",
+        GATT_TRACE_DEBUG("=====> handle = [0x%04x] uuid32 = [0x%08x] perm=0x%02x ",
                           p_attr32->handle, p_attr32->uuid, p_attr32->permission);
     }
     else
     {
-        GATT_TRACE_DEBUG4("=====> handle = [0x%04x] uuid128 = [0x%02x:0x%02x] perm=0x%02x ",
+        GATT_TRACE_DEBUG("=====> handle = [0x%04x] uuid128 = [0x%02x:0x%02x] perm=0x%02x ",
                           p_attr128->handle, p_attr128->uuid[0],p_attr128->uuid[1],
                           p_attr128->permission);
     }
@@ -1083,7 +1083,7 @@
     {
         if (!allocate_svc_db_buf(p_db))
         {
-            GATT_TRACE_ERROR0("copy_extra_byte_in_db failed, no resources");
+            GATT_TRACE_ERROR("copy_extra_byte_in_db failed, no resources");
             return FALSE;
         }
     }
@@ -1110,11 +1110,11 @@
 {
     BT_HDR  *p_buf;
 
-    GATT_TRACE_DEBUG0("allocate_svc_db_buf allocating extra buffer");
+    GATT_TRACE_DEBUG("allocate_svc_db_buf allocating extra buffer");
 
     if ((p_buf = (BT_HDR *)GKI_getpoolbuf(GATT_DB_POOL_ID)) == NULL)
     {
-        GATT_TRACE_ERROR0("allocate_svc_db_buf failed, no resources");
+        GATT_TRACE_ERROR("allocate_svc_db_buf failed, no resources");
         return FALSE;
     }
 
@@ -1190,7 +1190,7 @@
     tBT_UUID    uuid = {LEN_UUID_16, {0}};
     BOOLEAN     rt = FALSE;
 
-    GATT_TRACE_DEBUG0( "add_service_declaration");
+    GATT_TRACE_DEBUG( "add_service_declaration");
 
     if (is_pri)
         uuid.uu.uuid16 = GATT_UUID_PRI_SERVICE;
diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c
index 59c6759..a360830 100644
--- a/stack/gatt/gatt_main.c
+++ b/stack/gatt/gatt_main.c
@@ -89,7 +89,7 @@
 {
     tL2CAP_FIXED_CHNL_REG  fixed_reg;
 
-    GATT_TRACE_DEBUG0("gatt_init()");
+    GATT_TRACE_DEBUG("gatt_init()");
 
     memset (&gatt_cb, 0, sizeof(tGATT_CB));
 
@@ -117,7 +117,7 @@
     /* Now, register with L2CAP for ATT PSM over BR/EDR */
     if (!L2CA_Register (BT_PSM_ATT, (tL2CAP_APPL_INFO *) &dyn_info))
     {
-        GATT_TRACE_ERROR0 ("ATT Dynamic Registration failed");
+        GATT_TRACE_ERROR ("ATT Dynamic Registration failed");
     }
 
     BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_ATT, BTM_SEC_NONE, BT_PSM_ATT, 0, 0);
@@ -180,7 +180,7 @@
 {
     BOOLEAN             ret = FALSE;
     tGATT_CH_STATE      ch_state;
-    GATT_TRACE_DEBUG0 ("gatt_disconnect ");
+    GATT_TRACE_DEBUG ("gatt_disconnect ");
 
     if (p_tcb != NULL)
     {
@@ -207,7 +207,7 @@
         }
         else
         {
-            GATT_TRACE_DEBUG0 ("gatt_disconnect already in closing state");
+            GATT_TRACE_DEBUG ("gatt_disconnect already in closing state");
         }
     }
 
@@ -230,7 +230,7 @@
 
     if (p_tcb == NULL)
     {
-        GATT_TRACE_ERROR0("gatt_update_app_hold_link_status p_tcb=NULL");
+        GATT_TRACE_ERROR("gatt_update_app_hold_link_status p_tcb=NULL");
         return;
     }
 
@@ -261,7 +261,7 @@
         }
     }
 
-    GATT_TRACE_DEBUG4("gatt_update_app_hold_link_status found=%d[1-found] idx=%d gatt_if=%d is_add=%d", found, i, gatt_if, is_add);
+    GATT_TRACE_DEBUG("gatt_update_app_hold_link_status found=%d[1-found] idx=%d gatt_if=%d is_add=%d", found, i, gatt_if, is_add);
 
 }
 
@@ -277,7 +277,7 @@
 *******************************************************************************/
 void gatt_update_app_use_link_flag (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOOLEAN check_acl_link)
 {
-    GATT_TRACE_DEBUG2("gatt_update_app_use_link_flag  is_add=%d chk_link=%d",
+    GATT_TRACE_DEBUG("gatt_update_app_use_link_flag  is_add=%d chk_link=%d",
                       is_add, check_acl_link);
 
     gatt_update_app_hold_link_status(gatt_if, p_tcb, is_add);
@@ -289,7 +289,7 @@
     {
         if (is_add)
         {
-            GATT_TRACE_DEBUG0("GATT disables link idle timer");
+            GATT_TRACE_DEBUG("GATT disables link idle timer");
             /* acl link is connected disable the idle timeout */
             GATT_SetIdleTimeout(p_tcb->peer_bda, GATT_LINK_NO_IDLE_TIMEOUT, p_tcb->transport);
         }
@@ -299,7 +299,7 @@
             {
                 /* acl link is connected but no application needs to use the link
                    so set the timeout value to GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP seconds */
-                GATT_TRACE_DEBUG1("GATT starts link idle timer =%d sec", GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP);
+                GATT_TRACE_DEBUG("GATT starts link idle timer =%d sec", GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP);
                 GATT_SetIdleTimeout(p_tcb->peer_bda, GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP, p_tcb->transport);
             }
 
@@ -346,7 +346,7 @@
         {
             if (!gatt_connect(bd_addr,  p_tcb, transport))
             {
-                GATT_TRACE_ERROR0("gatt_connect failed");
+                GATT_TRACE_ERROR("gatt_connect failed");
                 memset(p_tcb, 0, sizeof(tGATT_TCB));
             }
             else
@@ -355,7 +355,7 @@
         else
         {
             ret = 0;
-            GATT_TRACE_ERROR1("Max TCB for gatt_if [%d] reached.", p_reg->gatt_if);
+            GATT_TRACE_ERROR("Max TCB for gatt_if [%d] reached.", p_reg->gatt_if);
         }
     }
 
@@ -388,7 +388,7 @@
     if (transport == BT_TRANSPORT_BR_EDR)
         return;
 
-    GATT_TRACE_DEBUG3 ("GATT   ATT protocol channel with BDA: %08x%04x is %s",
+    GATT_TRACE_DEBUG ("GATT   ATT protocol channel with BDA: %08x%04x is %s",
                        (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
                        (bd_addr[4]<<8)+bd_addr[5], (connected) ? "connected" : "disconnected");
 
@@ -439,14 +439,14 @@
             }
             else
             {
-                GATT_TRACE_ERROR0("CCB max out, no rsources");
+                GATT_TRACE_ERROR("CCB max out, no rsources");
             }
         }
     }
     else
     {
         gatt_cleanup_upon_disc(bd_addr, reason, transport);
-        GATT_TRACE_DEBUG0 ("ATT disconnected");
+        GATT_TRACE_DEBUG ("ATT disconnected");
     }
 }
 
@@ -481,7 +481,7 @@
 
         if (p_tcb != NULL)
         {
-            GATT_TRACE_WARNING1 ("ATT - Ignored L2CAP data while in state: %d",
+            GATT_TRACE_WARNING ("ATT - Ignored L2CAP data while in state: %d",
                                  gatt_get_ch_state(p_tcb));
         }
     }
@@ -506,7 +506,7 @@
     tGATT_TCB       *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_BR_EDR);
     UNUSED(psm);
 
-    GATT_TRACE_ERROR1("Connection indication cid = %d", lcid);
+    GATT_TRACE_ERROR("Connection indication cid = %d", lcid);
     /* new connection ? */
     if (p_tcb == NULL)
     {
@@ -561,7 +561,7 @@
     /* look up clcb for this channel */
     if ((p_tcb = gatt_find_tcb_by_cid(lcid)) != NULL)
     {
-        GATT_TRACE_DEBUG3("gatt_l2c_connect_cfm_cback result: %d ch_state: %d, lcid:0x%x", result, gatt_get_ch_state(p_tcb), p_tcb->att_lcid);
+        GATT_TRACE_DEBUG("gatt_l2c_connect_cfm_cback result: %d ch_state: %d, lcid:0x%x", result, gatt_get_ch_state(p_tcb), p_tcb->att_lcid);
 
         /* if in correct state */
         if (gatt_get_ch_state(p_tcb) == GATT_CH_CONN)
@@ -895,12 +895,12 @@
         }
         else
         {
-            GATT_TRACE_ERROR1 ("ATT - Rcvd L2CAP data, unknown cmd: 0x%x", op_code);
+            GATT_TRACE_ERROR ("ATT - Rcvd L2CAP data, unknown cmd: 0x%x", op_code);
         }
     }
     else
     {
-        GATT_TRACE_ERROR0 ("invalid data length, ignore");
+        GATT_TRACE_ERROR ("invalid data length, ignore");
     }
 
     GKI_freebuf (p_buf);
@@ -949,7 +949,7 @@
     UINT8   *p = handle_range;
     UINT16  conn_id;
 
-    GATT_TRACE_DEBUG0("gatt_send_srv_chg_ind");
+    GATT_TRACE_DEBUG("gatt_send_srv_chg_ind");
 
     if (gatt_cb.handle_of_h_r)
     {
@@ -964,7 +964,7 @@
         }
         else
         {
-            GATT_TRACE_ERROR2("Unable to find conn_id for  %08x%04x ",
+            GATT_TRACE_ERROR("Unable to find conn_id for  %08x%04x ",
                               (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
                               (peer_bda[4]<<8)+peer_bda[5] );
         }
@@ -983,7 +983,7 @@
 *******************************************************************************/
 void gatt_chk_srv_chg(tGATTS_SRV_CHG *p_srv_chg_clt)
 {
-    GATT_TRACE_DEBUG1("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
+    GATT_TRACE_DEBUG("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
 
     if (p_srv_chg_clt->srv_changed)
     {
@@ -1009,14 +1009,14 @@
     UINT8 num_clients,i;
     tGATTS_SRV_CHG  srv_chg_clt;
 
-    GATT_TRACE_DEBUG0("gatt_init_srv_chg");
+    GATT_TRACE_DEBUG("gatt_init_srv_chg");
     if (gatt_cb.cb_info.p_srv_chg_callback)
     {
         status = (*gatt_cb.cb_info.p_srv_chg_callback)(GATTS_SRV_CHG_CMD_READ_NUM_CLENTS, NULL, &rsp);
 
         if (status && rsp.num_clients)
         {
-            GATT_TRACE_DEBUG1("gatt_init_srv_chg num_srv_chg_clt_clients=%d", rsp.num_clients);
+            GATT_TRACE_DEBUG("gatt_init_srv_chg num_srv_chg_clt_clients=%d", rsp.num_clients);
             num_clients = rsp.num_clients;
             i = 1; /* use one based index */
             while ((i <= num_clients) && status)
@@ -1027,7 +1027,7 @@
                     memcpy(&srv_chg_clt, &rsp.srv_chg ,sizeof(tGATTS_SRV_CHG));
                     if (gatt_add_srv_chg_clt(&srv_chg_clt) == NULL)
                     {
-                        GATT_TRACE_ERROR0("Unable to add a service change client");
+                        GATT_TRACE_ERROR("Unable to add a service change client");
                         status = FALSE;
                     }
                 }
@@ -1037,7 +1037,7 @@
     }
     else
     {
-        GATT_TRACE_DEBUG0("gatt_init_srv_chg callback not registered yet");
+        GATT_TRACE_DEBUG("gatt_init_srv_chg callback not registered yet");
     }
 }
 
@@ -1058,7 +1058,7 @@
     tGATT_TCB           *p_tcb;
     tBT_TRANSPORT      transport;
 
-    GATT_TRACE_DEBUG0 ("gatt_proc_srv_chg");
+    GATT_TRACE_DEBUG ("gatt_proc_srv_chg");
 
     if (gatt_cb.cb_info.p_srv_chg_callback && gatt_cb.handle_of_h_r)
     {
@@ -1075,7 +1075,7 @@
             }
             else
             {
-                GATT_TRACE_DEBUG0 ("discard srv chg - already has one in the queue");
+                GATT_TRACE_DEBUG ("discard srv chg - already has one in the queue");
             }
             start_idx = ++found_idx;
         }
@@ -1095,7 +1095,7 @@
 {
     if (p_tcb)
     {
-        GATT_TRACE_DEBUG2 ("gatt_set_ch_state: old=%d new=%d", p_tcb->ch_state, ch_state);
+        GATT_TRACE_DEBUG ("gatt_set_ch_state: old=%d new=%d", p_tcb->ch_state, ch_state);
         p_tcb->ch_state = ch_state;
     }
 }
@@ -1114,7 +1114,7 @@
     tGATT_CH_STATE ch_state = GATT_CH_CLOSE;
     if (p_tcb)
     {
-        GATT_TRACE_DEBUG1 ("gatt_get_ch_state: ch_state=%d", p_tcb->ch_state);
+        GATT_TRACE_DEBUG ("gatt_get_ch_state: ch_state=%d", p_tcb->ch_state);
         ch_state = p_tcb->ch_state;
     }
     return ch_state;
diff --git a/stack/gatt/gatt_sr.c b/stack/gatt/gatt_sr.c
index 226aad0..69e7b0d 100644
--- a/stack/gatt/gatt_sr.c
+++ b/stack/gatt/gatt_sr.c
@@ -98,10 +98,10 @@
 void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb)
 {
     /* Double check in case any buffers are queued */
-    GATT_TRACE_DEBUG0("gatt_dequeue_sr_cmd" );
+    GATT_TRACE_DEBUG("gatt_dequeue_sr_cmd" );
     if (p_tcb->sr_cmd.p_rsp_msg)
     {
-        GATT_TRACE_ERROR1("free p_tcb->sr_cmd.p_rsp_msg = %d", p_tcb->sr_cmd.p_rsp_msg);
+        GATT_TRACE_ERROR("free p_tcb->sr_cmd.p_rsp_msg = %d", p_tcb->sr_cmd.p_rsp_msg);
 
         GKI_freebuf (p_tcb->sr_cmd.p_rsp_msg);
     }
@@ -129,7 +129,7 @@
     UINT8           *p;
     BOOLEAN         is_overflow = FALSE;
 
-    GATT_TRACE_DEBUG2 ("process_read_multi_rsp status=%d mtu=%d", status, mtu);
+    GATT_TRACE_DEBUG ("process_read_multi_rsp status=%d mtu=%d", status, mtu);
 
     if (p_buf == NULL)
     {
@@ -144,7 +144,7 @@
     p_cmd->status = status;
     if (status == GATT_SUCCESS)
     {
-        GATT_TRACE_DEBUG2 ("Multi read count=%d num_hdls=%d",
+        GATT_TRACE_DEBUG ("Multi read count=%d num_hdls=%d",
                            p_cmd->multi_rsp_q.count, p_cmd->multi_req.num_handles);
         /* Wait till we get all the responses */
         if (p_cmd->multi_rsp_q.count == p_cmd->multi_req.num_handles)
@@ -186,7 +186,7 @@
                         /* just send the partial response for the overflow case */
                         len = p_rsp->attr_value.len - (total_len - mtu);
                         is_overflow = TRUE;
-                        GATT_TRACE_DEBUG2 ("multi read overflow available len=%d val_len=%d", len, p_rsp->attr_value.len );
+                        GATT_TRACE_DEBUG ("multi read overflow available len=%d val_len=%d", len, p_rsp->attr_value.len );
                     }
                     else
                     {
@@ -222,10 +222,10 @@
             /* Sanity check on the buffer length */
             if (p_buf->len == 0)
             {
-                GATT_TRACE_ERROR0("process_read_multi_rsp - nothing found!!");
+                GATT_TRACE_ERROR("process_read_multi_rsp - nothing found!!");
                 p_cmd->status = GATT_NOT_FOUND;
                 GKI_freebuf (p_buf);
-                GATT_TRACE_DEBUG0(" GKI_freebuf (p_buf)");
+                GATT_TRACE_DEBUG(" GKI_freebuf (p_buf)");
             }
             else if (p_cmd->p_rsp_msg != NULL)
             {
@@ -265,7 +265,7 @@
     tGATT_STATUS    ret_code = GATT_SUCCESS;
     UNUSED(trans_id);
 
-    GATT_TRACE_DEBUG1("gatt_sr_process_app_rsp gatt_if=%d", gatt_if);
+    GATT_TRACE_DEBUG("gatt_sr_process_app_rsp gatt_if=%d", gatt_if);
 
     gatt_sr_update_cback_cnt(p_tcb, gatt_if, FALSE, FALSE);
 
@@ -294,7 +294,7 @@
             }
             else
             {
-                GATT_TRACE_ERROR0("Exception!!! already has respond message");
+                GATT_TRACE_ERROR("Exception!!! already has respond message");
             }
         }
     }
@@ -313,7 +313,7 @@
         gatt_dequeue_sr_cmd(p_tcb);
     }
 
-    GATT_TRACE_DEBUG1("gatt_sr_process_app_rsp ret_code=%d", ret_code);
+    GATT_TRACE_DEBUG("gatt_sr_process_app_rsp ret_code=%d", ret_code);
 
     return ret_code;
 }
@@ -341,7 +341,7 @@
 #if GATT_CONFORMANCE_TESTING == TRUE
     if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code)
     {
-        GATT_TRACE_DEBUG1("Conformance tst: forced err rspv for Execute Write: error status=%d",
+        GATT_TRACE_DEBUG("Conformance tst: forced err rspv for Execute Write: error status=%d",
         gatt_cb.err_status);
 
         gatt_send_error_rsp (p_tcb, gatt_cb.err_status, gatt_cb.req_op_code, gatt_cb.handle, FALSE);
@@ -378,7 +378,7 @@
     }
     else /* nothing needs to be executed , send response now */
     {
-        GATT_TRACE_ERROR0("gatt_process_exec_write_req: no prepare write pending");
+        GATT_TRACE_ERROR("gatt_process_exec_write_req: no prepare write pending");
 
         if ((p_buf = attp_build_sr_msg(p_tcb, GATT_RSP_EXEC_WRITE, NULL)) != NULL)
         {
@@ -407,7 +407,7 @@
     UINT8           sec_flag, key_size;
     tGATTS_RSP       *p_msg;
 
-    GATT_TRACE_DEBUG0("gatt_process_read_multi_req" );
+    GATT_TRACE_DEBUG("gatt_process_read_multi_req" );
     p_tcb->sr_cmd.multi_req.num_handles = 0;
 
     gatt_sr_get_sec_info(p_tcb->peer_bda,
@@ -418,7 +418,7 @@
 #if GATT_CONFORMANCE_TESTING == TRUE
     if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code)
     {
-        GATT_TRACE_DEBUG1("Conformance tst: forced err rspvofr ReadMultiple: error status=%d", gatt_cb.err_status);
+        GATT_TRACE_DEBUG("Conformance tst: forced err rspvofr ReadMultiple: error status=%d", gatt_cb.err_status);
 
         STREAM_TO_UINT16(handle, p);
 
@@ -444,7 +444,7 @@
                                                      key_size))
                 != GATT_SUCCESS)
             {
-                GATT_TRACE_DEBUG1("read permission denied : 0x%02x", err);
+                GATT_TRACE_DEBUG("read permission denied : 0x%02x", err);
                 break;
             }
         }
@@ -459,7 +459,7 @@
 
     if (ll != 0)
     {
-        GATT_TRACE_ERROR0("max attribute handle reached in ReadMultiple Request.");
+        GATT_TRACE_ERROR("max attribute handle reached in ReadMultiple Request.");
     }
 
     if (p_tcb->sr_cmd.multi_req.num_handles == 0)
@@ -583,7 +583,7 @@
                         if (p_list->p_last_primary == p_srv &&
                             p_list->p_last_primary == p_list->p_last)
                         {
-                            GATT_TRACE_DEBUG0("Use 0xFFFF for the last primary attribute");
+                            GATT_TRACE_DEBUG("Use 0xFFFF for the last primary attribute");
                             UINT16_TO_STREAM(p, 0xFFFF); /* see GATT ERRATA 4065, 4063, ATT ERRATA 4062 */
                         }
                         else
@@ -669,7 +669,7 @@
                 }
                 else
                 {
-                    GATT_TRACE_ERROR0("format mismatch");
+                    GATT_TRACE_ERROR("format mismatch");
                     status = GATT_NO_RESOURCES;
                     break;
                     /* format mismatch */
@@ -734,7 +734,7 @@
                 if (gatt_parse_uuid_from_cmd (p_uuid_filter, uuid_len, &p) == FALSE ||
                     p_uuid_filter->len == 0)
                 {
-                    GATT_TRACE_DEBUG0("UUID filter does not exsit");
+                    GATT_TRACE_DEBUG("UUID filter does not exsit");
                     reason = GATT_INVALID_PDU;
                 }
                 else
@@ -790,7 +790,7 @@
             {
                 if ((p_msg =  (BT_HDR *)GKI_getbuf(msg_len)) == NULL)
                 {
-                    GATT_TRACE_ERROR0("gatts_process_primary_service_req failed. no resources.");
+                    GATT_TRACE_ERROR("gatts_process_primary_service_req failed. no resources.");
                     reason = GATT_NO_RESOURCES;
                 }
                 else
@@ -805,13 +805,13 @@
             if (op_code == GATT_REQ_READ_BY_GRP_TYPE)
             {
                 reason = GATT_UNSUPPORT_GRP_TYPE;
-                GATT_TRACE_DEBUG1("unexpected ReadByGrpType Group: 0x%04x", uuid.uu.uuid16);
+                GATT_TRACE_DEBUG("unexpected ReadByGrpType Group: 0x%04x", uuid.uu.uuid16);
             }
             else
             {
                 /* we do not support ReadByTypeValue with any non-primamry_service type */
                 reason = GATT_NOT_FOUND;
-                GATT_TRACE_DEBUG1("unexpected ReadByTypeValue type: 0x%04x", uuid.uu.uuid16);
+                GATT_TRACE_DEBUG("unexpected ReadByTypeValue type: 0x%04x", uuid.uu.uuid16);
             }
         }
     }
@@ -925,7 +925,7 @@
     }
     else if (len < GATT_MTU_REQ_MIN_LEN)
     {
-        GATT_TRACE_ERROR0("invalid MTU request PDU received.");
+        GATT_TRACE_ERROR("invalid MTU request PDU received.");
         gatt_send_error_rsp (p_tcb, GATT_INVALID_PDU, GATT_REQ_MTU, 0, FALSE);
     }
     else
@@ -939,7 +939,7 @@
         else
             p_tcb->payload_size = mtu;
 
-        GATT_TRACE_ERROR1("MTU request PDU with MTU size %d", p_tcb->payload_size);
+        GATT_TRACE_ERROR("MTU request PDU with MTU size %d", p_tcb->payload_size);
 
         if ((p_buf = attp_build_sr_msg(p_tcb, GATT_RSP_MTU, (tGATT_SR_MSG *) &p_tcb->payload_size)) != NULL)
         {
@@ -996,7 +996,7 @@
 #if GATT_CONFORMANCE_TESTING == TRUE
     if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code)
     {
-        GATT_TRACE_DEBUG1("Conformance tst: forced err rsp for ReadByType: error status=%d", gatt_cb.err_status);
+        GATT_TRACE_DEBUG("Conformance tst: forced err rsp for ReadByType: error status=%d", gatt_cb.err_status);
 
         gatt_send_error_rsp (p_tcb, gatt_cb.err_status, gatt_cb.req_op_code, s_hdl, FALSE);
 
@@ -1008,7 +1008,7 @@
     {
         if ((p_msg =  (BT_HDR *)GKI_getbuf(msg_len)) == NULL)
         {
-            GATT_TRACE_ERROR0("gatts_process_find_info failed. no resources.");
+            GATT_TRACE_ERROR("gatts_process_find_info failed. no resources.");
 
             reason = GATT_NO_RESOURCES;
         }
@@ -1115,7 +1115,7 @@
         case GATT_SIGN_CMD_WRITE:
             if (op_code == GATT_SIGN_CMD_WRITE)
             {
-                GATT_TRACE_DEBUG0("Write CMD with data sigining" );
+                GATT_TRACE_DEBUG("Write CMD with data sigining" );
                 len -= GATT_AUTH_SIGN_LEN;
             }
             /* fall through */
@@ -1158,7 +1158,7 @@
         }
         else
         {
-            GATT_TRACE_ERROR0("max pending command, send error");
+            GATT_TRACE_ERROR("max pending command, send error");
             status = GATT_BUSY; /* max pending command, application error */
         }
     }
@@ -1194,7 +1194,7 @@
     UNUSED (len);
     if ((p_msg =  (BT_HDR *)GKI_getbuf(buf_len)) == NULL)
     {
-        GATT_TRACE_ERROR0("gatts_process_find_info failed. no resources.");
+        GATT_TRACE_ERROR("gatts_process_find_info failed. no resources.");
 
         reason = GATT_NO_RESOURCES;
     }
@@ -1263,7 +1263,7 @@
 
     if (len < 2)
     {
-        GATT_TRACE_ERROR0("Illegal PDU length, discard request");
+        GATT_TRACE_ERROR("Illegal PDU length, discard request");
         status = GATT_INVALID_PDU;
     }
     else
@@ -1276,7 +1276,7 @@
     gatt_cb.handle = handle;
     if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code)
     {
-        GATT_TRACE_DEBUG1("Conformance tst: forced err rsp: error status=%d", gatt_cb.err_status);
+        GATT_TRACE_DEBUG("Conformance tst: forced err rsp: error status=%d", gatt_cb.err_status);
 
         gatt_send_error_rsp (p_tcb, gatt_cb.err_status, gatt_cb.req_op_code, handle, FALSE);
 
@@ -1340,11 +1340,11 @@
     tGATTS_SRV_CHG_REQ  req;
     tGATTS_SRV_CHG      *p_buf = NULL;
 
-    GATT_TRACE_DEBUG0("gatts_proc_srv_chg_ind_ack");
+    GATT_TRACE_DEBUG("gatts_proc_srv_chg_ind_ack");
 
     if ((p_buf = gatt_is_bda_in_the_srv_chg_clt_list(p_tcb->peer_bda)) != NULL)
     {
-        GATT_TRACE_DEBUG0("NV update set srv chg = FALSE");
+        GATT_TRACE_DEBUG("NV update set srv chg = FALSE");
         p_buf->srv_changed = FALSE;
         memcpy(&req.srv_chg, p_buf, sizeof(tGATTS_SRV_CHG));
         if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -1365,7 +1365,7 @@
 static void gatts_chk_pending_ind(tGATT_TCB *p_tcb )
 {
     tGATT_VALUE *p_buf = (tGATT_VALUE *)GKI_getfirst(&p_tcb->pending_ind_q);
-    GATT_TRACE_DEBUG0("gatts_chk_pending_ind");
+    GATT_TRACE_DEBUG("gatts_chk_pending_ind");
 
     if (p_buf )
     {
@@ -1391,7 +1391,7 @@
 {
     BOOLEAN continue_processing = TRUE;
 
-    GATT_TRACE_DEBUG1 ("gatts_proc_ind_ack ack handle=%d", ack_handle);
+    GATT_TRACE_DEBUG ("gatts_proc_ind_ack ack handle=%d", ack_handle);
 
     if (ack_handle == gatt_cb.handle_of_h_r)
     {
@@ -1444,7 +1444,7 @@
     }
     else
     {
-        GATT_TRACE_ERROR0("unexpected handle value confirmation");
+        GATT_TRACE_ERROR("unexpected handle value confirmation");
     }
 }
 
@@ -1470,7 +1470,7 @@
     /* The message has to be smaller than the agreed MTU, len does not include op code */
     if (len >= p_tcb->payload_size)
     {
-        GATT_TRACE_ERROR2("server receive invalid PDU size:%d pdu size:%d", len + 1, p_tcb->payload_size );
+        GATT_TRACE_ERROR("server receive invalid PDU size:%d pdu size:%d", len + 1, p_tcb->payload_size );
         /* for invalid request expecting response, send it now */
         if (op_code != GATT_CMD_WRITE &&
             op_code != GATT_SIGN_CMD_WRITE &&
diff --git a/stack/gatt/gatt_utils.c b/stack/gatt/gatt_utils.c
index d3d4c92..0e841a9 100644
--- a/stack/gatt/gatt_utils.c
+++ b/stack/gatt/gatt_utils.c
@@ -91,7 +91,7 @@
 *******************************************************************************/
 void gatt_free_pending_ind(tGATT_TCB *p_tcb)
 {
-    GATT_TRACE_DEBUG0("gatt_free_pending_ind");
+    GATT_TRACE_DEBUG("gatt_free_pending_ind");
     /* release all queued indications */
     while (p_tcb->pending_ind_q.p_first)
         GKI_freebuf (GKI_dequeue (&p_tcb->pending_ind_q));
@@ -108,7 +108,7 @@
 *******************************************************************************/
 void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb)
 {
-    GATT_TRACE_DEBUG0("gatt_free_pending_enc_queue");
+    GATT_TRACE_DEBUG("gatt_free_pending_enc_queue");
     /* release all queued indications */
     while (p_tcb->pending_enc_clcb.p_first)
         GKI_freebuf (GKI_dequeue (&p_tcb->pending_enc_clcb));
@@ -128,7 +128,7 @@
     tGATTS_SRV_CHG     *p_buf;
     tGATTS_SRV_CHG_REQ  req;
 
-    GATT_TRACE_DEBUG0 ("gatt_delete_dev_from_srv_chg_clt_list");
+    GATT_TRACE_DEBUG ("gatt_delete_dev_from_srv_chg_clt_list");
     if ((p_buf = gatt_is_bda_in_the_srv_chg_clt_list(bd_addr)) != NULL)
     {
         if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -156,13 +156,13 @@
     tGATTS_SRV_CHG *p_buf = (tGATTS_SRV_CHG *)GKI_getfirst(&gatt_cb.srv_chg_clt_q);
     tGATTS_SRV_CHG_REQ req;
 
-    GATT_TRACE_DEBUG0 ("gatt_set_srv_chg");
+    GATT_TRACE_DEBUG ("gatt_set_srv_chg");
     while (p_buf)
     {
-        GATT_TRACE_DEBUG0 ("found a srv_chg clt");
+        GATT_TRACE_DEBUG ("found a srv_chg clt");
         if (!p_buf->srv_changed)
         {
-            GATT_TRACE_DEBUG0 ("set srv_changed to TRUE");
+            GATT_TRACE_DEBUG ("set srv_changed to TRUE");
             p_buf->srv_changed= TRUE;
             memcpy(&req.srv_chg, p_buf, sizeof(tGATTS_SRV_CHG));
             if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -193,7 +193,7 @@
               &&  gatt_uuid_compare (*p_svc_uuid, p->svc_uuid)
               &&  (svc_inst == p->svc_inst) )
         {
-            GATT_TRACE_DEBUG0 ("gatt_sr_is_new_srv_chg: Yes");
+            GATT_TRACE_DEBUG ("gatt_sr_is_new_srv_chg: Yes");
             break;
         }
         p_buf = (tGATTS_PENDING_NEW_SRV_START *)GKI_getnext(p_buf);
@@ -215,10 +215,10 @@
 tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB  *p_tcb, tGATT_VALUE *p_ind)
 {
     tGATT_VALUE   *p_buf;
-    GATT_TRACE_DEBUG0 ("gatt_add_pending_ind");
+    GATT_TRACE_DEBUG ("gatt_add_pending_ind");
     if ((p_buf = (tGATT_VALUE *)GKI_getbuf((UINT16)sizeof(tGATT_VALUE))) != NULL)
     {
-        GATT_TRACE_DEBUG0 ("enqueue a pending indication");
+        GATT_TRACE_DEBUG ("enqueue a pending indication");
         memcpy(p_buf, p_ind, sizeof(tGATT_VALUE));
         GKI_enqueue (&p_tcb->pending_ind_q, p_buf);
     }
@@ -239,10 +239,10 @@
 {
     tGATTS_PENDING_NEW_SRV_START   *p_buf;
 
-    GATT_TRACE_DEBUG0 ("gatt_add_pending_new_srv_start");
+    GATT_TRACE_DEBUG ("gatt_add_pending_new_srv_start");
     if ((p_buf = (tGATTS_PENDING_NEW_SRV_START *)GKI_getbuf((UINT16)sizeof(tGATTS_PENDING_NEW_SRV_START))) != NULL)
     {
-        GATT_TRACE_DEBUG0 ("enqueue a new pending new srv start");
+        GATT_TRACE_DEBUG ("enqueue a new pending new srv start");
         p_buf->p_new_srv_start = p_new_srv_start;
         GKI_enqueue (&gatt_cb.pending_new_srv_start_q, p_buf);
     }
@@ -262,10 +262,10 @@
 tGATTS_SRV_CHG *gatt_add_srv_chg_clt(tGATTS_SRV_CHG *p_srv_chg)
 {
     tGATTS_SRV_CHG *p_buf;
-    GATT_TRACE_DEBUG0 ("gatt_add_srv_chg_clt");
+    GATT_TRACE_DEBUG ("gatt_add_srv_chg_clt");
     if ((p_buf = (tGATTS_SRV_CHG *)GKI_getbuf((UINT16)sizeof(tGATTS_SRV_CHG))) != NULL)
     {
-        GATT_TRACE_DEBUG0 ("enqueue a srv chg client");
+        GATT_TRACE_DEBUG ("enqueue a srv chg client");
         memcpy(p_buf, p_srv_chg, sizeof(tGATTS_SRV_CHG));
         GKI_enqueue (&gatt_cb.srv_chg_clt_q, p_buf);
     }
@@ -352,7 +352,7 @@
              &&  gatt_uuid_compare (*p_svc_uuid,    p_list->asgn_range.svc_uuid)
              &&  (svc_inst == p_list->asgn_range.svc_inst) )
         {
-            GATT_TRACE_DEBUG0 ("Already allocated handles for this service before!!");
+            GATT_TRACE_DEBUG ("Already allocated handles for this service before!!");
             return(p_list);
         }
         p_list = p_list->p_next;
@@ -503,7 +503,7 @@
 
     if (!p_new)
     {
-        GATT_TRACE_DEBUG0("p_new==NULL");
+        GATT_TRACE_DEBUG("p_new==NULL");
         return FALSE;
     }
 
@@ -567,7 +567,7 @@
 {
     if (!p_remove || !p_list->p_first)
     {
-        GATT_TRACE_DEBUG0("p_remove==NULL || p_list->p_first==NULL");
+        GATT_TRACE_DEBUG("p_remove==NULL || p_list->p_first==NULL");
         return FALSE;
     }
 
@@ -608,7 +608,7 @@
     tGATT_HDL_LIST_ELEM *p_old;
     if (!p_new)
     {
-        GATT_TRACE_DEBUG0("p_new==NULL");
+        GATT_TRACE_DEBUG("p_new==NULL");
         return FALSE;
     }
 
@@ -671,7 +671,7 @@
 {
     if (!p_remove || !p_list->p_first)
     {
-        GATT_TRACE_DEBUG0("p_remove==NULL || p_list->p_first==NULL");
+        GATT_TRACE_DEBUG("p_remove==NULL || p_list->p_first==NULL");
         return FALSE;
     }
 
@@ -710,7 +710,7 @@
 {
     UINT8 i;
     BOOLEAN found = FALSE;
-    GATT_TRACE_DEBUG1("gatt_find_the_connected_bda start_idx=%d",start_idx);
+    GATT_TRACE_DEBUG("gatt_find_the_connected_bda start_idx=%d",start_idx);
 
     for (i = start_idx ; i < GATT_MAX_PHY_CHANNEL; i ++)
     {
@@ -720,12 +720,12 @@
             *p_found_idx = i;
             *p_transport = gatt_cb.tcb[i].transport;
             found = TRUE;
-            GATT_TRACE_DEBUG6("gatt_find_the_connected_bda bda :%02x-%02x-%02x-%02x-%02x-%02x",
+            GATT_TRACE_DEBUG("gatt_find_the_connected_bda bda :%02x-%02x-%02x-%02x-%02x-%02x",
                               bda[0],  bda[1], bda[2],  bda[3], bda[4],  bda[5]);
             break;
         }
     }
-    GATT_TRACE_DEBUG2("gatt_find_the_connected_bda found=%d found_idx=%d", found, i);
+    GATT_TRACE_DEBUG("gatt_find_the_connected_bda found=%d found_idx=%d", found, i);
     return found;
 }
 
@@ -746,7 +746,7 @@
     tGATT_VALUE *p_buf = (tGATT_VALUE *)GKI_getfirst(&p_tcb->pending_ind_q);
     BOOLEAN srv_chg_ind_pending = FALSE;
 
-    GATT_TRACE_DEBUG1("gatt_is_srv_chg_ind_pending is_queue_empty=%d", GKI_queue_is_empty(&p_tcb->pending_ind_q) );
+    GATT_TRACE_DEBUG("gatt_is_srv_chg_ind_pending is_queue_empty=%d", GKI_queue_is_empty(&p_tcb->pending_ind_q) );
 
     if (p_tcb->indicate_handle == gatt_cb.handle_of_h_r)
     {
@@ -765,7 +765,7 @@
         }
     }
 
-    GATT_TRACE_DEBUG1("srv_chg_ind_pending = %d", srv_chg_ind_pending);
+    GATT_TRACE_DEBUG("srv_chg_ind_pending = %d", srv_chg_ind_pending);
     return srv_chg_ind_pending;
 }
 
@@ -783,14 +783,14 @@
 {
     tGATTS_SRV_CHG *p_buf = (tGATTS_SRV_CHG *)GKI_getfirst(&gatt_cb.srv_chg_clt_q);
 
-    GATT_TRACE_DEBUG6("gatt_is_bda_in_the_srv_chg_clt_list :%02x-%02x-%02x-%02x-%02x-%02x",
+    GATT_TRACE_DEBUG("gatt_is_bda_in_the_srv_chg_clt_list :%02x-%02x-%02x-%02x-%02x-%02x",
                       bda[0],  bda[1], bda[2],  bda[3], bda[4],  bda[5]);
 
     while (p_buf != NULL)
     {
         if (!memcmp( bda, p_buf->bda, BD_ADDR_LEN))
         {
-            GATT_TRACE_DEBUG0("bda is in the srv chg clt list");
+            GATT_TRACE_DEBUG("bda is in the srv chg clt list");
             break;
         }
         p_buf = (tGATTS_SRV_CHG *)GKI_getnext(p_buf);
@@ -1149,11 +1149,11 @@
 
         /* do not allow 32 bits UUID in ATT PDU now */
         case LEN_UUID_32:
-            GATT_TRACE_ERROR0("DO NOT ALLOW 32 BITS UUID IN ATT PDU");
+            GATT_TRACE_ERROR("DO NOT ALLOW 32 BITS UUID IN ATT PDU");
         case 0:
         default:
             if (uuid_size != 0) ret = FALSE;
-            GATT_TRACE_WARNING0("gatt_parse_uuid_from_cmd invalid uuid size");
+            GATT_TRACE_WARNING("gatt_parse_uuid_from_cmd invalid uuid size");
             break;
     }
 
@@ -1228,7 +1228,7 @@
     tGATT_CLCB *p_clcb = (tGATT_CLCB *)p_tle->param;
     if (p_clcb == NULL || p_clcb->p_tcb == NULL)
     {
-        GATT_TRACE_WARNING0("gatt_rsp_timeout clcb is already deleted");
+        GATT_TRACE_WARNING("gatt_rsp_timeout clcb is already deleted");
         return;
     }
     if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY &&
@@ -1236,10 +1236,10 @@
         p_clcb->retry_count < GATT_REQ_RETRY_LIMIT)
     {
         UINT8 rsp_code;
-        GATT_TRACE_WARNING0("gatt_rsp_timeout retry discovery primary service");
+        GATT_TRACE_WARNING("gatt_rsp_timeout retry discovery primary service");
         if (p_clcb != gatt_cmd_dequeue(p_clcb->p_tcb, &rsp_code))
         {
-            GATT_TRACE_ERROR0("gatt_rsp_timeout command queue out of sync, disconnect");
+            GATT_TRACE_ERROR("gatt_rsp_timeout command queue out of sync, disconnect");
         }
         else
         {
@@ -1249,7 +1249,7 @@
         }
     }
 
-    GATT_TRACE_WARNING0("gatt_rsp_timeout disconnecting...");
+    GATT_TRACE_WARNING("gatt_rsp_timeout disconnecting...");
     gatt_disconnect (p_clcb->p_tcb);
 }
 
@@ -1266,7 +1266,7 @@
 {
     tGATT_TCB * p_tcb = (tGATT_TCB *)p_tle->param;
 
-    GATT_TRACE_WARNING0("gatt_ind_ack_timeout send ack now");
+    GATT_TRACE_WARNING("gatt_ind_ack_timeout send ack now");
 
     if (p_tcb != NULL)
         p_tcb->ind_count = 0;
@@ -1324,7 +1324,7 @@
                 gatt_uuid_compare (*p_svc_uuid, *p_this_uuid) &&
                 (svc_inst == p_sreg->service_instance))
             {
-                GATT_TRACE_ERROR0 ("Active Service Found ");
+                GATT_TRACE_ERROR ("Active Service Found ");
                 gatt_dbg_display_uuid(*p_svc_uuid);
 
                 break;
@@ -1363,7 +1363,7 @@
             p_sreg->e_hdl               = p_list->asgn_range.e_handle;
             p_sreg->p_db                = &p_list->svc_db;
 
-            GATT_TRACE_DEBUG1 ("total GKI buffer in db [%d]",p_sreg->p_db->svc_buffer.count);
+            GATT_TRACE_DEBUG ("total GKI buffer in db [%d]",p_sreg->p_db->svc_buffer.count);
             break;
         }
     }
@@ -1410,7 +1410,7 @@
 
     if (!p_reg )
     {
-        GATT_TRACE_ERROR0 ("p_reg not found discard request");
+        GATT_TRACE_ERROR ("p_reg not found discard request");
         return;
     }
 
@@ -1421,7 +1421,7 @@
     }
     else
     {
-        GATT_TRACE_WARNING1("Call back not found for application conn_id=%d", conn_id);
+        GATT_TRACE_WARNING("Call back not found for application conn_id=%d", conn_id);
     }
 
 }
@@ -1477,7 +1477,7 @@
     UINT8               buff[60];
     UINT8               *p = buff;
 
-    GATT_TRACE_DEBUG2("gatt_add_sdp_record s_hdl=0x%x  s_hdl=0x%x",start_hdl, end_hdl);
+    GATT_TRACE_DEBUG("gatt_add_sdp_record s_hdl=0x%x  s_hdl=0x%x",start_hdl, end_hdl);
 
     if ((sdp_handle = SDP_CreateRecord()) == 0)
         return 0;
@@ -1503,7 +1503,7 @@
             break;
 
         default:
-            GATT_TRACE_ERROR1("inavlid UUID len=%d", p_uuid->len);
+            GATT_TRACE_ERROR("inavlid UUID len=%d", p_uuid->len);
             SDP_DeleteRecord(sdp_handle);
             return 0;
             break;
@@ -1539,7 +1539,7 @@
 *******************************************************************************/
 void gatt_set_err_rsp(BOOLEAN enable, UINT8 req_op_code, UINT8 err_status)
 {
-    GATT_TRACE_DEBUG3("gatt_set_err_rsp enable=%d op_code=%d, err_status=%d", enable, req_op_code, err_status);
+    GATT_TRACE_DEBUG("gatt_set_err_rsp enable=%d op_code=%d, err_status=%d", enable, req_op_code, err_status);
     gatt_cb.enable_err_rsp  = enable;
     gatt_cb.req_op_code     = req_op_code;
     gatt_cb.err_status      = err_status;
@@ -1701,7 +1701,7 @@
             num ++;
     }
 
-    GATT_TRACE_DEBUG1("gatt_num_apps_hold_link   num=%d",  num);
+    GATT_TRACE_DEBUG("gatt_num_apps_hold_link   num=%d",  num);
     return num;
 }
 
@@ -1910,7 +1910,7 @@
 {
     UINT8 idx = ((UINT8) gatt_if) - 1 ;
 
-    GATT_TRACE_DEBUG4("gatt_sr_update_prep_cnt tcb idx=%d gatt_if=%d is_inc=%d is_reset_first=%d",
+    GATT_TRACE_DEBUG("gatt_sr_update_prep_cnt tcb idx=%d gatt_if=%d is_inc=%d is_reset_first=%d",
                       p_tcb->tcb_idx, gatt_if, is_inc, is_reset_first);
 
     if (p_tcb)
@@ -1952,7 +1952,7 @@
     {
         if (gatt_get_ch_state(p_tcb) == GATT_CH_OPEN)
         {
-            GATT_TRACE_ERROR0("GATT_CancelConnect - link connected Too late to cancel");
+            GATT_TRACE_ERROR("GATT_CancelConnect - link connected Too late to cancel");
             status = FALSE;
         }
         else
@@ -2118,7 +2118,7 @@
     UINT16              conn_id;
     UINT8               operation;
 
-    GATT_TRACE_DEBUG3 ("gatt_end_operation status=%d op=%d subtype=%d",
+    GATT_TRACE_DEBUG ("gatt_end_operation status=%d op=%d subtype=%d",
                        status, p_clcb->operation, p_clcb->op_subtype);
 
     if (p_cmpl_cb != NULL && p_clcb->operation != 0)
@@ -2145,7 +2145,7 @@
                 }
                 else
                 {
-                    GATT_TRACE_DEBUG0("Rcv Prepare write rsp but no data");
+                    GATT_TRACE_DEBUG("Rcv Prepare write rsp but no data");
                 }
             }
         }
@@ -2175,7 +2175,7 @@
     else if (p_cmpl_cb && op)
         (*p_cmpl_cb)(conn_id, op, status, &cb_data);
     else
-        GATT_TRACE_WARNING3 ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
+        GATT_TRACE_WARNING ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
                              operation, p_disc_cmpl_cb, p_cmpl_cb);
 }
 
@@ -2198,11 +2198,11 @@
     tGATT_REG        *p_reg=NULL;
 
 
-    GATT_TRACE_DEBUG0 ("gatt_cleanup_upon_disc ");
+    GATT_TRACE_DEBUG ("gatt_cleanup_upon_disc ");
 
     if ((p_tcb = gatt_find_tcb_by_addr(bda, transport)) != NULL)
     {
-        GATT_TRACE_DEBUG0 ("found p_tcb ");
+        GATT_TRACE_DEBUG ("found p_tcb ");
         gatt_set_ch_state(p_tcb, GATT_CH_CLOSE);
         for (i = 0; i < GATT_CL_MAX_LCB; i ++)
         {
@@ -2210,7 +2210,7 @@
             if (p_clcb->in_use && p_clcb->p_tcb == p_tcb)
             {
                 btu_stop_timer(&p_clcb->rsp_timer_ent);
-                GATT_TRACE_DEBUG2 ("found p_clcb conn_id=%d clcb_idx=%d", p_clcb->conn_id, p_clcb->clcb_idx);
+                GATT_TRACE_DEBUG ("found p_clcb conn_id=%d clcb_idx=%d", p_clcb->conn_id, p_clcb->clcb_idx);
                 if (p_clcb->operation != GATTC_OPTYPE_NONE)
                     gatt_end_operation(p_clcb, GATT_ERROR, NULL);
 
@@ -2230,14 +2230,14 @@
             if (p_reg->in_use && p_reg->app_cb.p_conn_cb)
             {
                 conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
-                GATT_TRACE_DEBUG3 ("found p_reg tcb_idx=%d gatt_if=%d  conn_id=0x%x", p_tcb->tcb_idx, p_reg->gatt_if, conn_id);
+                GATT_TRACE_DEBUG ("found p_reg tcb_idx=%d gatt_if=%d  conn_id=0x%x", p_tcb->tcb_idx, p_reg->gatt_if, conn_id);
                 (*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if,  bda, conn_id, FALSE, reason, transport);
             }
         }
         memset(p_tcb, 0, sizeof(tGATT_TCB));
 
     }
-    GATT_TRACE_DEBUG0 ("exit gatt_cleanup_upon_disc ");
+    GATT_TRACE_DEBUG ("exit gatt_cleanup_upon_disc ");
 }
 /*******************************************************************************
 **
@@ -2307,7 +2307,7 @@
     else
         BCM_STRNCPY_S(str_buf, sizeof(str_buf), "Unknown UUID 0", 15);
 
-    GATT_TRACE_DEBUG1 ("UUID=[%s]", str_buf);
+    GATT_TRACE_DEBUG ("UUID=[%s]", str_buf);
 
 }
 
@@ -2413,7 +2413,7 @@
             {
                 if (p_dev->gatt_if[i] == gatt_if)
                 {
-                    GATT_TRACE_ERROR0("device already in iniator white list");
+                    GATT_TRACE_ERROR("device already in iniator white list");
                     return TRUE;
                 }
                 else if (p_dev->gatt_if[i] == 0)
@@ -2430,7 +2430,7 @@
             {
                 if (p_dev->listen_gif[i] == gatt_if)
                 {
-                    GATT_TRACE_ERROR0("device already in adv white list");
+                    GATT_TRACE_ERROR("device already in adv white list");
                     return TRUE;
                 }
                 else if (p_dev->listen_gif[i] == 0)
@@ -2452,7 +2452,7 @@
     }
     else
     {
-        GATT_TRACE_ERROR0("no device record available");
+        GATT_TRACE_ERROR("no device record available");
     }
 
     return ret;
@@ -2693,11 +2693,11 @@
     tGATT_REG        *p_reg;
     tGATT_TCB       *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
 
-    GATT_TRACE_API0 ("gatt_update_auto_connect_dev ");
+    GATT_TRACE_API ("gatt_update_auto_connect_dev ");
     /* Make sure app is registered */
     if ((p_reg = gatt_get_regcb(gatt_if)) == NULL)
     {
-        GATT_TRACE_ERROR1("gatt_update_auto_connect_dev - gatt_if is not registered", gatt_if);
+        GATT_TRACE_ERROR("gatt_update_auto_connect_dev - gatt_if is not registered", gatt_if);
         return(FALSE);
     }
 
@@ -2733,10 +2733,10 @@
 {
     tGATT_PENDING_ENC_CLCB   *p_buf;
 
-    GATT_TRACE_DEBUG0 ("gatt_add_pending_new_srv_start");
+    GATT_TRACE_DEBUG ("gatt_add_pending_new_srv_start");
     if ((p_buf = (tGATT_PENDING_ENC_CLCB *)GKI_getbuf((UINT16)sizeof(tGATT_PENDING_ENC_CLCB))) != NULL)
     {
-        GATT_TRACE_DEBUG0 ("enqueue a new pending encryption channel clcb");
+        GATT_TRACE_DEBUG ("enqueue a new pending encryption channel clcb");
         p_buf->p_clcb = p_clcb;
         GKI_enqueue (&p_tcb->pending_enc_clcb, p_buf);
     }