Skip to content

Commit 2b16c52

Browse files
wb-zjp846396holtmann
authored andcommitted
Bluetooth: 6lowpan: remove unused function
Fix the following clang warning: net/bluetooth/6lowpan.c:913:20: warning: unused function 'bdaddr_type' [-Wunused-function]. net/bluetooth/6lowpan.c:106:35: warning: unused function 'peer_lookup_ba' [-Wunused-function]. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 56ce20a commit 2b16c52

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

net/bluetooth/6lowpan.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -103,34 +103,6 @@ static inline bool peer_del(struct lowpan_btle_dev *dev,
103103
return false;
104104
}
105105

106-
static inline struct lowpan_peer *peer_lookup_ba(struct lowpan_btle_dev *dev,
107-
bdaddr_t *ba, __u8 type)
108-
{
109-
struct lowpan_peer *peer;
110-
111-
BT_DBG("peers %d addr %pMR type %d", atomic_read(&dev->peer_count),
112-
ba, type);
113-
114-
rcu_read_lock();
115-
116-
list_for_each_entry_rcu(peer, &dev->peers, list) {
117-
BT_DBG("dst addr %pMR dst type %d",
118-
&peer->chan->dst, peer->chan->dst_type);
119-
120-
if (bacmp(&peer->chan->dst, ba))
121-
continue;
122-
123-
if (type == peer->chan->dst_type) {
124-
rcu_read_unlock();
125-
return peer;
126-
}
127-
}
128-
129-
rcu_read_unlock();
130-
131-
return NULL;
132-
}
133-
134106
static inline struct lowpan_peer *
135107
__peer_lookup_chan(struct lowpan_btle_dev *dev, struct l2cap_chan *chan)
136108
{
@@ -907,14 +879,6 @@ static const struct l2cap_ops bt_6lowpan_chan_ops = {
907879
.set_shutdown = l2cap_chan_no_set_shutdown,
908880
};
909881

910-
static inline __u8 bdaddr_type(__u8 type)
911-
{
912-
if (type == ADDR_LE_DEV_PUBLIC)
913-
return BDADDR_LE_PUBLIC;
914-
else
915-
return BDADDR_LE_RANDOM;
916-
}
917-
918882
static int bt_6lowpan_connect(bdaddr_t *addr, u8 dst_type)
919883
{
920884
struct l2cap_chan *chan;

0 commit comments

Comments
 (0)