lkml.org 
[lkml]   [2004]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [SELINUX] mark avc_init with __init
James Morris <jmorris@redhat.com> wrote:
>
> The avc_init function is only called during kernel init, so it can be
> marked with __init.
>
> ...
> --- linux-2.6.3-rc2-mm1.o/security/selinux/include/avc.h 2004-02-04 08:39:07.000000000 -0500
> +++ linux-2.6.3-rc2-mm1.w2/security/selinux/include/avc.h 2004-02-13 09:21:38.704303416 -0500
> @@ -11,6 +11,7 @@
> #include <linux/kernel.h>
> #include <linux/kdev_t.h>
> #include <linux/spinlock.h>
> +#include <linux/init.h>
> #include <asm/system.h>
> #include "flask.h"
> #include "av_permissions.h"
> @@ -121,7 +122,7 @@
> * AVC operations
> */
>
> -void avc_init(void);
> +void __init avc_init(void);
>

The section specifier only needs to be at the definition site, not at the
declaration site. I guess it adds a little value for the header fle to say
"hey, this is __init", but as nothing checks that at runtime or compile
time it can easily become stale.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.211 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site