From patchwork Wed Jan 16 05:44:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10765425 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 2992E1390 for ; Wed, 16 Jan 2019 05:38:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 138AC2B0B8 for ; Wed, 16 Jan 2019 05:38:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 027BD2B132; Wed, 16 Jan 2019 05:38:35 +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 7068B2B0B8 for ; Wed, 16 Jan 2019 05:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732579AbfAPFie (ORCPT ); Wed, 16 Jan 2019 00:38:34 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2234 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726225AbfAPFie (ORCPT ); Wed, 16 Jan 2019 00:38:34 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 26DEABC0A3F21A2AF186; Wed, 16 Jan 2019 13:38:32 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Wed, 16 Jan 2019 13:38:25 +0800 From: Wei Yongjun To: James Morris , "Serge E. Hallyn" , Casey Schaufler CC: Wei Yongjun , , Subject: [PATCH -next] LSM: Make some functions static Date: Wed, 16 Jan 2019 05:44:32 +0000 Message-ID: <1547617472-60140-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Fixes the following sparse warnings: 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? Fixes: f4ad8f2c4076 ("LSM: Infrastructure management of the task security") Signed-off-by: Wei Yongjun Acked-by: Casey Schaufler --- 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;