Skip to content

Commit

Permalink
Bluetooth: 6lowpan: remove unused function
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Jiapeng Chong authored and holtmann committed Jun 26, 2021
1 parent de75cd0 commit b0e56db
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions net/bluetooth/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,34 +103,6 @@ static inline bool peer_del(struct lowpan_btle_dev *dev,
return false;
}

static inline struct lowpan_peer *peer_lookup_ba(struct lowpan_btle_dev *dev,
bdaddr_t *ba, __u8 type)
{
struct lowpan_peer *peer;

BT_DBG("peers %d addr %pMR type %d", atomic_read(&dev->peer_count),
ba, type);

rcu_read_lock();

list_for_each_entry_rcu(peer, &dev->peers, list) {
BT_DBG("dst addr %pMR dst type %d",
&peer->chan->dst, peer->chan->dst_type);

if (bacmp(&peer->chan->dst, ba))
continue;

if (type == peer->chan->dst_type) {
rcu_read_unlock();
return peer;
}
}

rcu_read_unlock();

return NULL;
}

static inline struct lowpan_peer *
__peer_lookup_chan(struct lowpan_btle_dev *dev, struct l2cap_chan *chan)
{
Expand Down Expand Up @@ -907,14 +879,6 @@ static const struct l2cap_ops bt_6lowpan_chan_ops = {
.set_shutdown = l2cap_chan_no_set_shutdown,
};

static inline __u8 bdaddr_type(__u8 type)
{
if (type == ADDR_LE_DEV_PUBLIC)
return BDADDR_LE_PUBLIC;
else
return BDADDR_LE_RANDOM;
}

static int bt_6lowpan_connect(bdaddr_t *addr, u8 dst_type)
{
struct l2cap_chan *chan;
Expand Down

0 comments on commit b0e56db

Please sign in to comment.