From: YueHaibing Date: Tue, 11 Jun 2019 13:48:15 +0000 (+0800) Subject: security: Make capability_hooks static X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d1c5947ec6789b7d72cd7365f4e37ec326dbd9b6;p=linux.git security: Make capability_hooks static 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 Signed-off-by: James Morris --- diff --git a/security/commoncap.c b/security/commoncap.c index c477fb673701a..afd9679ca8669 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -1344,7 +1344,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),