From patchwork Mon Jul 13 14:26:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 11659861 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2792F1510 for ; Mon, 13 Jul 2020 14:16:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 182862075B for ; Mon, 13 Jul 2020 14:16:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729649AbgGMOQN (ORCPT ); Mon, 13 Jul 2020 10:16:13 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56024 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729823AbgGMOQN (ORCPT ); Mon, 13 Jul 2020 10:16:13 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C748F25F2900C3B7BF4E; Mon, 13 Jul 2020 22:16:07 +0800 (CST) Received: from kernelci-master.huawei.com (10.175.101.6) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 13 Jul 2020 22:16:01 +0800 From: Wei Yongjun To: Hulk Robot , Mimi Zohar , "Dmitry Kasatkin" , James Morris , "Serge E. Hallyn" CC: Wei Yongjun , , Subject: [PATCH -next] IMA: Make ima_mok_init() static Date: Mon, 13 Jul 2020 22:26:05 +0800 Message-ID: <20200713142605.50373-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org The sparse tool complains as follows: security/integrity/ima/ima_mok.c:24:12: warning: symbol 'ima_mok_init' was not declared. Should it be static? ima_mok_init() is not used outside of ima_mok.c, so marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- security/integrity/ima/ima_mok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/ima/ima_mok.c b/security/integrity/ima/ima_mok.c index 36cadadbfba4..a93a2ca257d9 100644 --- a/security/integrity/ima/ima_mok.c +++ b/security/integrity/ima/ima_mok.c @@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring; /* * Allocate the IMA blacklist keyring */ -__init int ima_mok_init(void) +static __init int ima_mok_init(void) { struct key_restriction *restriction;