SELinux: inline selinux_is_enabled in !CONFIG_SECURITY_SELINUX
authorEric Paris <eparis@redhat.com>
Tue, 15 Sep 2009 00:59:48 +0000 (20:59 -0400)
committerJames Morris <jmorris@namei.org>
Tue, 15 Sep 2009 01:37:33 +0000 (11:37 +1000)
Without this patch building a kernel emits millions of warning like:

include/linux/selinux.h:92: warning: ?selinux_is_enabled? defined but not used

When it is build without CONFIG_SECURITY_SELINUX.  This is harmless, but
the function should be inlined, so it gets compiled out.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
include/linux/selinux.h

index 223d06a6feb116c968b84b40908bada3aa0af4e4..82e0f26a12996a1bcce6efddd07e734313162c19 100644 (file)
@@ -89,7 +89,7 @@ static inline void selinux_secmark_refcount_dec(void)
        return;
 }
 
-static bool selinux_is_enabled(void)
+static inline bool selinux_is_enabled(void)
 {
        return false;
 }