Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4466518ybi; Tue, 11 Jun 2019 07:08:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuSK6S99AVlhQkO6fV/9dvyS2Ifqhv3ZDPN8hQ5RlVQGgem8gtivmvj7oGayuX/F+XqUqz X-Received: by 2002:a17:902:bc47:: with SMTP id t7mr63457554plz.336.1560262132957; Tue, 11 Jun 2019 07:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560262132; cv=none; d=google.com; s=arc-20160816; b=bEfdWYnk0+Of50ZWMt17caCguLq6BEHjnCgSuHaYdorrzPnlvF8bJmttBwdsQrU1fq ZeCzasfq2S5QvTYSDiV9Tp3BWD3tYrle4qiVaboFEhaQ4/ayc7NvjE/1p96cETttYX5H R76bZAe6TRbARt2NJfjLWYXSluWnFDGMFshjfzXeblWvf5+Dj0tO6F/B/7A1clG3sQhf NXr/pzDAmEGFwsAp9mq/5FCervPAv2CgccUtLiRalAWxfpX8jHyncsqzt6CiNVZUG95W a6p0ZNOL1nATQssd4W6LnT5+zHt1Z5UkS2PfvbFrJXNChDM3kJtompoieJ/PA7Y8+V24 t7BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=V8Zdz+G7I+JFy8xL/n6cVL3ilzmxgWONH22SUN4nZ8U=; b=aDvzvcSK7JKRnxObPkxiDhVIjGApO6vgC649qeSBZ5YT0lBEXrT5LBiEPFkfF6VRBx JWRAZL24fY467nDX/skatC3yrhkz2B1jGAOgyot0pzCsw48kz7JiR/1WtG8wMhyBz319 aVDoLSy0F0Pv8uZBR+0m5G4tWVZeDNYanmO3AzMDHKvG7ZiZasPQpjz7Myy550JuijRB RoxbEQUHS/MsJEaA95uBz/G1h/OJ2GYAxgu/doqevoebXKKsSSpht5PYkxalsqsMMzpg k/0obheUWll2ts7ZQBr1Bk2dWRdTXhFSzAVKM7O0ICBgT754S2yYS41Nz0C+pckgQms/ lPIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v74si5289696pgb.411.2019.06.11.07.08.36; Tue, 11 Jun 2019 07:08:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391259AbfFKNsj (ORCPT + 99 others); Tue, 11 Jun 2019 09:48:39 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:18549 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387866AbfFKNsi (ORCPT ); Tue, 11 Jun 2019 09:48:38 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id AF7B39DEFC9E36BF9118; Tue, 11 Jun 2019 21:48:36 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Tue, 11 Jun 2019 21:48:29 +0800 From: YueHaibing To: , CC: , , YueHaibing Subject: [PATCH -next] security: Make capability_hooks static Date: Tue, 11 Jun 2019 21:48:15 +0800 Message-ID: <20190611134815.16612-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix sparse warning: security/commoncap.c:1347:27: warning: symbol 'capability_hooks' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing --- security/commoncap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/commoncap.c b/security/commoncap.c index c0b9664..3150bed 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -1339,7 +1339,7 @@ int cap_mmap_file(struct file *file, unsigned long reqprot, #ifdef CONFIG_SECURITY -struct security_hook_list capability_hooks[] __lsm_ro_after_init = { +static struct security_hook_list capability_hooks[] __lsm_ro_after_init = { LSM_HOOK_INIT(capable, cap_capable), LSM_HOOK_INIT(settime, cap_settime), LSM_HOOK_INIT(ptrace_access_check, cap_ptrace_access_check), -- 2.7.4