Skip to content

Commit f19e798

Browse files
MarkWangChinesefabiobaltieri
authored andcommitted
bluetooth: remove the unnecessary macro wrapper in header files
It eliminates the possibility of using IS_ENABLE(), so it is better to remove them. Signed-off-by: Mark Wang <[email protected]>
1 parent 6060d49 commit f19e798

File tree

4 files changed

+0
-14
lines changed

4 files changed

+0
-14
lines changed

include/zephyr/bluetooth/classic/a2dp.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,6 @@ int bt_a2dp_stream_abort(struct bt_a2dp_stream *stream);
832832
*/
833833
uint32_t bt_a2dp_get_mtu(struct bt_a2dp_stream *stream);
834834

835-
#if defined(CONFIG_BT_A2DP_SOURCE)
836835
/** @brief send a2dp media data
837836
*
838837
* Only A2DP source side can call this function.
@@ -846,7 +845,6 @@ uint32_t bt_a2dp_get_mtu(struct bt_a2dp_stream *stream);
846845
*/
847846
int bt_a2dp_stream_send(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num,
848847
uint32_t ts);
849-
#endif
850848

851849
#ifdef __cplusplus
852850
}

include/zephyr/bluetooth/services/ots.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,12 +1157,10 @@ void bt_ots_metadata_display(struct bt_ots_obj_metadata *metadata,
11571157
* @return CRC32 value.
11581158
*
11591159
*/
1160-
#if defined(CONFIG_BT_OTS_OACP_CHECKSUM_SUPPORT)
11611160
static inline uint32_t bt_ots_client_calc_checksum(const uint8_t *data, size_t len)
11621161
{
11631162
return crc32_ieee(data, len);
11641163
}
1165-
#endif
11661164

11671165
#ifdef __cplusplus
11681166
}

subsys/bluetooth/host/conn_internal.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ struct bt_conn_le {
142142
#endif
143143
};
144144

145-
#if defined(CONFIG_BT_CLASSIC)
146145
/* For now reserve space for 2 pages of LMP remote features */
147146
#define LMP_MAX_PAGES 2
148147

@@ -169,7 +168,6 @@ struct bt_conn_sco {
169168
uint8_t dev_class[3];
170169
uint8_t link_type;
171170
};
172-
#endif
173171

174172
struct bt_conn_iso {
175173
/* Reference to ACL Connection */
@@ -539,7 +537,6 @@ void notify_cs_procedure_enable_available(struct bt_conn *conn,
539537
uint8_t status,
540538
struct bt_conn_le_cs_procedure_enable_complete *params);
541539

542-
#if defined(CONFIG_BT_SMP)
543540
/* If role specific LTK is present */
544541
bool bt_conn_ltk_present(const struct bt_conn *conn);
545542

@@ -549,13 +546,10 @@ int bt_conn_le_start_encryption(struct bt_conn *conn, uint8_t rand[8],
549546

550547
/* Notify higher layers that RPA was resolved */
551548
void bt_conn_identity_resolved(struct bt_conn *conn);
552-
#endif /* CONFIG_BT_SMP */
553549

554-
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
555550
/* Notify higher layers that connection security changed */
556551
void bt_conn_security_changed(struct bt_conn *conn, uint8_t hci_err,
557552
enum bt_security_err err);
558-
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
559553

560554
/* Prepare a PDU to be sent over a connection */
561555
#if defined(CONFIG_NET_BUF_LOG)

subsys/bluetooth/host/hci_core.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,12 @@ struct bt_dev_le {
321321
sys_slist_t conn_ready;
322322
};
323323

324-
#if defined(CONFIG_BT_CLASSIC)
325324
struct bt_dev_br {
326325
/* Max controller's acceptable ACL packet length */
327326
uint16_t mtu;
328327
struct k_sem pkts;
329328
uint16_t esco_pkt_type;
330329
};
331-
#endif
332330

333331
/* The theoretical max for these is 8 and 64, but there's no point
334332
* in allocating the full memory if we only support a small subset.
@@ -445,11 +443,9 @@ struct bt_dev {
445443
};
446444

447445
extern struct bt_dev bt_dev;
448-
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
449446
extern const struct bt_conn_auth_cb *bt_auth;
450447
extern sys_slist_t bt_auth_info_cbs;
451448
enum bt_security_err bt_security_err_get(uint8_t hci_err);
452-
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
453449

454450
int bt_hci_recv(const struct device *dev, struct net_buf *buf);
455451

0 commit comments

Comments
 (0)