From: Chris Wright Move inline avc_cache_stats helper functions alongside the statically declared avc_cache_stats array. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton --- 25-akpm/security/selinux/avc.c | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff -puN security/selinux/avc.c~selinux-space-saving security/selinux/avc.c --- 25/security/selinux/avc.c~selinux-space-saving 2004-07-03 13:27:48.075876912 -0700 +++ 25-akpm/security/selinux/avc.c 2004-07-03 13:27:48.080876152 -0700 @@ -71,10 +71,10 @@ struct avc_callback_node { }; static spinlock_t avc_lock = SPIN_LOCK_UNLOCKED; -static struct avc_node *avc_node_freelist = NULL; +static struct avc_node *avc_node_freelist; static struct avc_cache avc_cache; static unsigned avc_cache_stats[AVC_NSTATS]; -static struct avc_callback_node *avc_callbacks = NULL; +static struct avc_callback_node *avc_callbacks; static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass) { @@ -191,15 +191,6 @@ void __init avc_init(void) struct avc_node *new; int i; - for (i = 0; i < AVC_NSTATS; i++) - avc_cache_stats[i] = 0; - - for (i = 0; i < AVC_CACHE_SLOTS; i++) - avc_cache.slots[i] = 0; - avc_cache.lru_hint = 0; - avc_cache.active_nodes = 0; - avc_cache.latest_notif = 0; - for (i = 0; i < AVC_CACHE_MAXNODES; i++) { new = kmalloc(sizeof(*new), GFP_ATOMIC); if (!new) { _