From patchwork Wed Feb 10 08:01:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 12080051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13472C433E6 for ; Wed, 10 Feb 2021 07:53:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD02A64DF2 for ; Wed, 10 Feb 2021 07:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233131AbhBJHxh (ORCPT ); Wed, 10 Feb 2021 02:53:37 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12165 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233213AbhBJHxe (ORCPT ); Wed, 10 Feb 2021 02:53:34 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DbBlZ3D5szlGxD; Wed, 10 Feb 2021 15:51:06 +0800 (CST) Received: from localhost.localdomain (10.175.102.38) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Wed, 10 Feb 2021 15:52:43 +0800 From: Wei Yongjun To: Hulk Robot , Mimi Zohar , "Dmitry Kasatkin" , James Morris , "Serge E. Hallyn" CC: Wei Yongjun , , Subject: [PATCH -next] IMA: Make function ima_mok_init() static Date: Wed, 10 Feb 2021 08:01:16 +0000 Message-ID: <20210210080116.1209789-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.102.38] X-CFilter-Loop: Reflected Precedence: bulk List-ID: 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? This function is not used outside of ima_mok.c, so this commit 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 1e5c01916173..95cc31525c57 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;