From patchwork Sat Jul 29 02:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 127978 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp814536vqg; Fri, 28 Jul 2023 19:56:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMvXPwWh18RBD5ZWuqjJEM28VfVsFSWIL5KAT2hiS/8rHCstGBq51WT+tZTwSURAJjLsGL X-Received: by 2002:a05:6a20:3d8e:b0:133:1d62:dcbd with SMTP id s14-20020a056a203d8e00b001331d62dcbdmr4165013pzi.28.1690599386576; Fri, 28 Jul 2023 19:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690599386; cv=none; d=google.com; s=arc-20160816; b=nfeWdq/qudYYhuC9IMDGmA5JNffY/9gswKvRkshUQYVP3KPrgxIdFXAoDGHQvDjmS1 b9n695yVWCgNo0Hnz+9KgeT/d9gwC0BaTWhrodEOurGP8MA90fvl7dcV8pziSVKmMflW Zp8y3dUIRbaHqMdP0+GePTmVjMDoLKr1dHzqF4hjRYemULG/NAdVtGzHtutobRjgoAUi D1cJu1j1pAhGvEWYEx54JEUWXynCeI2q9Ii0fnupC8d54VOp1gr+fE3zdDCdgXH3jAep PodXyFoRM5gJ8lUH7gra+tKcidtTGakQ7+t7iKY370Hd7yg9jzg2hBZ0N0ziRZjcPOoM Pt3A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a63da4c000000b005633bda299csi3919993pgj.565.2023.07.28.19.56.13; Fri, 28 Jul 2023 19:56:26 -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 S232829AbjG2Ck4 (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772721942116930407 X-GMAIL-MSGID: 1772721942116930407 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 Reviewed-by: Paul Moore --- 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;