Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7018023 authored by Myles Watson's avatar Myles Watson
Browse files

Remove btu_trace_level and HCI_TRACE_*

There were only 4 calls to HCI_TRACE_*.

Bug: 304830775
Test: mma -j32
Change-Id: I06a707f38d03187d1d90fbc731c189c6e1ac10ea
parent 63f4c097
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
#include "avrc_api.h"
#include "bta_api.h"
#include "btm_api.h"
#include "btu.h"
#include "l2c_api.h"
#include "osi/include/config.h"
#include "osi/include/log.h"
@@ -58,7 +57,7 @@

static uint8_t BTAPP_SetTraceLevel(uint8_t new_level);
static uint8_t BTIF_SetTraceLevel(uint8_t new_level);
static uint8_t BTU_SetTraceLevel(uint8_t new_level);
static uint8_t BTU_SetTraceLevel(uint8_t new_level) { return new_level; }

/* make sure list is order by increasing layer id!!! */
static tBTTRC_FUNC_MAP bttrc_set_level_map[] = {
@@ -121,12 +120,6 @@ static uint8_t BTIF_SetTraceLevel(uint8_t new_level) {
  return btif_trace_level;
}

static uint8_t BTU_SetTraceLevel(uint8_t new_level) {
  if (new_level != 0xFF) btu_trace_level = new_level;

  return btu_trace_level;
}

void load_levels_from_config(const config_t* config) {
  CHECK(config != NULL);

+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ void set_hal_cbacks(bt_callbacks_t* callbacks);

uint8_t appl_trace_level = BT_TRACE_LEVEL_DEBUG;
uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
uint8_t btu_trace_level = BT_TRACE_LEVEL_DEBUG;

const tBTA_AG_RES_DATA tBTA_AG_RES_DATA::kEmpty = {};

+0 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ void set_hal_cbacks(bt_callbacks_t* callbacks);

uint8_t appl_trace_level = BT_TRACE_LEVEL_DEBUG;
uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
uint8_t btu_trace_level = BT_TRACE_LEVEL_DEBUG;

module_t bt_utils_module;
module_t gd_controller_module;
+0 −22
Original line number Diff line number Diff line
@@ -253,28 +253,6 @@ static const char BTE_LOGMSG_MODULE[] = "bte_logmsg_module";
#define BT_TRACE(l, t, ...) \
  LogMsg((TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | (t)), __FILE__, __LINE__, __func__, ##__VA_ARGS__)

/* Define tracing for the HCI unit */
#define HCI_TRACE_ERROR(...)                                      \
  {                                                               \
    if (btu_trace_level >= BT_TRACE_LEVEL_ERROR)                  \
      BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_ERROR, ##__VA_ARGS__); \
  }
#define HCI_TRACE_WARNING(...)                                      \
  {                                                                 \
    if (btu_trace_level >= BT_TRACE_LEVEL_WARNING)                  \
      BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_WARNING, ##__VA_ARGS__); \
  }
#define HCI_TRACE_EVENT(...)                                      \
  {                                                               \
    if (btu_trace_level >= BT_TRACE_LEVEL_EVENT)                  \
      BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_EVENT, ##__VA_ARGS__); \
  }
#define HCI_TRACE_DEBUG(...)                                      \
  {                                                               \
    if (btu_trace_level >= BT_TRACE_LEVEL_DEBUG)                  \
      BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_DEBUG, ##__VA_ARGS__); \
  }

/* Define tracing for BTM */
#define BTM_TRACE_ERROR(...)                                      \
  {                                                               \
+0 −3
Original line number Diff line number Diff line
@@ -21,9 +21,6 @@

using bluetooth::hci::IsoManager;

/* Define BTU storage area */
uint8_t btu_trace_level = HCI_INITIAL_TRACE_LEVEL;

void btu_hci_msg_process(BT_HDR* p_msg) {
  /* Determine the input message type. */
  switch (p_msg->event & BT_EVT_MASK) {
Loading