From patchwork Tue Dec 12 00:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13488267 X-Patchwork-Delegate: bpf@iogearbox.net Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 871ED99; Mon, 11 Dec 2023 16:54:41 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VyKKfOP_1702342477; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VyKKfOP_1702342477) by smtp.aliyun-inc.com; Tue, 12 Dec 2023 08:54:38 +0800 From: Yang Li To: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, andrii@kernel.org, martin.lau@linux.dev Cc: kpsingh@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] bpf: remove unused function Date: Tue, 12 Dec 2023 08:54:36 +0800 Message-Id: <20231212005436.103829-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net The function are defined in the verifier.c file, but not called elsewhere, so delete the unused function. kernel/bpf/verifier.c:3448:20: warning: unused function 'bt_set_slot' kernel/bpf/verifier.c:3453:20: warning: unused function 'bt_clear_slot' kernel/bpf/verifier.c:3488:20: warning: unused function 'bt_is_slot_set' Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7714 Signed-off-by: Yang Li Acked-by: Eduard Zingerman --- kernel/bpf/verifier.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 727a59e4a647..49292f37c0de 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -3445,16 +3445,6 @@ static inline void bt_clear_frame_slot(struct backtrack_state *bt, u32 frame, u3 bt->stack_masks[frame] &= ~(1ull << slot); } -static inline void bt_set_slot(struct backtrack_state *bt, u32 slot) -{ - bt_set_frame_slot(bt, bt->frame, slot); -} - -static inline void bt_clear_slot(struct backtrack_state *bt, u32 slot) -{ - bt_clear_frame_slot(bt, bt->frame, slot); -} - static inline u32 bt_frame_reg_mask(struct backtrack_state *bt, u32 frame) { return bt->reg_masks[frame]; @@ -3485,11 +3475,6 @@ static inline bool bt_is_frame_slot_set(struct backtrack_state *bt, u32 frame, u return bt->stack_masks[frame] & (1ull << slot); } -static inline bool bt_is_slot_set(struct backtrack_state *bt, u32 slot) -{ - return bt_is_frame_slot_set(bt, bt->frame, slot); -} - /* format registers bitmask, e.g., "r0,r2,r4" for 0x15 mask */ static void fmt_reg_mask(char *buf, ssize_t buf_sz, u32 reg_mask) {