From f1ed22df09eccc4b61c25cf7ab0dd1d7b38a7b95 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Fri, 25 Sep 2020 14:57:49 -0700 Subject: [PATCH] Clean up unused defines and imports Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working Change-Id: I5c47ee320085664b3db68ff4a5860aa931d1376d --- stack/avct/avct_l2c.cc | 6 ------ stack/avct/avct_l2c_br.cc | 6 ------ stack/avdt/avdt_l2c.cc | 3 --- stack/bnep/bnep_main.cc | 6 ------ stack/gap/gap_conn.cc | 1 - stack/gatt/gatt_main.cc | 11 +---------- stack/hid/hidd_conn.cc | 7 ------- stack/hid/hidh_conn.cc | 7 ------- stack/sdp/sdp_main.cc | 2 -- 9 files changed, 1 insertion(+), 48 deletions(-) diff --git a/stack/avct/avct_l2c.cc b/stack/avct/avct_l2c.cc index bd549a25c..0b0375132 100644 --- a/stack/avct/avct_l2c.cc +++ b/stack/avct/avct_l2c.cc @@ -22,20 +22,14 @@ * ******************************************************************************/ -#include #include "avct_api.h" #include "avct_int.h" #include "bt_target.h" #include "bt_types.h" -#include "bt_utils.h" #include "l2c_api.h" #include "l2cdefs.h" #include "osi/include/osi.h" -/* Configuration flags. */ -#define AVCT_L2C_CFG_IND_DONE (1 << 0) -#define AVCT_L2C_CFG_CFM_DONE (1 << 1) - /* callback function declarations */ void avct_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid, uint16_t psm, uint8_t id); diff --git a/stack/avct/avct_l2c_br.cc b/stack/avct/avct_l2c_br.cc index b0cae5dea..cfc64e148 100644 --- a/stack/avct/avct_l2c_br.cc +++ b/stack/avct/avct_l2c_br.cc @@ -24,19 +24,13 @@ * *****************************************************************************/ -#include #include "avct_api.h" #include "avct_int.h" #include "bt_target.h" -#include "bt_utils.h" #include "l2c_api.h" #include "l2cdefs.h" #include "osi/include/osi.h" -/* Configuration flags. */ -#define AVCT_L2C_CFG_IND_DONE (1 << 0) -#define AVCT_L2C_CFG_CFM_DONE (1 << 1) - /* callback function declarations */ void avct_l2c_br_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid, uint16_t psm, uint8_t id); diff --git a/stack/avdt/avdt_l2c.cc b/stack/avdt/avdt_l2c.cc index e9304aa65..9eec40216 100644 --- a/stack/avdt/avdt_l2c.cc +++ b/stack/avdt/avdt_l2c.cc @@ -22,14 +22,11 @@ * ******************************************************************************/ -#include -#include "avdt_api.h" #include "avdt_int.h" #include "bt_target.h" #include "bt_types.h" #include "bta/include/bta_av_api.h" #include "btm_api.h" -#include "btm_int.h" #include "device/include/interop.h" #include "l2c_api.h" #include "l2cdefs.h" diff --git a/stack/bnep/bnep_main.cc b/stack/bnep/bnep_main.cc index 50c9efb3c..f72f11c83 100644 --- a/stack/bnep/bnep_main.cc +++ b/stack/bnep/bnep_main.cc @@ -22,26 +22,20 @@ * ******************************************************************************/ -#include -#include #include #include "bt_target.h" #include "bt_common.h" #include "bt_types.h" -#include "hcidefs.h" -#include "hcimsgs.h" #include "l2c_api.h" #include "l2cdefs.h" #include "log/log.h" #include "btm_api.h" -#include "btu.h" #include "bnep_api.h" #include "bnep_int.h" -#include "bt_utils.h" #include "bta/include/bta_api.h" #include "device/include/controller.h" diff --git a/stack/gap/gap_conn.cc b/stack/gap/gap_conn.cc index cdcef5c54..fab07dc77 100644 --- a/stack/gap/gap_conn.cc +++ b/stack/gap/gap_conn.cc @@ -35,7 +35,6 @@ typedef struct { #define GAP_CCB_STATE_LISTENING 1 #define GAP_CCB_STATE_CONN_SETUP 2 #define GAP_CCB_STATE_CFG_SETUP 3 -#define GAP_CCB_STATE_WAIT_SEC 4 #define GAP_CCB_STATE_CONNECTED 5 uint8_t con_state; diff --git a/stack/gatt/gatt_main.cc b/stack/gatt/gatt_main.cc index cee7c0eef..38ae8bf9f 100644 --- a/stack/gatt/gatt_main.cc +++ b/stack/gatt/gatt_main.cc @@ -39,14 +39,6 @@ using base::StringPrintf; -/* Configuration flags. */ -#define GATT_L2C_CFG_IND_DONE (1 << 0) -#define GATT_L2C_CFG_CFM_DONE (1 << 1) - -/* minimum GATT MTU size over BR/EDR link - */ -#define GATT_MIN_BR_MTU_SIZE 48 - /******************************************************************************/ /* L O C A L F U N C T I O N P R O T O T Y P E S */ /******************************************************************************/ @@ -660,8 +652,7 @@ void gatt_l2cif_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) { if (!p_tcb) return; /* GATT uses the smaller of our MTU and peer's MTU */ - if (p_cfg->mtu_present && - (p_cfg->mtu >= GATT_MIN_BR_MTU_SIZE && p_cfg->mtu < L2CAP_DEFAULT_MTU)) + if (p_cfg->mtu_present && p_cfg->mtu < L2CAP_DEFAULT_MTU) p_tcb->payload_size = p_cfg->mtu; else p_tcb->payload_size = L2CAP_DEFAULT_MTU; diff --git a/stack/hid/hidd_conn.cc b/stack/hid/hidd_conn.cc index 8183154c9..a5c002560 100644 --- a/stack/hid/hidd_conn.cc +++ b/stack/hid/hidd_conn.cc @@ -23,8 +23,6 @@ * ******************************************************************************/ -#include -#include #include #include "bt_types.h" @@ -32,13 +30,8 @@ #include "l2c_api.h" #include "l2cdefs.h" -#include "btm_api.h" -#include "btm_int.h" -#include "btu.h" - #include "hiddefs.h" -#include "bt_utils.h" #include "hidd_api.h" #include "hidd_int.h" diff --git a/stack/hid/hidh_conn.cc b/stack/hid/hidh_conn.cc index a6f53d9e4..acecb90da 100644 --- a/stack/hid/hidh_conn.cc +++ b/stack/hid/hidh_conn.cc @@ -22,8 +22,6 @@ * ******************************************************************************/ -#include -#include #include #include "bt_common.h" @@ -32,13 +30,8 @@ #include "l2c_api.h" #include "l2cdefs.h" -#include "btm_api.h" -#include "btm_int.h" -#include "btu.h" - #include "hiddefs.h" -#include "bt_utils.h" #include "hidh_api.h" #include "hidh_int.h" diff --git a/stack/sdp/sdp_main.cc b/stack/sdp/sdp_main.cc index 8921a9818..f706d538b 100644 --- a/stack/sdp/sdp_main.cc +++ b/stack/sdp/sdp_main.cc @@ -32,8 +32,6 @@ #include "l2cdefs.h" #include "osi/include/osi.h" -#include "btm_api.h" - #include "sdp_api.h" #include "sdpint.h" #include "stack/btm/btm_sec.h" -- 2.11.0