futex_cleanup_end(tsk, FUTEX_STATE_DEAD);
 }
 
+static void futex_hash_bucket_init(struct futex_hash_bucket *fhb)
+{
+       atomic_set(&fhb->waiters, 0);
+       plist_head_init(&fhb->chain);
+       spin_lock_init(&fhb->lock);
+}
+
 static int __init futex_init(void)
 {
        unsigned long hashsize, i;
                                               hashsize, hashsize);
        hashsize = 1UL << futex_shift;
 
-       for (i = 0; i < hashsize; i++) {
-               atomic_set(&futex_queues[i].waiters, 0);
-               plist_head_init(&futex_queues[i].chain);
-               spin_lock_init(&futex_queues[i].lock);
-       }
+       for (i = 0; i < hashsize; i++)
+               futex_hash_bucket_init(&futex_queues[i]);
 
        futex_hashmask = hashsize - 1;
        return 0;