Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp595392pxb; Thu, 15 Apr 2021 01:50:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhXPYMt6p4OYl/Cd0lQ9MeV9o5X8uirn0hAaAi3WIwKenzZckYBTqltBGQu7+HOlezkznv X-Received: by 2002:a65:6255:: with SMTP id q21mr2465652pgv.382.1618476628873; Thu, 15 Apr 2021 01:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618476628; cv=none; d=google.com; s=arc-20160816; b=v1uDQCWWyInXojMFALU7nZdTW12DCmkctXEA8QXTToASScaifKHDn8Sd1t/KFjstu7 S06kFAUJm8L9Dp2ZhnyQ6jrkS/n//tJPXtZ2yXD/uz1VOXmeVB+S5IuzxwWABOUGpF4P YVo8FAJaEJrLhiJ1S//tZyfusG9r+Sp4sgQWuwX+ru4MHQPa90FmMTUUeAyoqCrOsfSY uEkra4kak9fcm/deiLJIukodfH+peQdpKrxDdeJxEKPn483wn22k8f2mOs5oUiykutTQ ACnDF75isw4UkaZSd+jc566/UX1eHPAIxqvQvGe+rIVS497UblOHBifH/pHd/zsw6lvp jDIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=QZ4GQBUXjpMQTcRS0FdZYi6CuNWvWuJnhJnXU88VZws=; b=KDJcl8WxHMWE8HQeU8wSE/1qZrr49qtJ9mh31cvtHaX8BTJWs7dQBM21+WPRaKmb9s d7vLn7ttG5STkK5Pz9A1e1qxwFfvl+MlcwzftEFjPx5Z0eesMcAOCk23sa9gKv+yR2kN u8Lv5tQXPY1GfJp8eKlxsjcEgrUDIMIm5pmcVpTzWDyMrVeMkbFa+xk+5hR1dwJvLLID V4tyeK54hztq0ucfHQwkTuZ5wdZwxRXb9R5x67svOwd7Nn71/wy+Lj6oKtwT1QVBwvPt rzfC9RSkqndrrFkC355q9+jFe9EJ2JAn+FMwH+aYvNS3hjad/iHLKmo7DYCYDoBZPX5I HE9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si2619403plf.146.2021.04.15.01.50.15; Thu, 15 Apr 2021 01:50:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbhDOIuC (ORCPT + 99 others); Thu, 15 Apr 2021 04:50:02 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:53137 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231512AbhDOIuB (ORCPT ); Thu, 15 Apr 2021 04:50:01 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R441e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UVdfbcR_1618476570; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UVdfbcR_1618476570) by smtp.aliyun-inc.com(127.0.0.1); Thu, 15 Apr 2021 16:49:37 +0800 From: Jiapeng Chong To: marcel@holtmann.org Cc: johan.hedberg@gmail.com, luiz.dentz@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] Bluetooth: 6lowpan: remove unused function Date: Thu, 15 Apr 2021 16:49:28 +0800 Message-Id: <1618476568-117243-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- net/bluetooth/6lowpan.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index cff4944..49c2612 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -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) { @@ -910,14 +882,6 @@ static long chan_get_sndtimeo_cb(struct l2cap_chan *chan) .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; -- 1.8.3.1