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: 176999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7434346vqy; Mon, 11 Dec 2023 16:54:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZNsaPT6FInysdINcZhQV8eJWY04SEk6p0AOBKP/4FLv4tB4E/jU1ffO9MdbgN+9l5K1VY X-Received: by 2002:a17:903:60d:b0:1d0:6ffd:cea3 with SMTP id kg13-20020a170903060d00b001d06ffdcea3mr2311257plb.92.1702342497630; Mon, 11 Dec 2023 16:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702342497; cv=none; d=google.com; s=arc-20160816; b=P7TBmKH++DfDNoH01cV2GolzCiyXhDiKISP1dlif9zgYffMFez4YgAMZLl+bIXXpKM jKENx4LHlWLHLC6OvCEwJLZd0481jNeCzkvVn09GFnIz/gF2IwcgOsfMpzMZaUqFd5gt +TwvTsjWx4dvbJul+BRo/0SzSojojiOuYVa7K9DA28avRD/6oqM3iR2ch66K6L3s+Lw5 bwcNicsKTRDWWdVuT3X9IPzJYhJudzTCxwFUkBfN+Mt4O3Fa85X+tbDJFGuH9XZzDfRp 2uNUAELa+iSaho94Yyg2ye9xN6xnK9Rb9GAyZPrUoyGhGCZIWpGqV6dN1rC8cjhq2s1F oPDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ZiOodKqp19q3hYXPADiWah89oHTcjPNxwX28RAAHiuI=; fh=0FzJPaO83FS0lGAm4ZaLxd0E7PsXrhFzcqwaPNIM50M=; b=FUtt1tlwEfqNRrcexXEQf20r/JOoilAIq1p29ULu5/BQgR9Ej8Z04lTRKbCrvjYSIy e1WoTry/B/zTfew51rMAObsWFRMACj9MzOlq10aF+9UisWGnob8a11OhuR9K7ivmo42S w9FuhNKfCTd+RfB+DHSJewjk5wWDKF0ecaJcbgZGUcwAQXWrlDPINfAA9Z48Q22EBC/p aMokAIXbzS370hbgCAGYraQYPtGLv1hi+wSDjgnj6DUQv6NflbV68D21KIXWAhjRnJHe 2sB0K6JtxoFR7YIOWwAk4VzH3a+6B8nZsItyU+5LpxUrHQ0OCh7e9fmSj6+omj+PwVe6 PKHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k10-20020a170902694a00b001cc221d40e1si6711720plt.635.2023.12.11.16.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 16:54:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C9878809B9DE; Mon, 11 Dec 2023 16:54:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345586AbjLLAyg (ORCPT + 99 others); Mon, 11 Dec 2023 19:54:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345477AbjLLAyf (ORCPT ); Mon, 11 Dec 2023 19:54:35 -0500 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 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 11 Dec 2023 16:54:55 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785035486720699458 X-GMAIL-MSGID: 1785035486720699458 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) {