Fix formatting after removing defines
clang-format -i --style=file bta/*/* btif/*/* include/*
Test: mma -j32
Change-Id: I9ebb32f0cc5bd24a7cb2ae25699999aab5036b13
diff --git a/bta/dm/bta_dm_api.cc b/bta/dm/bta_dm_api.cc
index 19d50ea..3cf2560 100644
--- a/bta/dm/bta_dm_api.cc
+++ b/bta/dm/bta_dm_api.cc
@@ -610,7 +610,6 @@
******************************************************************************/
void BTA_DmAddBleKey(BD_ADDR bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
tBTA_LE_KEY_TYPE key_type) {
-
tBTA_DM_API_ADD_BLEKEY* p_msg =
(tBTA_DM_API_ADD_BLEKEY*)osi_calloc(sizeof(tBTA_DM_API_ADD_BLEKEY));
@@ -842,7 +841,6 @@
do_in_bta_thread(FROM_HERE, base::Bind(&bta_dm_ble_set_adv_params,
adv_int_min, adv_int_max, nullptr));
-
}
/*******************************************************************************
@@ -1523,7 +1521,6 @@
bta_sys_sendmsg(p_msg);
}
-
/*******************************************************************************
*
* Function BTA_DmSetEncryption
@@ -1659,4 +1656,3 @@
if (cmn_ble_vsc_cb.adv_inst_max > 0) btm_ble_multi_adv_cleanup();
}
-
diff --git a/bta/dm/bta_dm_cfg.cc b/bta/dm/bta_dm_cfg.cc
index 423602e..1d0ce9e 100644
--- a/bta/dm/bta_dm_cfg.cc
+++ b/bta/dm/bta_dm_cfg.cc
@@ -141,13 +141,13 @@
{BTA_ID_MSE, BTA_ALL_APP_ID, 7}, /* reuse fts spec table */
{BTA_ID_JV, BTA_JV_PM_ID_1,
6}, /* app BTA_JV_PM_ID_1, reuse ftc spec table */
- {BTA_ID_JV, BTA_ALL_APP_ID, 7}, /* reuse fts spec table */
- {BTA_ID_HL, BTA_ALL_APP_ID, 8}, /* reuse fts spec table */
- {BTA_ID_PAN, BTUI_PAN_ID_PANU, 9}, /* PANU spec table */
- {BTA_ID_PAN, BTUI_PAN_ID_NAP, 10}, /* NAP spec table */
- {BTA_ID_HS, BTA_ALL_APP_ID, 11}, /* HS spec table */
+ {BTA_ID_JV, BTA_ALL_APP_ID, 7}, /* reuse fts spec table */
+ {BTA_ID_HL, BTA_ALL_APP_ID, 8}, /* reuse fts spec table */
+ {BTA_ID_PAN, BTUI_PAN_ID_PANU, 9}, /* PANU spec table */
+ {BTA_ID_PAN, BTUI_PAN_ID_NAP, 10}, /* NAP spec table */
+ {BTA_ID_HS, BTA_ALL_APP_ID, 11}, /* HS spec table */
{BTA_ID_GATTC, BTA_ALL_APP_ID, 13}, /* gattc spec table */
- {BTA_ID_GATTS, BTA_ALL_APP_ID, 14} /* gatts spec table */
+ {BTA_ID_GATTS, BTA_ALL_APP_ID, 14} /* gatts spec table */
};
tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = {
diff --git a/bta/dm/bta_dm_main.cc b/bta/dm/bta_dm_main.cc
index d8810d0..b8c572b 100644
--- a/bta/dm/bta_dm_main.cc
+++ b/bta/dm/bta_dm_main.cc
@@ -124,8 +124,8 @@
BTA_DM_SEARCH_CANCEL_TRANSAC_CMPL, /* 15 bta_dm_search_cancel_transac_cmpl */
BTA_DM_DISC_RMT_NAME, /* 16 bta_dm_disc_rmt_name */
BTA_DM_API_DI_DISCOVER, /* 17 bta_dm_di_disc */
- BTA_DM_CLOSE_GATT_CONN, /* 18 bta_dm_close_gatt_conn */
- BTA_DM_SEARCH_NUM_ACTIONS /* 19 */
+ BTA_DM_CLOSE_GATT_CONN, /* 18 bta_dm_close_gatt_conn */
+ BTA_DM_SEARCH_NUM_ACTIONS /* 19 */
};
/* action function list */
@@ -150,8 +150,7 @@
*/
bta_dm_disc_rmt_name, /* 16 BTA_DM_DISC_RMT_NAME */
bta_dm_di_disc, /* 17 BTA_DM_API_DI_DISCOVER */
- bta_dm_close_gatt_conn
-};
+ bta_dm_close_gatt_conn};
#define BTA_DM_SEARCH_IGNORE BTA_DM_SEARCH_NUM_ACTIONS
/* state table information */
@@ -183,8 +182,7 @@
/* API_DI_DISCOVER_EVT */ {BTA_DM_API_DI_DISCOVER, BTA_DM_SEARCH_IGNORE,
BTA_DM_SEARCH_ACTIVE},
/* DISC_CLOSE_TOUT_EVT */
- {BTA_DM_CLOSE_GATT_CONN, BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IDLE}
-};
+ {BTA_DM_CLOSE_GATT_CONN, BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IDLE}};
const uint8_t bta_dm_search_search_active_st_table[][BTA_DM_SEARCH_NUM_COLS] = {
/* Event Action 1
@@ -237,8 +235,7 @@
/* API_DI_DISCOVER_EVT */ {BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IGNORE,
BTA_DM_SEARCH_CANCELLING},
/* DISC_CLOSE_TOUT_EVT */
- {BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_CANCELLING}
-};
+ {BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_CANCELLING}};
const uint8_t bta_dm_search_disc_active_st_table[][BTA_DM_SEARCH_NUM_COLS] = {
@@ -263,8 +260,7 @@
/* API_DI_DISCOVER_EVT */ {BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IGNORE,
BTA_DM_DISCOVER_ACTIVE},
/* DISC_CLOSE_TOUT_EVT */
- {BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IGNORE, BTA_DM_DISCOVER_ACTIVE}
-};
+ {BTA_DM_SEARCH_IGNORE, BTA_DM_SEARCH_IGNORE, BTA_DM_DISCOVER_ACTIVE}};
typedef const uint8_t (*tBTA_DM_ST_TBL)[BTA_DM_SEARCH_NUM_COLS];
diff --git a/btif/co/bta_av_co.cc b/btif/co/bta_av_co.cc
index b52fcbf..e51df17 100644
--- a/btif/co/bta_av_co.cc
+++ b/btif/co/bta_av_co.cc
@@ -59,10 +59,10 @@
* Local data
****************************************************************************/
typedef struct {
- uint8_t sep_info_idx; /* local SEP index (in BTA tables) */
- uint8_t seid; /* peer SEP index (in peer tables) */
- uint8_t codec_caps[AVDT_CODEC_SIZE]; /* peer SEP codec capabilities */
- uint8_t num_protect; /* peer SEP number of CP elements */
+ uint8_t sep_info_idx; /* local SEP index (in BTA tables) */
+ uint8_t seid; /* peer SEP index (in peer tables) */
+ uint8_t codec_caps[AVDT_CODEC_SIZE]; /* peer SEP codec capabilities */
+ uint8_t num_protect; /* peer SEP number of CP elements */
uint8_t protect_info[AVDT_CP_INFO_LEN]; /* peer SEP content protection info */
} tBTA_AV_CO_SINK;
@@ -78,15 +78,15 @@
uint8_t num_rx_srcs; /* number of received srcs */
uint8_t num_sup_sinks; /* number of supported sinks in the sinks array */
uint8_t num_sup_srcs; /* number of supported srcs in the srcs array */
- const tBTA_AV_CO_SINK* p_sink; /* currently selected sink */
- const tBTA_AV_CO_SINK* p_src; /* currently selected src */
+ const tBTA_AV_CO_SINK* p_sink; /* currently selected sink */
+ const tBTA_AV_CO_SINK* p_src; /* currently selected src */
uint8_t codec_config[AVDT_CODEC_SIZE]; /* current codec configuration */
- bool cp_active; /* current CP configuration */
- bool acp; /* acceptor */
- bool reconfig_needed; /* reconfiguration is needed */
- bool opened; /* opened */
- uint16_t mtu; /* maximum transmit unit size */
- uint16_t uuid_to_connect; /* uuid of peer device */
+ bool cp_active; /* current CP configuration */
+ bool acp; /* acceptor */
+ bool reconfig_needed; /* reconfiguration is needed */
+ bool opened; /* opened */
+ uint16_t mtu; /* maximum transmit unit size */
+ uint16_t uuid_to_connect; /* uuid of peer device */
} tBTA_AV_CO_PEER;
typedef struct {
@@ -437,7 +437,7 @@
for (int i = A2DP_CODEC_SEP_INDEX_SOURCE_MAX - 1;
i >= A2DP_CODEC_SEP_INDEX_SOURCE_MIN; i--) {
tA2DP_CODEC_SEP_INDEX source_codec_sep_index =
- static_cast<tA2DP_CODEC_SEP_INDEX>(i);
+ static_cast<tA2DP_CODEC_SEP_INDEX>(i);
APPL_TRACE_DEBUG("%s: trying codec %s with sep_index %d", __func__,
A2DP_CodecSepIndexStr(source_codec_sep_index), i);
tAVDT_CFG avdt_cfg;
@@ -446,10 +446,9 @@
A2DP_CodecSepIndexStr(source_codec_sep_index));
continue;
}
- p_sink = bta_av_co_find_peer_sink_supports_codec(avdt_cfg.codec_info,
- p_peer);
- if (p_sink == NULL)
- continue;
+ p_sink =
+ bta_av_co_find_peer_sink_supports_codec(avdt_cfg.codec_info, p_peer);
+ if (p_sink == NULL) continue;
// Found a preferred codec
APPL_TRACE_DEBUG("%s: selected codec %s", __func__,
A2DP_CodecName(avdt_cfg.codec_info));
@@ -604,7 +603,8 @@
} else if ((num_protect == 1) && (!bta_av_co_cb.cp.active)) {
reconfig_needed = true;
}
- memcpy(bta_av_co_cb.codec_config_setconfig, p_codec_info, AVDT_CODEC_SIZE);
+ memcpy(bta_av_co_cb.codec_config_setconfig, p_codec_info,
+ AVDT_CODEC_SIZE);
if (t_local_sep == AVDT_TSEP_SNK) {
/*
* If Peer is SRC, and our config subset matches with what is
@@ -903,8 +903,7 @@
if (A2DP_CodecConfigMatchesCapabilities(codec_config,
p_peer->sinks[index].codec_caps)) {
#if (BTA_AV_CO_CP_SCMS_T == TRUE)
- if (!bta_av_co_audio_sink_has_scmst(&p_peer->sinks[index]))
- continue;
+ if (!bta_av_co_audio_sink_has_scmst(&p_peer->sinks[index])) continue;
#endif
return &p_peer->sinks[index];
}
@@ -958,7 +957,7 @@
for (int i = A2DP_CODEC_SEP_INDEX_SOURCE_MAX - 1;
i >= A2DP_CODEC_SEP_INDEX_SOURCE_MIN; i--) {
tA2DP_CODEC_SEP_INDEX source_codec_sep_index =
- static_cast<tA2DP_CODEC_SEP_INDEX>(i);
+ static_cast<tA2DP_CODEC_SEP_INDEX>(i);
APPL_TRACE_DEBUG("%s: trying codec %s with sep_index %d", __func__,
A2DP_CodecSepIndexStr(source_codec_sep_index), i);
if (!A2DP_SetSourceCodec(source_codec_sep_index, p_feeding_params,
@@ -996,7 +995,7 @@
if (!p_peer->opened) continue;
const tBTA_AV_CO_SINK* p_sink =
- bta_av_co_find_peer_sink_supports_codec(codec_config, p_peer);
+ bta_av_co_find_peer_sink_supports_codec(codec_config, p_peer);
if (p_sink == NULL) {
APPL_TRACE_DEBUG("%s: index %d doesn't support codec", __func__, index);
continue;
diff --git a/btif/co/bta_dm_co.cc b/btif/co/bta_dm_co.cc
index 82b92fa..7d31e19 100644
--- a/btif/co/bta_dm_co.cc
+++ b/btif/co/bta_dm_co.cc
@@ -23,9 +23,9 @@
#include "bta_dm_ci.h"
#include "bta_dm_co.h"
#include "bta_sys.h"
+#include "bte_appl.h"
#include "btif_dm.h"
#include "osi/include/osi.h"
-#include "bte_appl.h"
tBTE_APPL_CFG bte_appl_cfg = {
BTA_LE_AUTH_REQ_SC_MITM_BOND, // Authentication requirements
@@ -46,8 +46,9 @@
* Returns true for success, false for fail.
*
******************************************************************************/
-bool bta_dm_co_get_compress_memory(UNUSED_ATTR tBTA_SYS_ID id, UNUSED_ATTR uint8_t **memory_p,
- UNUSED_ATTR uint32_t *memory_size) {
+bool bta_dm_co_get_compress_memory(UNUSED_ATTR tBTA_SYS_ID id,
+ UNUSED_ATTR uint8_t** memory_p,
+ UNUSED_ATTR uint32_t* memory_size) {
return true;
}
@@ -115,8 +116,7 @@
*
******************************************************************************/
void bta_dm_co_lk_upgrade(UNUSED_ATTR BD_ADDR bd_addr,
- UNUSED_ATTR bool *p_upgrade) {
-}
+ UNUSED_ATTR bool* p_upgrade) {}
/*******************************************************************************
*
@@ -316,7 +316,8 @@
* Returns void.
*
******************************************************************************/
-void bta_dm_co_le_io_key_req(UNUSED_ATTR BD_ADDR bd_addr, uint8_t* p_max_key_size,
+void bta_dm_co_le_io_key_req(UNUSED_ATTR BD_ADDR bd_addr,
+ uint8_t* p_max_key_size,
tBTA_LE_KEY_TYPE* p_init_key,
tBTA_LE_KEY_TYPE* p_resp_key) {
BTIF_TRACE_ERROR("##################################");
@@ -408,4 +409,3 @@
if (bte_appl_cfg.ble_max_key_size > 7 && bte_appl_cfg.ble_max_key_size <= 16)
*p_max_key_size = bte_appl_cfg.ble_max_key_size;
}
-
diff --git a/btif/co/bta_gatts_co.cc b/btif/co/bta_gatts_co.cc
index 54ab12c..24aea15 100644
--- a/btif/co/bta_gatts_co.cc
+++ b/btif/co/bta_gatts_co.cc
@@ -101,9 +101,8 @@
* Returns void.
*
******************************************************************************/
-void bta_gatts_co_update_handle_range(UNUSED_ATTR bool is_add,
- UNUSED_ATTR tBTA_GATTS_HNDL_RANGE *p_hndl_range) {
-}
+void bta_gatts_co_update_handle_range(
+ UNUSED_ATTR bool is_add, UNUSED_ATTR tBTA_GATTS_HNDL_RANGE* p_hndl_range) {}
/*******************************************************************************
*
@@ -123,8 +122,8 @@
*
******************************************************************************/
bool bta_gatts_co_srv_chg(UNUSED_ATTR tBTA_GATTS_SRV_CHG_CMD cmd,
- UNUSED_ATTR tBTA_GATTS_SRV_CHG_REQ *p_req,
- UNUSED_ATTR tBTA_GATTS_SRV_CHG_RSP *p_rsp) {
+ UNUSED_ATTR tBTA_GATTS_SRV_CHG_REQ* p_req,
+ UNUSED_ATTR tBTA_GATTS_SRV_CHG_RSP* p_rsp) {
return false;
}
@@ -140,7 +139,8 @@
* Returns void.
*
******************************************************************************/
-bool bta_gatts_co_load_handle_range(UNUSED_ATTR uint8_t index,
- UNUSED_ATTR tBTA_GATTS_HNDL_RANGE *p_handle_range) {
+bool bta_gatts_co_load_handle_range(
+ UNUSED_ATTR uint8_t index,
+ UNUSED_ATTR tBTA_GATTS_HNDL_RANGE* p_handle_range) {
return false;
}
diff --git a/btif/co/bta_hh_co.cc b/btif/co/bta_hh_co.cc
index 7ff42c7..6be638e 100644
--- a/btif/co/bta_hh_co.cc
+++ b/btif/co/bta_hh_co.cc
@@ -403,8 +403,8 @@
******************************************************************************/
void bta_hh_co_data(uint8_t dev_handle, uint8_t* p_rpt, uint16_t len,
tBTA_HH_PROTO_MODE mode, uint8_t sub_class,
- uint8_t ctry_code,
- UNUSED_ATTR BD_ADDR peer_addr, uint8_t app_id) {
+ uint8_t ctry_code, UNUSED_ATTR BD_ADDR peer_addr,
+ uint8_t app_id) {
btif_hh_device_t* p_dev;
APPL_TRACE_DEBUG(
@@ -522,7 +522,6 @@
******************************************************************************/
void bta_hh_le_co_rpt_info(BD_ADDR remote_bda, tBTA_HH_RPT_CACHE_ENTRY* p_entry,
UNUSED_ATTR uint8_t app_id) {
-
unsigned idx = 0;
bdstr_t bdstr;
@@ -564,7 +563,6 @@
tBTA_HH_RPT_CACHE_ENTRY* bta_hh_le_co_cache_load(BD_ADDR remote_bda,
uint8_t* p_num_rpt,
UNUSED_ATTR uint8_t app_id) {
-
bdstr_t bdstr;
snprintf(bdstr, sizeof(bdstr), "%02x:%02x:%02x:%02x:%02x:%02x", remote_bda[0],
remote_bda[1], remote_bda[2], remote_bda[3], remote_bda[4],
@@ -596,7 +594,6 @@
******************************************************************************/
void bta_hh_le_co_reset_rpt_cache(BD_ADDR remote_bda,
UNUSED_ATTR uint8_t app_id) {
-
bdstr_t bdstr;
snprintf(bdstr, sizeof(bdstr), "%02x:%02x:%02x:%02x:%02x:%02x", remote_bda[0],
remote_bda[1], remote_bda[2], remote_bda[3], remote_bda[4],
diff --git a/btif/co/bta_hl_co.cc b/btif/co/bta_hl_co.cc
index 03585ec..66699da 100644
--- a/btif/co/bta_hl_co.cc
+++ b/btif/co/bta_hl_co.cc
@@ -378,8 +378,10 @@
* Returns Void
*
******************************************************************************/
-void bta_hl_co_get_echo_data(UNUSED_ATTR uint8_t app_id, tBTA_HL_MCL_HANDLE mcl_handle,
- UNUSED_ATTR uint16_t buf_size, UNUSED_ATTR uint8_t *p_buf, uint16_t evt) {
+void bta_hl_co_get_echo_data(UNUSED_ATTR uint8_t app_id,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ UNUSED_ATTR uint16_t buf_size,
+ UNUSED_ATTR uint8_t* p_buf, uint16_t evt) {
tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
BTIF_TRACE_ERROR("%s not supported", __func__);
@@ -402,9 +404,10 @@
* Returns Void
*
******************************************************************************/
-void bta_hl_co_put_echo_data(UNUSED_ATTR uint8_t app_id, tBTA_HL_MCL_HANDLE mcl_handle,
- UNUSED_ATTR uint16_t data_size, UNUSED_ATTR uint8_t *p_data,
- uint16_t evt) {
+void bta_hl_co_put_echo_data(UNUSED_ATTR uint8_t app_id,
+ tBTA_HL_MCL_HANDLE mcl_handle,
+ UNUSED_ATTR uint16_t data_size,
+ UNUSED_ATTR uint8_t* p_data, uint16_t evt) {
tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
BTIF_TRACE_ERROR("%s not supported", __func__);
diff --git a/btif/co/bta_pan_co.cc b/btif/co/bta_pan_co.cc
index 917830f..e072b26 100644
--- a/btif/co/bta_pan_co.cc
+++ b/btif/co/bta_pan_co.cc
@@ -229,10 +229,11 @@
* Returns void
*
******************************************************************************/
-void bta_pan_co_tx_write(UNUSED_ATTR uint16_t handle, UNUSED_ATTR uint8_t app_id, UNUSED_ATTR BD_ADDR src,
- UNUSED_ATTR BD_ADDR dst, UNUSED_ATTR uint16_t protocol, UNUSED_ATTR uint8_t *p_data,
- UNUSED_ATTR uint16_t len, UNUSED_ATTR bool ext,
- UNUSED_ATTR bool forward) {
+void bta_pan_co_tx_write(UNUSED_ATTR uint16_t handle,
+ UNUSED_ATTR uint8_t app_id, UNUSED_ATTR BD_ADDR src,
+ UNUSED_ATTR BD_ADDR dst, UNUSED_ATTR uint16_t protocol,
+ UNUSED_ATTR uint8_t* p_data, UNUSED_ATTR uint16_t len,
+ UNUSED_ATTR bool ext, UNUSED_ATTR bool forward) {
BTIF_TRACE_API("bta_pan_co_tx_write not used");
}
@@ -249,9 +250,11 @@
* Returns true if flow enabled
*
******************************************************************************/
-void bta_pan_co_tx_writebuf(UNUSED_ATTR uint16_t handle, UNUSED_ATTR uint8_t app_id, UNUSED_ATTR BD_ADDR src,
- UNUSED_ATTR BD_ADDR dst, UNUSED_ATTR uint16_t protocol, UNUSED_ATTR BT_HDR *p_buf,
- UNUSED_ATTR bool ext,
+void bta_pan_co_tx_writebuf(UNUSED_ATTR uint16_t handle,
+ UNUSED_ATTR uint8_t app_id, UNUSED_ATTR BD_ADDR src,
+ UNUSED_ATTR BD_ADDR dst,
+ UNUSED_ATTR uint16_t protocol,
+ UNUSED_ATTR BT_HDR* p_buf, UNUSED_ATTR bool ext,
UNUSED_ATTR bool forward) {
BTIF_TRACE_API("bta_pan_co_tx_writebuf not used");
}
@@ -287,9 +290,11 @@
* Returns void
*
******************************************************************************/
-void bta_pan_co_pfilt_ind(UNUSED_ATTR uint16_t handle, UNUSED_ATTR bool indication,
- UNUSED_ATTR tBTA_PAN_STATUS result, UNUSED_ATTR uint16_t len,
- UNUSED_ATTR uint8_t *p_filters) {
+void bta_pan_co_pfilt_ind(UNUSED_ATTR uint16_t handle,
+ UNUSED_ATTR bool indication,
+ UNUSED_ATTR tBTA_PAN_STATUS result,
+ UNUSED_ATTR uint16_t len,
+ UNUSED_ATTR uint8_t* p_filters) {
BTIF_TRACE_API("bta_pan_co_pfilt_ind");
}
@@ -302,8 +307,10 @@
* Returns void
*
******************************************************************************/
-void bta_pan_co_mfilt_ind(UNUSED_ATTR uint16_t handle, UNUSED_ATTR bool indication,
- UNUSED_ATTR tBTA_PAN_STATUS result, UNUSED_ATTR uint16_t len,
- UNUSED_ATTR uint8_t *p_filters) {
+void bta_pan_co_mfilt_ind(UNUSED_ATTR uint16_t handle,
+ UNUSED_ATTR bool indication,
+ UNUSED_ATTR tBTA_PAN_STATUS result,
+ UNUSED_ATTR uint16_t len,
+ UNUSED_ATTR uint8_t* p_filters) {
BTIF_TRACE_API("bta_pan_co_mfilt_ind");
}
diff --git a/btif/include/btif_dm.h b/btif/include/btif_dm.h
index 4f3e22e..555d58f 100644
--- a/btif/include/btif_dm.h
+++ b/btif/include/btif_dm.h
@@ -105,5 +105,4 @@
void btif_dm_update_ble_remote_properties(BD_ADDR bd_addr, BD_NAME bd_name,
tBT_DEVICE_TYPE dev_type);
-
#endif
diff --git a/btif/src/bluetooth.cc b/btif/src/bluetooth.cc
index a381f11..2551433 100644
--- a/btif/src/bluetooth.cc
+++ b/btif/src/bluetooth.cc
@@ -446,7 +446,7 @@
return &bluetoothInterface;
}
-static int close_bluetooth_stack(UNUSED_ATTR struct hw_device_t *device) {
+static int close_bluetooth_stack(UNUSED_ATTR struct hw_device_t* device) {
cleanup();
return 0;
}
diff --git a/btif/src/btif_av.cc b/btif/src/btif_av.cc
index 0541eb9..c8e4dd9 100644
--- a/btif/src/btif_av.cc
+++ b/btif/src/btif_av.cc
@@ -554,8 +554,8 @@
case BTIF_AV_CONNECT_REQ_EVT:
// Check for device, if same device which moved to opening then ignore
// callback
- if (memcmp(((btif_av_connect_req_t *)p_data)->target_bda, &(btif_av_cb.peer_bda),
- sizeof(btif_av_cb.peer_bda)) == 0) {
+ if (memcmp(((btif_av_connect_req_t*)p_data)->target_bda,
+ &(btif_av_cb.peer_bda), sizeof(btif_av_cb.peer_bda)) == 0) {
BTIF_TRACE_DEBUG(
"%s: Same device moved to Opening state,ignore Connect Req",
__func__);
@@ -564,8 +564,9 @@
} else {
BTIF_TRACE_DEBUG("%s: Moved from idle by Incoming Connection request",
__func__);
- btif_report_connection_state(BTAV_CONNECTION_STATE_DISCONNECTED,
- ((btif_av_connect_req_t *)p_data)->target_bda);
+ btif_report_connection_state(
+ BTAV_CONNECTION_STATE_DISCONNECTED,
+ ((btif_av_connect_req_t*)p_data)->target_bda);
btif_queue_advance();
break;
}
@@ -1641,18 +1642,19 @@
** Returns Void
**
*******************************************************************************/
-void btif_av_move_idle(bt_bdaddr_t bd_addr)
-{
- /* inform the application that ACL is disconnected and move to idle state */
- btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle);
- BTIF_TRACE_DEBUG("%s: ACL Disconnected state %d is same device %d", __func__,
- state, memcmp (&bd_addr, &(btif_av_cb.peer_bda), sizeof(bd_addr)));
- if (state == BTIF_AV_STATE_OPENING &&
- (memcmp (&bd_addr, &(btif_av_cb.peer_bda), sizeof(bd_addr)) == 0))
- {
- BTIF_TRACE_DEBUG("%s: Moving State from Opening to Idle due to ACL disconnect", __func__);
- btif_report_connection_state(BTAV_CONNECTION_STATE_DISCONNECTED,
- &(btif_av_cb.peer_bda));
- btif_sm_change_state(btif_av_cb.sm_handle, BTIF_AV_STATE_IDLE);
- }
+void btif_av_move_idle(bt_bdaddr_t bd_addr) {
+ /* inform the application that ACL is disconnected and move to idle state */
+ btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle);
+ BTIF_TRACE_DEBUG("%s: ACL Disconnected state %d is same device %d", __func__,
+ state,
+ memcmp(&bd_addr, &(btif_av_cb.peer_bda), sizeof(bd_addr)));
+ if (state == BTIF_AV_STATE_OPENING &&
+ (memcmp(&bd_addr, &(btif_av_cb.peer_bda), sizeof(bd_addr)) == 0)) {
+ BTIF_TRACE_DEBUG(
+ "%s: Moving State from Opening to Idle due to ACL disconnect",
+ __func__);
+ btif_report_connection_state(BTAV_CONNECTION_STATE_DISCONNECTED,
+ &(btif_av_cb.peer_bda));
+ btif_sm_change_state(btif_av_cb.sm_handle, BTIF_AV_STATE_IDLE);
+ }
}
diff --git a/btif/src/btif_ble_advertiser.cc b/btif/src/btif_ble_advertiser.cc
index 41a8684..efe0f79 100644
--- a/btif/src/btif_ble_advertiser.cc
+++ b/btif/src/btif_ble_advertiser.cc
@@ -113,28 +113,26 @@
params->adv_filter_policy = 0;
params->tx_power = ble_map_adv_tx_power(tx_power);
- do_in_bta_thread(
- FROM_HERE,
- Bind(&BleAdvertisingManager::SetParameters,
- base::Unretained(BleAdvertisingManager::Get()), advertiser_id,
- base::Owned(params),
- Bind(&BleAdvertiserInterfaceImpl::SetParametersCb,
- base::Unretained(this), cb)));
+ do_in_bta_thread(FROM_HERE,
+ Bind(&BleAdvertisingManager::SetParameters,
+ base::Unretained(BleAdvertisingManager::Get()),
+ advertiser_id, base::Owned(params),
+ Bind(&BleAdvertiserInterfaceImpl::SetParametersCb,
+ base::Unretained(this), cb)));
}
- void SetDataCb(Callback cb, uint8_t advertiser_id,
- uint8_t status) {
+ void SetDataCb(Callback cb, uint8_t advertiser_id, uint8_t status) {
do_in_jni_thread(Bind(cb, status));
}
void SetData(int advertiser_id, bool set_scan_rsp, vector<uint8_t> data,
Callback cb) override {
- do_in_bta_thread(
- FROM_HERE, Bind(&BleAdvertisingManager::SetData,
- base::Unretained(BleAdvertisingManager::Get()),
- advertiser_id, set_scan_rsp, std::move(data),
- Bind(&BleAdvertiserInterfaceImpl::SetDataCb,
- base::Unretained(this), cb, advertiser_id)));
+ do_in_bta_thread(FROM_HERE,
+ Bind(&BleAdvertisingManager::SetData,
+ base::Unretained(BleAdvertisingManager::Get()),
+ advertiser_id, set_scan_rsp, std::move(data),
+ Bind(&BleAdvertiserInterfaceImpl::SetDataCb,
+ base::Unretained(this), cb, advertiser_id)));
}
void EnableTimeoutCb(Callback cb, uint8_t status) {
@@ -145,8 +143,8 @@
do_in_jni_thread(Bind(cb, status));
}
- void Enable(uint8_t advertiser_id, bool enable, Callback cb,
- int timeout_s, Callback timeout_cb) override {
+ void Enable(uint8_t advertiser_id, bool enable, Callback cb, int timeout_s,
+ Callback timeout_cb) override {
VLOG(1) << __func__ << " advertiser_id: " << +advertiser_id
<< " ,enable: " << enable;
@@ -156,9 +154,8 @@
base::Unretained(BleAdvertisingManager::Get()), advertiser_id,
enable, Bind(&BleAdvertiserInterfaceImpl::EnableCb,
base::Unretained(this), cb),
- timeout_s,
- Bind(&BleAdvertiserInterfaceImpl::EnableTimeoutCb,
- base::Unretained(this), timeout_cb)));
+ timeout_s, Bind(&BleAdvertiserInterfaceImpl::EnableTimeoutCb,
+ base::Unretained(this), timeout_cb)));
}
void StartAdvertising(uint8_t advertiser_id, Callback cb,
diff --git a/btif/src/btif_ble_scanner.cc b/btif/src/btif_ble_scanner.cc
index cc04f20..f757233 100644
--- a/btif/src/btif_ble_scanner.cc
+++ b/btif/src/btif_ble_scanner.cc
@@ -51,14 +51,15 @@
extern bt_status_t do_in_jni_thread(const base::Closure& task);
extern const btgatt_callbacks_t* bt_gatt_callbacks;
-#define SCAN_CBACK_IN_JNI(P_CBACK, ...) \
- do { \
- if (bt_gatt_callbacks && bt_gatt_callbacks->scanner->P_CBACK) { \
- BTIF_TRACE_API("HAL bt_gatt_callbacks->client->%s", #P_CBACK); \
- do_in_jni_thread(Bind(bt_gatt_callbacks->scanner->P_CBACK, __VA_ARGS__)); \
- } else { \
- ASSERTC(0, "Callback is NULL", 0); \
- } \
+#define SCAN_CBACK_IN_JNI(P_CBACK, ...) \
+ do { \
+ if (bt_gatt_callbacks && bt_gatt_callbacks->scanner->P_CBACK) { \
+ BTIF_TRACE_API("HAL bt_gatt_callbacks->client->%s", #P_CBACK); \
+ do_in_jni_thread( \
+ Bind(bt_gatt_callbacks->scanner->P_CBACK, __VA_ARGS__)); \
+ } else { \
+ ASSERTC(0, "Callback is NULL", 0); \
+ } \
} while (0)
#define CHECK_BTGATT_INIT() \
@@ -197,7 +198,7 @@
void bta_scan_param_setup_cb(tGATT_IF client_if, tBTM_STATUS status) {
SCAN_CBACK_IN_JNI(scan_parameter_setup_completed_cb, client_if,
- btif_gattc_translate_btm_status(status));
+ btif_gattc_translate_btm_status(status));
}
void bta_scan_filt_cfg_cb(tBTA_DM_BLE_PF_ACTION action,
@@ -205,7 +206,7 @@
tBTA_DM_BLE_PF_AVBL_SPACE avbl_space,
tBTA_STATUS status, tBTA_DM_BLE_REF_VALUE ref_value) {
SCAN_CBACK_IN_JNI(scan_filter_cfg_cb, action, ref_value, status, cfg_op,
- avbl_space);
+ avbl_space);
}
void bta_scan_filt_param_setup_cb(uint8_t action_type,
@@ -213,7 +214,7 @@
tBTA_DM_BLE_REF_VALUE ref_value,
tBTA_STATUS status) {
SCAN_CBACK_IN_JNI(scan_filter_param_cb, action_type, ref_value, status,
- avbl_space);
+ avbl_space);
}
void bta_scan_filt_status_cb(uint8_t action, tBTA_STATUS status,
@@ -245,7 +246,7 @@
case BTA_BLE_BATCH_SCAN_DATA_EVT: {
SCAN_CBACK_IN_JNI(batchscan_reports_cb, ref_value, status, 0, 0,
- vector<uint8_t>());
+ vector<uint8_t>());
return;
}
@@ -275,10 +276,10 @@
osi_free(p_rep_data);
SCAN_CBACK_IN_JNI(batchscan_reports_cb, ref_value, status, report_format,
- num_records, std::move(data));
+ num_records, std::move(data));
} else {
SCAN_CBACK_IN_JNI(batchscan_reports_cb, ref_value, status, report_format,
- num_records, vector<uint8_t>());
+ num_records, vector<uint8_t>());
}
}
@@ -368,7 +369,6 @@
SCAN_CBACK_IN_JNI(track_adv_event_cb, Owned(btif_scan_track_cb));
}
-
void btif_gattc_register_scanner_impl(tBT_UUID uuid) {
BTA_GATTC_AppRegister(&uuid, bta_gatts_cback);
}
@@ -387,7 +387,8 @@
bt_status_t btif_gattc_unregister_scanner(int scanner_id) {
CHECK_BTGATT_INIT();
- return do_in_jni_thread(Bind(&btif_gattc_unregister_scanner_impl, scanner_id));
+ return do_in_jni_thread(
+ Bind(&btif_gattc_unregister_scanner_impl, scanner_id));
}
bt_status_t btif_gattc_scan(bool start) {
@@ -507,8 +508,7 @@
return BT_STATUS_PARM_INVALID;
switch (filt_type) {
- case BTA_DM_BLE_PF_ADDR_FILTER:
- {
+ case BTA_DM_BLE_PF_ADDR_FILTER: {
tBTA_DM_BLE_PF_COND_PARAM* cond = new tBTA_DM_BLE_PF_COND_PARAM;
memset(cond, 0, sizeof(tBTA_DM_BLE_PF_COND_PARAM));
@@ -524,8 +524,7 @@
filt_type, filt_index, nullptr,
&bta_scan_filt_cfg_cb, client_if));
- case BTA_DM_BLE_PF_SRVC_UUID:
- {
+ case BTA_DM_BLE_PF_SRVC_UUID: {
tBT_UUID bt_uuid;
btif_to_bta_uuid(&bt_uuid, p_uuid);
@@ -542,8 +541,7 @@
filt_index, client_if));
}
- case BTA_DM_BLE_PF_SRVC_SOL_UUID:
- {
+ case BTA_DM_BLE_PF_SRVC_SOL_UUID: {
tBTA_DM_BLE_PF_COND_PARAM* cond = new tBTA_DM_BLE_PF_COND_PARAM;
memset(cond, 0, sizeof(tBTA_DM_BLE_PF_COND_PARAM));
@@ -556,23 +554,20 @@
&bta_scan_filt_cfg_cb, client_if));
}
- case BTA_DM_BLE_PF_LOCAL_NAME:
- {
+ case BTA_DM_BLE_PF_LOCAL_NAME: {
return do_in_jni_thread(Bind(&btif_gattc_scan_filter_add_local_name,
std::move(data), action, filt_type,
filt_index, client_if));
}
- case BTA_DM_BLE_PF_MANU_DATA:
- {
+ case BTA_DM_BLE_PF_MANU_DATA: {
return do_in_jni_thread(Bind(&btif_gattc_scan_filter_add_manu_data,
company_id, company_id_mask, std::move(data),
std::move(mask), action, filt_type,
filt_index, client_if));
}
- case BTA_DM_BLE_PF_SRVC_DATA_PATTERN:
- {
+ case BTA_DM_BLE_PF_SRVC_DATA_PATTERN: {
return do_in_jni_thread(Bind(&btif_gattc_scan_filter_add_data_pattern,
std::move(data), std::move(mask), action,
filt_type, filt_index, client_if));
@@ -613,7 +608,6 @@
(tBLE_SCAN_PARAM_SETUP_CBACK)bta_scan_param_setup_cb));
}
-
bt_status_t btif_gattc_cfg_storage(int client_if, int batch_scan_full_max,
int batch_scan_trunc_max,
int batch_scan_notify_threshold) {
@@ -646,7 +640,7 @@
return do_in_jni_thread(Bind(BTA_DmBleReadScanReports, scan_mode, client_if));
}
-} //namespace
+} // namespace
const btgatt_scanner_interface_t btgattScannerInterface = {
btif_gattc_register_scanner,
diff --git a/btif/src/btif_core.cc b/btif/src/btif_core.cc
index 8e1c856..45e1bbd 100644
--- a/btif/src/btif_core.cc
+++ b/btif/src/btif_core.cc
@@ -572,8 +572,8 @@
BTIF_TRACE_DEBUG("BTIF DISABLE BLUETOOTH");
btm_ble_multi_adv_cleanup();
-// TODO(jpawlowski): this should do whole BTA_VendorCleanup(), but it would kill
-// the stack now.
+ // TODO(jpawlowski): this should do whole BTA_VendorCleanup(), but it would
+ // kill the stack now.
btif_dm_on_disable();
/* cleanup rfcomm & l2cap api */
@@ -655,7 +655,7 @@
* Returns None
*
******************************************************************************/
-static void btif_dut_mode_cback(UNUSED_ATTR tBTM_VSC_CMPL *p) {
+static void btif_dut_mode_cback(UNUSED_ATTR tBTM_VSC_CMPL* p) {
/* For now nothing to be done. */
}
diff --git a/btif/src/btif_dm.cc b/btif/src/btif_dm.cc
index f0de72b..6ec2147 100644
--- a/btif/src/btif_dm.cc
+++ b/btif/src/btif_dm.cc
@@ -667,7 +667,6 @@
}
if (btif_storage_get_remote_addr_type(bd_addr, &addr_type) !=
BT_STATUS_SUCCESS) {
-
// Try to read address type. OOB pairing might have set it earlier, but
// didn't store it, it defaults to BLE_ADDR_PUBLIC
uint8_t tmp_dev_type;
@@ -686,8 +685,7 @@
BTA_DmAddBleDevice(bd_addr->address, addr_type, device_type);
}
- if (is_hid && (device_type & BT_DEVICE_TYPE_BLE) == 0)
- {
+ if (is_hid && (device_type & BT_DEVICE_TYPE_BLE) == 0) {
bt_status_t status;
status = (bt_status_t)btif_hh_connect(bd_addr);
if (status != BT_STATUS_SUCCESS)
@@ -1125,7 +1123,6 @@
}
if (!is_crosskey ||
!(stack_config_get_interface()->get_pts_crosskey_sdp_disable())) {
-
// Ensure inquiry is stopped before attempting service discovery
btif_dm_cancel_discovery();
@@ -1300,7 +1297,7 @@
BT_PROPERTY_CLASS_OF_DEVICE, sizeof(cod),
&cod);
num_properties++;
-/* DEV_TYPE */
+ /* DEV_TYPE */
/* FixMe: Assumption is that bluetooth.h and BTE enums match */
/* Verify if the device is dual mode in NVRAM */
@@ -2267,7 +2264,8 @@
if (address_type == BLE_ADDR_PUBLIC || address_type == BLE_ADDR_RANDOM) {
// bd_addr->address is already reversed, so use it instead of
// oob_data->le_bt_dev_addr
- BTM_SecAddBleDevice(bd_addr->address, NULL, BT_DEVICE_TYPE_BLE, address_type);
+ BTM_SecAddBleDevice(bd_addr->address, NULL, BT_DEVICE_TYPE_BLE,
+ address_type);
}
}
@@ -2573,9 +2571,10 @@
return;
}
-void btif_dm_proc_io_req(UNUSED_ATTR BD_ADDR bd_addr, UNUSED_ATTR tBTA_IO_CAP *p_io_cap,
- UNUSED_ATTR tBTA_OOB_DATA *p_oob_data, tBTA_AUTH_REQ* p_auth_req,
- bool is_orig) {
+void btif_dm_proc_io_req(UNUSED_ATTR BD_ADDR bd_addr,
+ UNUSED_ATTR tBTA_IO_CAP* p_io_cap,
+ UNUSED_ATTR tBTA_OOB_DATA* p_oob_data,
+ tBTA_AUTH_REQ* p_auth_req, bool is_orig) {
uint8_t yes_no_bit = BTA_AUTH_SP_YES & *p_auth_req;
/* if local initiated:
** 1. set DD + MITM
@@ -2610,7 +2609,8 @@
}
void btif_dm_proc_io_rsp(UNUSED_ATTR BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
- UNUSED_ATTR tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req) {
+ UNUSED_ATTR tBTA_OOB_DATA oob_data,
+ tBTA_AUTH_REQ auth_req) {
if (auth_req & BTA_AUTH_BONDS) {
BTIF_TRACE_DEBUG("%s auth_req:%d", __func__, auth_req);
pairing_cb.auth_req = auth_req;
@@ -3249,9 +3249,7 @@
* Returns void
*
******************************************************************************/
-void btif_dm_read_energy_info() {
- BTA_DmBleGetEnergyInfo(bta_energy_info_cb);
-}
+void btif_dm_read_energy_info() { BTA_DmBleGetEnergyInfo(bta_energy_info_cb); }
static char* btif_get_default_local_name() {
if (btif_default_local_name[0] == '\0') {
diff --git a/btif/src/btif_gatt_client.cc b/btif/src/btif_gatt_client.cc
index dda2069..79c170c 100644
--- a/btif/src/btif_gatt_client.cc
+++ b/btif/src/btif_gatt_client.cc
@@ -201,7 +201,6 @@
ASSERTC(status == BT_STATUS_SUCCESS, "Context transfer failed!", status);
}
-
void btm_read_rssi_cb(tBTM_RSSI_RESULTS* p_result) {
if (!p_result) return;
diff --git a/btif/src/btif_gatt_server.cc b/btif/src/btif_gatt_server.cc
index e58a170..44b79cb 100644
--- a/btif/src/btif_gatt_server.cc
+++ b/btif/src/btif_gatt_server.cc
@@ -421,4 +421,3 @@
btif_gatts_add_service, btif_gatts_stop_service,
btif_gatts_delete_service, btif_gatts_send_indication,
btif_gatts_send_response};
-
diff --git a/btif/src/btif_gatt_test.cc b/btif/src/btif_gatt_test.cc
index 7f330cd..e64aa7d 100644
--- a/btif/src/btif_gatt_test.cc
+++ b/btif/src/btif_gatt_test.cc
@@ -86,8 +86,9 @@
return str_buf;
}
-static void btif_test_connect_cback(UNUSED_ATTR tGATT_IF gatt_if, UNUSED_ATTR BD_ADDR bda,
- uint16_t conn_id, bool connected,
+static void btif_test_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
+ UNUSED_ATTR BD_ADDR bda, uint16_t conn_id,
+ bool connected,
UNUSED_ATTR tGATT_DISCONN_REASON reason,
UNUSED_ATTR tBT_TRANSPORT transport) {
LOG_DEBUG(LOG_TAG, "%s: conn_id=%d, connected=%d", __func__, conn_id,
@@ -179,9 +180,9 @@
"-----------------------------------------------------------");
}
-static void btif_test_discovery_complete_cback(UNUSED_ATTR uint16_t conn_id,
- UNUSED_ATTR tGATT_DISC_TYPE disc_type,
- tGATT_STATUS status) {
+static void btif_test_discovery_complete_cback(
+ UNUSED_ATTR uint16_t conn_id, UNUSED_ATTR tGATT_DISC_TYPE disc_type,
+ tGATT_STATUS status) {
LOG_DEBUG(LOG_TAG, "%s: status=%d", __func__, status);
}
diff --git a/btif/src/btif_gatt_util.cc b/btif/src/btif_gatt_util.cc
index ea685d1..2b5c8fb 100644
--- a/btif/src/btif_gatt_util.cc
+++ b/btif/src/btif_gatt_util.cc
@@ -246,8 +246,8 @@
}
#else
void btif_gatt_check_encrypted_link(UNUSED_ATTR BD_ADDR bd_addr,
- UNUSED_ATTR tBTA_GATT_TRANSPORT transport_link) {
-}
+ UNUSED_ATTR tBTA_GATT_TRANSPORT
+ transport_link) {}
#endif
void btif_gatt_move_track_adv_data(btgatt_track_adv_info_t* p_dest,
diff --git a/btif/src/btif_hf.cc b/btif/src/btif_hf.cc
index 4f8f047..d71e9a5 100644
--- a/btif/src/btif_hf.cc
+++ b/btif/src/btif_hf.cc
@@ -1186,9 +1186,9 @@
BTIF_TRACE_EVENT(
"clcc_response: [%d] dir %d state %d mode %d number = %s type = %d",
index, dir, state, mode, number, type);
- int res_strlen = snprintf(ag_res.str, sizeof(ag_res.str),
- "%d,%d,%d,%d,%d", index, dir, state, mode,
- mpty);
+ int res_strlen =
+ snprintf(ag_res.str, sizeof(ag_res.str), "%d,%d,%d,%d,%d", index, dir,
+ state, mode, mpty);
if (number) {
size_t rem_bytes = sizeof(ag_res.str) - res_strlen;
diff --git a/btif/src/btif_hf_client.cc b/btif/src/btif_hf_client.cc
index f3f32d7..01b23a0 100644
--- a/btif/src/btif_hf_client.cc
+++ b/btif/src/btif_hf_client.cc
@@ -128,7 +128,7 @@
*
******************************************************************************/
static void btif_in_hf_client_generic_evt(uint16_t event,
- UNUSED_ATTR char *p_param) {
+ UNUSED_ATTR char* p_param) {
BTIF_TRACE_EVENT("%s: event=%d", __func__, event);
switch (event) {
case BTIF_HF_CLIENT_CB_AUDIO_CONNECTING: {
diff --git a/btif/src/btif_hl.cc b/btif/src/btif_hl.cc
index cb56dd1..b631f4b 100644
--- a/btif/src/btif_hl.cc
+++ b/btif/src/btif_hl.cc
@@ -55,19 +55,19 @@
#include "btu.h"
#include "mca_api.h"
#include "osi/include/list.h"
-#include "osi/include/osi.h"
#include "osi/include/log.h"
+#include "osi/include/osi.h"
#define MAX_DATATYPE_SUPPORTED 8
extern int btif_hl_update_maxfd(int max_org_s);
extern void btif_hl_select_monitor_callback(fd_set* p_cur_set,
- UNUSED_ATTR fd_set *p_org_set);
+ UNUSED_ATTR fd_set* p_org_set);
extern void btif_hl_select_wakeup_callback(fd_set* p_org_set,
int wakeup_signal);
extern int btif_hl_update_maxfd(int max_org_s);
extern void btif_hl_select_monitor_callback(fd_set* p_cur_set,
- UNUSED_ATTR fd_set *p_org_set);
+ UNUSED_ATTR fd_set* p_org_set);
extern void btif_hl_select_wakeup_callback(fd_set* p_org_set,
int wakeup_signal);
extern void btif_hl_soc_thread_init(void);
@@ -2929,7 +2929,7 @@
******************************************************************************/
static void btif_hl_proc_reg_request(uint8_t app_idx, uint8_t app_id,
tBTA_HL_REG_PARAM* p_reg_param,
- UNUSED_ATTR tBTA_HL_CBACK *p_cback) {
+ UNUSED_ATTR tBTA_HL_CBACK* p_cback) {
BTIF_TRACE_DEBUG("%s app_idx=%d app_id=%d", __func__, app_idx, app_id);
if (reg_counter > 1) {
@@ -4394,7 +4394,7 @@
*
******************************************************************************/
void btif_hl_select_monitor_callback(fd_set* p_cur_set,
- UNUSED_ATTR fd_set *p_org_set) {
+ UNUSED_ATTR fd_set* p_org_set) {
BTIF_TRACE_DEBUG("entering %s", __func__);
for (const list_node_t* node = list_begin(soc_queue);
@@ -4596,7 +4596,7 @@
* Returns void
*
******************************************************************************/
-static void* btif_hl_select_thread(UNUSED_ATTR void *arg) {
+static void* btif_hl_select_thread(UNUSED_ATTR void* arg) {
fd_set org_set, curr_set;
int r, max_curr_s, max_org_s;
diff --git a/btif/src/btif_pan.cc b/btif/src/btif_pan.cc
index 59b1017..70cd68b 100644
--- a/btif/src/btif_pan.cc
+++ b/btif/src/btif_pan.cc
@@ -407,8 +407,8 @@
}
int btpan_tap_send(int tap_fd, const BD_ADDR src, const BD_ADDR dst,
- uint16_t proto, const char* buf, uint16_t len, UNUSED_ATTR bool ext,
- UNUSED_ATTR bool forward) {
+ uint16_t proto, const char* buf, uint16_t len,
+ UNUSED_ATTR bool ext, UNUSED_ATTR bool forward) {
if (tap_fd != INVALID_FD) {
tETH_HDR eth_hdr;
memcpy(ð_hdr.h_dest, dst, ETH_ADDR_LEN);
diff --git a/include/bte.h b/include/bte.h
index 3436565..c3606b6 100644
--- a/include/bte.h
+++ b/include/bte.h
@@ -87,7 +87,8 @@
* collisions! */
#define BT_EVT_TO_HCISU_USERIAL_OP (0x0080 | BT_EVT_HCISU)
/* operation for above hcisu event */
-#define BT_HCISU_USERIAL_OPEN (0) /* open serial port calling USERIAL_Open() \
+#define BT_HCISU_USERIAL_OPEN \
+ (0) /* open serial port calling USERIAL_Open() \
*/
#define BT_HCISU_USERIAL_CLOSE (1) /* close userial port */
/* options associated with close op */