Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1984325rwb; Fri, 28 Jul 2023 19:57:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlHtHr3Ip0eIN0D+ABsad1bGe1U2IOYw/B1RjiWs7ZS3xIwuC/XYv7396qwRZqYgnDeFWlJI X-Received: by 2002:a05:6a20:3d05:b0:125:dd60:957a with SMTP id y5-20020a056a203d0500b00125dd60957amr4451876pzi.26.1690599479229; Fri, 28 Jul 2023 19:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690599479; cv=none; d=google.com; s=arc-20160816; b=oz3sNZY5qiYUh4kUXor7uNFAHL47nApWufvstGO6tG8COl9iY2ZoWhdruM0e7A1nRA 34qpERm/UswKUjwV4/rIyn/H27GcgkHS/+viV3A0rfBJLzqQbcN+SX2cGFPYwIBgOCht xiLGT4dc3tDNQUKZofoHeJ45+hBjqiaUZEVC0vLkXcqA/di1w0ahnBq+HD3Dpvtr2uJA sxkhc0uL13dgXoTFubLzU2ErkJO2JDNhjHTj/N1SSZ2yOYEvBIw6uOHVKfhldLiScM0U wMK1Q6iOOQpeycp5qjEo6lCEs2gBmh6u1WiJba4tSB+/wU7kiV41OVhNOt7MhhshI1Yo kWHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=SK8fXd5aDnYz4RgAbPQ+A+ZQvocRu0cJLK1MC7X9Zlo=; fh=Mvz9d+dUVWtI/qohBLBlgDBNZkcW4oUA7Sb6r3gd/+4=; b=1EdJHWZGkMZdjeOOc93VQhZT0Q6he9NZof9GaJDhu29C/COCoWZvSTraQ7QSFTrvTb PIDTjRwdRWBaxZKiRu6GeJu7THK82oOudy9RSK/6HpDs/xYolU945CUrffSlUHzsjo/Q wvrIdeAj4wtDJGjNPx6JSC8AZ58uNQJLtihJiFIpZ1RCwygHX8UWOM2+RyPRT3RZ0rSZ GXAEt0mz52VBzHIi/Mjl/V0r4LFnZfSxaK9+zD7DpvaL+szavPUuR6lKwqLQokIxiFx4 8DcCx/HP8G7QwQ99zW4srcqojJSr/iycUw0q9gXlT8q2bBBXPXJFqtSUf/Bg4oNNsRpx /Omw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a63d809000000b0055b640a6b3csi3802634pgh.884.2023.07.28.19.57.47; Fri, 28 Jul 2023 19:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233648AbjG2Ck4 (ORCPT + 99 others); Fri, 28 Jul 2023 22:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231783AbjG2Ckt (ORCPT ); Fri, 28 Jul 2023 22:40:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EFCF1711; Fri, 28 Jul 2023 19:40:47 -0700 (PDT) Received: from canpemm500007.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RCTHS3N5wzrRh6; Sat, 29 Jul 2023 10:39:48 +0800 (CST) Received: from localhost (10.174.179.215) by canpemm500007.china.huawei.com (7.192.104.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sat, 29 Jul 2023 10:40:45 +0800 From: Yue Haibing To: , , , , , CC: , , Subject: [PATCH v3 -next] keys: Remove unused extern declarations Date: Sat, 29 Jul 2023 10:40:26 +0800 Message-ID: <20230729024026.32228-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500007.china.huawei.com (7.192.104.62) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing Since commit b2a4df200d57 ("KEYS: Expand the capacity of a keyring") iterate_over_keyring() is never used, so can be removed. And commit b5f545c880a2 ("[PATCH] keys: Permit running process to instantiate keys") left behind keyring_search_instkey(). Fixes: b2a4df200d57 ("KEYS: Expand the capacity of a keyring") Fixes: b5f545c880a2 ("[PATCH] keys: Permit running process to instantiate keys") Signed-off-by: YueHaibing --- v3: Add Fixes tag v2: Also remove keyring_search_instkey() --- security/keys/internal.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/security/keys/internal.h b/security/keys/internal.h index 3c1e7122076b..471cf36dedc0 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h @@ -109,13 +109,6 @@ extern void __key_link_end(struct key *keyring, extern key_ref_t find_key_to_update(key_ref_t keyring_ref, const struct keyring_index_key *index_key); -extern struct key *keyring_search_instkey(struct key *keyring, - key_serial_t target_id); - -extern int iterate_over_keyring(const struct key *keyring, - int (*func)(const struct key *key, void *data), - void *data); - struct keyring_search_context { struct keyring_index_key index_key; const struct cred *cred; -- 2.34.1