From patchwork Wed Jan 16 05:33:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10765433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3899613BF for ; Wed, 16 Jan 2019 05:40:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2427B2D1FE for ; Wed, 16 Jan 2019 05:40:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 154222D204; Wed, 16 Jan 2019 05:40:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CF452D1FE for ; Wed, 16 Jan 2019 05:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732612AbfAPFk5 (ORCPT ); Wed, 16 Jan 2019 00:40:57 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2236 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730832AbfAPFk4 (ORCPT ); Wed, 16 Jan 2019 00:40:56 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B81A4DAA9291EE2DB4D1; Wed, 16 Jan 2019 13:40:49 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.408.0; Wed, 16 Jan 2019 13:40:43 +0800 From: YueHaibing To: , CC: , , YueHaibing Subject: [PATCH -next] LSM: Make some functions static Date: Wed, 16 Jan 2019 13:33:53 +0800 Message-ID: <20190116053353.29320-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Fix the follow sparse warning: security/security.c:533:5: warning: symbol 'lsm_task_alloc' was not declared. Should it be static? security/security.c:554:5: warning: symbol 'lsm_ipc_alloc' was not declared. Should it be static? security/security.c:575:5: warning: symbol 'lsm_msg_msg_alloc' was not declared. Should it be static? Signed-off-by: YueHaibing --- security/security.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security/security.c b/security/security.c index 9a98c52..750d3f3 100644 --- a/security/security.c +++ b/security/security.c @@ -530,7 +530,7 @@ int lsm_inode_alloc(struct inode *inode) * * Returns 0, or -ENOMEM if memory can't be allocated. */ -int lsm_task_alloc(struct task_struct *task) +static int lsm_task_alloc(struct task_struct *task) { if (blob_sizes.lbs_task == 0) { task->security = NULL; @@ -551,7 +551,7 @@ int lsm_task_alloc(struct task_struct *task) * * Returns 0, or -ENOMEM if memory can't be allocated. */ -int lsm_ipc_alloc(struct kern_ipc_perm *kip) +static int lsm_ipc_alloc(struct kern_ipc_perm *kip) { if (blob_sizes.lbs_ipc == 0) { kip->security = NULL; @@ -572,7 +572,7 @@ int lsm_ipc_alloc(struct kern_ipc_perm *kip) * * Returns 0, or -ENOMEM if memory can't be allocated. */ -int lsm_msg_msg_alloc(struct msg_msg *mp) +static int lsm_msg_msg_alloc(struct msg_msg *mp) { if (blob_sizes.lbs_msg_msg == 0) { mp->security = NULL;