diff mbox series

[-next] lockdown: Make lockdown_lsmid static

Message ID 20240814033004.2216000-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Delegated to: Paul Moore
Headers show
Series [-next] lockdown: Make lockdown_lsmid static | expand

Commit Message

Yue Haibing Aug. 14, 2024, 3:30 a.m. UTC
Fix sparse warning:

security/lockdown/lockdown.c:79:21: warning:
 symbol 'lockdown_lsmid' was not declared. Should it be static?

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 security/lockdown/lockdown.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kees Cook Aug. 15, 2024, 4:01 p.m. UTC | #1
On Wed, Aug 14, 2024 at 11:30:04AM +0800, Yue Haibing wrote:
> Fix sparse warning:
> 
> security/lockdown/lockdown.c:79:21: warning:
>  symbol 'lockdown_lsmid' was not declared. Should it be static?
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>

Reviewed-by: Kees Cook <kees@kernel.org>
Paul Moore Aug. 15, 2024, 4:11 p.m. UTC | #2
On Aug 13, 2024 Yue Haibing <yuehaibing@huawei.com> wrote:
> 
> Fix sparse warning:
> 
> security/lockdown/lockdown.c:79:21: warning:
>  symbol 'lockdown_lsmid' was not declared. Should it be static?
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> Reviewed-by: Kees Cook <kees@kernel.org>
> ---
>  security/lockdown/lockdown.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Merged into lsm/dev, thanks!

--
paul-moore.com
diff mbox series

Patch

diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c
index cd84d8ea1dfb..f2bdbd55aa2b 100644
--- a/security/lockdown/lockdown.c
+++ b/security/lockdown/lockdown.c
@@ -76,7 +76,7 @@  static struct security_hook_list lockdown_hooks[] __ro_after_init = {
 	LSM_HOOK_INIT(locked_down, lockdown_is_locked_down),
 };
 
-const struct lsm_id lockdown_lsmid = {
+static const struct lsm_id lockdown_lsmid = {
 	.name = "lockdown",
 	.id = LSM_ID_LOCKDOWN,
 };