Index: kernel/generic/src/adt/avl.c
===================================================================
--- kernel/generic/src/adt/avl.c	(revision f303afc69bfdfc798071487501f775a7c4d8c475)
+++ kernel/generic/src/adt/avl.c	(revision f712a858b9463dae30e9eee5ef1ccc54ae618f02)
@@ -186,5 +186,5 @@
 		}
 		gpa = par;
-		dpc = par->key > key ? &par->lft: &par->rgt;
+		dpc = par->key > key ? &par->lft : &par->rgt;
 	}
 
@@ -308,5 +308,5 @@
  */
 static int
-repair(avltree_t *t, avltree_node_t *u, avltree_node_t *v, avltree_node_t *w,
+    repair(avltree_t *t, avltree_node_t *u, avltree_node_t *v, avltree_node_t *w,
     int *dir, int ro)
 {
@@ -404,5 +404,5 @@
 			gpa = node->par;
 			cur = NULL;
-			dir = (gpa->lft == node) ? LEFT: RIGHT;
+			dir = (gpa->lft == node) ? LEFT : RIGHT;
 		}
 	} else {
Index: kernel/generic/src/adt/cht.c
===================================================================
--- kernel/generic/src/adt/cht.c	(revision f303afc69bfdfc798071487501f775a7c4d8c475)
+++ kernel/generic/src/adt/cht.c	(revision f712a858b9463dae30e9eee5ef1ccc54ae618f02)
@@ -407,31 +407,31 @@
 static size_t size_to_order(size_t bucket_cnt, size_t min_order);
 static cht_buckets_t *alloc_buckets(size_t order, bool set_invalid,
-	bool can_block);
+    bool can_block);
 static inline cht_link_t *find_lazy(cht_t *h, void *key);
 static cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key,
-	size_t search_hash);
+    size_t search_hash);
 static cht_link_t *find_resizing(cht_t *h, void *key, size_t hash,
-	marked_ptr_t old_head, size_t old_idx);
+    marked_ptr_t old_head, size_t old_idx);
 static bool insert_impl(cht_t *h, cht_link_t *item, cht_link_t **dup_item);
 static bool insert_at(cht_link_t *item, const wnd_t *wnd, walk_mode_t walk_mode,
-	bool *resizing);
+    bool *resizing);
 static bool has_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
-	cht_link_t *cur, cht_link_t **dup_item);
+    cht_link_t *cur, cht_link_t **dup_item);
 static cht_link_t *find_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
-	cht_link_t *start);
+    cht_link_t *start);
 static bool remove_pred(cht_t *h, size_t hash, equal_pred_t pred, void *pred_arg);
 static bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode,
-	bool *deleted_but_gc, bool *resizing);
+    bool *deleted_but_gc, bool *resizing);
 static bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode, bool *resizing);
 static bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode, bool *resizing);
 static bool find_wnd_and_gc_pred(cht_t *h, size_t hash, walk_mode_t walk_mode,
-	equal_pred_t pred, void *pred_arg, wnd_t *wnd, bool *resizing);
+    equal_pred_t pred, void *pred_arg, wnd_t *wnd, bool *resizing);
 static bool find_wnd_and_gc(cht_t *h, size_t hash, walk_mode_t walk_mode,
-	wnd_t *wnd, bool *resizing);
+    wnd_t *wnd, bool *resizing);
 static bool gc_deleted_node(cht_t *h, walk_mode_t walk_mode, wnd_t *wnd,
-	bool *resizing);
+    bool *resizing);
 static bool join_completed(cht_t *h, const wnd_t *wnd);
 static void upd_resizing_head(cht_t *h, size_t hash, marked_ptr_t **phead,
-	bool *join_finishing,  walk_mode_t *walk_mode);
+    bool *join_finishing,  walk_mode_t *walk_mode);
 static void item_removed(cht_t *h);
 static void item_inserted(cht_t *h);
@@ -442,12 +442,12 @@
 static void complete_head_move(marked_ptr_t *psrc_head, marked_ptr_t *pdest_head);
 static void split_bucket(cht_t *h, marked_ptr_t *psrc_head,
-	marked_ptr_t *pdest_head, size_t split_hash);
+    marked_ptr_t *pdest_head, size_t split_hash);
 static void mark_join_follows(cht_t *h, marked_ptr_t *psrc_head,
-	size_t split_hash, wnd_t *wnd);
+    size_t split_hash, wnd_t *wnd);
 static void mark_join_node(cht_link_t *join_node);
 static void join_buckets(cht_t *h, marked_ptr_t *psrc_head,
-	marked_ptr_t *pdest_head, size_t split_hash);
+    marked_ptr_t *pdest_head, size_t split_hash);
 static void link_to_join_node(cht_t *h, marked_ptr_t *pdest_head,
-	cht_link_t *join_node, size_t split_hash);
+    cht_link_t *join_node, size_t split_hash);
 static void resize_table(work_t *arg);
 static void grow_table(cht_t *h);
@@ -455,8 +455,8 @@
 static void cleanup_join_node(cht_t *h, marked_ptr_t *new_head);
 static void clear_join_and_gc(cht_t *h, cht_link_t *join_node,
-	marked_ptr_t *new_head);
+    marked_ptr_t *new_head);
 static void cleanup_join_follows(cht_t *h, marked_ptr_t *new_head);
 static marked_ptr_t make_link(const cht_link_t *next, mark_t mark);
-static cht_link_t * get_next(marked_ptr_t link);
+static cht_link_t *get_next(marked_ptr_t link);
 static mark_t get_mark(marked_ptr_t link);
 static void next_wnd(wnd_t *wnd);
@@ -472,7 +472,7 @@
 static size_t shrink_idx(size_t idx);
 static marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next,
-	mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark);
+    mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark);
 static marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur,
-	marked_ptr_t new);
+    marked_ptr_t new);
 static void cas_order_barrier(void);
 
@@ -513,5 +513,5 @@
  */
 bool cht_create(cht_t *h, size_t init_size, size_t min_size, size_t max_load,
-	bool can_block, cht_ops_t *op)
+    bool can_block, cht_ops_t *op)
 {
 	assert(h);
@@ -572,5 +572,5 @@
 	size_t bucket_cnt = (1 << order);
 	size_t bytes =
-		sizeof(cht_buckets_t) + (bucket_cnt - 1) * sizeof(marked_ptr_t);
+	    sizeof(cht_buckets_t) + (bucket_cnt - 1) * sizeof(marked_ptr_t);
 	cht_buckets_t *b = malloc(bytes, can_block ? 0 : FRAME_ATOMIC);
 
@@ -580,7 +580,7 @@
 	b->order = order;
 
-	marked_ptr_t head_link = set_invalid
-		? make_link(&sentinel, N_INVALID)
-		: make_link(&sentinel, N_NORMAL);
+	marked_ptr_t head_link = set_invalid ?
+	    make_link(&sentinel, N_INVALID) :
+	    make_link(&sentinel, N_NORMAL);
 
 	for (size_t i = 0; i < bucket_cnt; ++i) {
@@ -733,5 +733,5 @@
 /** Searches the bucket at head for key using search_hash. */
 static inline cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key,
-	size_t search_hash)
+    size_t search_hash)
 {
 	/*
@@ -781,5 +781,5 @@
 /** Searches for the key while the table is undergoing a resize. */
 static cht_link_t *find_resizing(cht_t *h, void *key, size_t hash,
-	marked_ptr_t old_head, size_t old_idx)
+    marked_ptr_t old_head, size_t old_idx)
 {
 	assert(N_INVALID == get_mark(old_head));
@@ -1022,5 +1022,5 @@
  */
 inline static bool insert_at(cht_link_t *item, const wnd_t *wnd,
-	walk_mode_t walk_mode, bool *resizing)
+    walk_mode_t walk_mode, bool *resizing)
 {
 	marked_ptr_t ret;
@@ -1078,9 +1078,9 @@
  */
 static inline bool has_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
-	cht_link_t *cur, cht_link_t **dup_item)
+    cht_link_t *cur, cht_link_t **dup_item)
 {
 	assert(cur);
-	assert(cur == &sentinel || hash <= node_hash(h, cur)
-		|| node_hash(h, cur) == h->invalid_hash);
+	assert(cur == &sentinel || hash <= node_hash(h, cur) ||
+	    node_hash(h, cur) == h->invalid_hash);
 
 	/* hash < node_hash(h, cur) */
@@ -1101,5 +1101,5 @@
 /** Returns an item that is equal to \a item starting in a chain at \a start. */
 static cht_link_t *find_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
-	cht_link_t *start)
+    cht_link_t *start)
 {
 	assert(hash <= node_hash(h, start) || h->invalid_hash == node_hash(h, start));
@@ -1201,5 +1201,5 @@
 
 		if (!find_wnd_and_gc_pred(
-			h, hash, walk_mode, pred, pred_arg, &wnd, &resizing)) {
+		    h, hash, walk_mode, pred, pred_arg, &wnd, &resizing)) {
 			/* Could not GC a node; or detected an unexpected resize. */
 			continue;
@@ -1253,5 +1253,5 @@
  */
 static inline bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode,
-	bool *deleted_but_gc, bool *resizing)
+    bool *deleted_but_gc, bool *resizing)
 {
 	assert(wnd->cur && wnd->cur != &sentinel);
@@ -1283,5 +1283,5 @@
 /** Marks cur logically deleted. Returns false to request a retry. */
 static inline bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode,
-	bool *resizing)
+    bool *resizing)
 {
 	assert(cur && cur != &sentinel);
@@ -1309,5 +1309,5 @@
 
 		marked_ptr_t ret =
-			cas_link(&cur->link, next, cur_mark, next, cur_mark | N_DELETED);
+		    cas_link(&cur->link, next, cur_mark, next, cur_mark | N_DELETED);
 
 		if (ret != make_link(next, cur_mark))
@@ -1320,5 +1320,5 @@
 /** Unlinks wnd.cur from wnd.ppred. Returns false if it should be retried. */
 static inline bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode,
-	bool *resizing)
+    bool *resizing)
 {
 	assert(wnd->cur != &sentinel);
@@ -1354,6 +1354,6 @@
 		if (pred_link != ret) {
 			/* If we're not resizing the table there are no JF/JN nodes. */
-			*resizing = (walk_mode == WM_NORMAL)
-				&& (N_JOIN_FOLLOWS & get_mark(ret));
+			*resizing = (walk_mode == WM_NORMAL) &&
+			    (N_JOIN_FOLLOWS & get_mark(ret));
 			return false;
 		}
@@ -1389,5 +1389,5 @@
  */
 static bool find_wnd_and_gc_pred(cht_t *h, size_t hash, walk_mode_t walk_mode,
-	equal_pred_t pred, void *pred_arg, wnd_t *wnd, bool *resizing)
+    equal_pred_t pred, void *pred_arg, wnd_t *wnd, bool *resizing)
 {
 	assert(wnd->cur);
@@ -1459,5 +1459,5 @@
  */
 static bool find_wnd_and_gc(cht_t *h, size_t hash, walk_mode_t walk_mode,
-	wnd_t *wnd, bool *resizing)
+    wnd_t *wnd, bool *resizing)
 {
 try_again:
@@ -1489,5 +1489,5 @@
 /** Garbage collects the N_DELETED node at \a wnd skipping join nodes. */
 static bool gc_deleted_node(cht_t *h, walk_mode_t walk_mode, wnd_t *wnd,
-	bool *resizing)
+    bool *resizing)
 {
 	assert(N_DELETED & get_mark(wnd->cur->link));
@@ -1498,6 +1498,6 @@
 	} else {
 		/* Ordinary deleted node or a deleted JOIN_FOLLOWS. */
-		assert(walk_mode != WM_LEAVE_JOIN
-			|| !((N_JOIN | N_JOIN_FOLLOWS) & get_mark(wnd->cur->link)));
+		assert(walk_mode != WM_LEAVE_JOIN ||
+		    !((N_JOIN | N_JOIN_FOLLOWS) & get_mark(wnd->cur->link)));
 
 		/* Unlink an ordinary deleted node, move JOIN_FOLLOWS mark. */
@@ -1591,5 +1591,5 @@
  */
 static void upd_resizing_head(cht_t *h, size_t hash, marked_ptr_t **phead,
-	bool *join_finishing,  walk_mode_t *walk_mode)
+    bool *join_finishing,  walk_mode_t *walk_mode)
 {
 	cht_buckets_t *b = rcu_access(h->b);
@@ -1641,5 +1641,5 @@
 			*walk_mode = WM_LEAVE_JOIN;
 		}
-	} else if (h->new_b->order < b->order ) {
+	} else if (h->new_b->order < b->order) {
 		/* Shrinking the table. */
 
@@ -1702,5 +1702,5 @@
  */
 static inline void help_head_move(marked_ptr_t *psrc_head,
-	marked_ptr_t *pdest_head)
+    marked_ptr_t *pdest_head)
 {
 	/* Head move has to in progress already when calling this func. */
@@ -1743,5 +1743,5 @@
 		/* Mark the normal/clean src link immutable/const. */
 		ret = cas_link(psrc_head, next, N_NORMAL, next, N_CONST);
-	} while(ret != src_link && !(N_CONST & get_mark(ret)));
+	} while (ret != src_link && !(N_CONST & get_mark(ret)));
 }
 
@@ -1783,5 +1783,5 @@
  */
 static void split_bucket(cht_t *h, marked_ptr_t *psrc_head,
-	marked_ptr_t *pdest_head, size_t split_hash)
+    marked_ptr_t *pdest_head, size_t split_hash)
 {
 	/* Already split. */
@@ -1884,5 +1884,5 @@
  */
 static void mark_join_follows(cht_t *h, marked_ptr_t *psrc_head,
-	size_t split_hash, wnd_t *wnd)
+    size_t split_hash, wnd_t *wnd)
 {
 	/* See comment in split_bucket(). */
@@ -1909,6 +1909,6 @@
 		 * that a join node follows. It must be clean/normal.
 		 */
-		marked_ptr_t ret
-			= cas_link(wnd->ppred, wnd->cur, N_NORMAL, wnd->cur, N_JOIN_FOLLOWS);
+		marked_ptr_t ret =
+		    cas_link(wnd->ppred, wnd->cur, N_NORMAL, wnd->cur, N_JOIN_FOLLOWS);
 
 		/*
@@ -1916,6 +1916,6 @@
 		 * if also marked deleted - unlinking the node will move the JF mark).
 		 */
-		done = (ret == make_link(wnd->cur, N_NORMAL))
-			|| (N_JOIN_FOLLOWS & get_mark(ret));
+		done = (ret == make_link(wnd->cur, N_NORMAL)) ||
+		    (N_JOIN_FOLLOWS & get_mark(ret));
 	} while (!done);
 }
@@ -1935,11 +1935,11 @@
 		 * because its predecessor is marked with JOIN_FOLLOWS or CONST.
 		 */
-		marked_ptr_t ret
-			= cas_link(&join_node->link, next, mark, next, mark | N_JOIN);
+		marked_ptr_t ret =
+		    cas_link(&join_node->link, next, mark, next, mark | N_JOIN);
 
 		/* Successfully marked or already marked as a join node. */
-		done = (ret == make_link(next, mark))
-			|| (N_JOIN & get_mark(ret));
-	} while(!done);
+		done = (ret == make_link(next, mark)) ||
+		    (N_JOIN & get_mark(ret));
+	} while (!done);
 }
 
@@ -1952,5 +1952,5 @@
  */
 static void join_buckets(cht_t *h, marked_ptr_t *psrc_head,
-	marked_ptr_t *pdest_head, size_t split_hash)
+    marked_ptr_t *pdest_head, size_t split_hash)
 {
 	/* Buckets already joined. */
@@ -2059,5 +2059,5 @@
  */
 static void link_to_join_node(cht_t *h, marked_ptr_t *pdest_head,
-	cht_link_t *join_node, size_t split_hash)
+    cht_link_t *join_node, size_t split_hash)
 {
 	bool done = false;
@@ -2078,6 +2078,6 @@
 		if (wnd.cur != &sentinel) {
 			/* Must be from the new appended bucket. */
-			assert(split_hash <= node_hash(h, wnd.cur)
-				|| h->invalid_hash == node_hash(h, wnd.cur));
+			assert(split_hash <= node_hash(h, wnd.cur) ||
+			    h->invalid_hash == node_hash(h, wnd.cur));
 			return;
 		}
@@ -2085,5 +2085,5 @@
 		/* Reached the tail of pdest_head - link it to the join node. */
 		marked_ptr_t ret =
-			cas_link(wnd.ppred, &sentinel, N_NORMAL, join_node, N_NORMAL);
+		    cas_link(wnd.ppred, &sentinel, N_NORMAL, join_node, N_NORMAL);
 
 		done = (ret == make_link(&sentinel, N_NORMAL));
@@ -2320,5 +2320,5 @@
 			size_t split_hash = calc_split_hash(old_idx, h->b->order);
 			join_buckets(h, &h->b->head[old_idx], &h->new_b->head[new_idx],
-				split_hash);
+			    split_hash);
 		}
 	}
@@ -2391,5 +2391,5 @@
 /** Clears the join_node's N_JOIN mark frees it if marked N_DELETED as well. */
 static void clear_join_and_gc(cht_t *h, cht_link_t *join_node,
-	marked_ptr_t *new_head)
+    marked_ptr_t *new_head)
 {
 	assert(join_node != &sentinel);
@@ -2406,5 +2406,5 @@
 
 		marked_ptr_t ret =
-			_cas_link(&join_node->link, jn_link, make_link(next, cleared_mark));
+		    _cas_link(&join_node->link, jn_link, make_link(next, cleared_mark));
 
 		/* Done if the mark was cleared. Retry if a new node was inserted. */
@@ -2431,5 +2431,5 @@
 
 		done = find_wnd_and_gc_pred(h, jn_hash, WM_NORMAL, same_node_pred,
-			join_node, &wnd, &resizing);
+		    join_node, &wnd, &resizing);
 
 		assert(!resizing);
@@ -2483,8 +2483,8 @@
 				cht_link_t *next = get_next(*cur_link);
 				marked_ptr_t ret =
-					cas_link(cur_link, next, N_JOIN_FOLLOWS, &sentinel, N_NORMAL);
-
-				assert(next == &sentinel
-					|| ((N_JOIN | N_JOIN_FOLLOWS) & get_mark(ret)));
+				    cas_link(cur_link, next, N_JOIN_FOLLOWS, &sentinel, N_NORMAL);
+
+				assert(next == &sentinel ||
+				    ((N_JOIN | N_JOIN_FOLLOWS) & get_mark(ret)));
 
 				/* Successfully cleared the JF mark of a non-deleted node. */
@@ -2559,7 +2559,7 @@
 static inline size_t node_hash(cht_t *h, const cht_link_t *item)
 {
-	assert(item->hash == h->invalid_hash
-		|| item->hash == sentinel.hash
-		|| item->hash == calc_node_hash(h, item));
+	assert(item->hash == h->invalid_hash ||
+	    item->hash == sentinel.hash ||
+	    item->hash == calc_node_hash(h, item));
 
 	return item->hash;
@@ -2595,7 +2595,7 @@
 
 /** Strips any marks from the next item link and returns the next item's address.*/
-static inline cht_link_t * get_next(marked_ptr_t link)
-{
-	return (cht_link_t*)(link & ~N_MARK_MASK);
+static inline cht_link_t *get_next(marked_ptr_t link)
+{
+	return (cht_link_t *)(link & ~N_MARK_MASK);
 }
 
@@ -2620,5 +2620,5 @@
 static bool same_node_pred(void *node, const cht_link_t *item2)
 {
-	const cht_link_t *item1 = (const cht_link_t*) node;
+	const cht_link_t *item1 = (const cht_link_t *) node;
 	return item1 == item2;
 }
@@ -2626,13 +2626,13 @@
 /** Compare-and-swaps a next item link. */
 static inline marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next,
-	mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark)
+    mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark)
 {
 	return _cas_link(link, make_link(cur_next, cur_mark),
-		make_link(new_next, new_mark));
+	    make_link(new_next, new_mark));
 }
 
 /** Compare-and-swaps a next item link. */
 static inline marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur,
-	marked_ptr_t new)
+    marked_ptr_t new)
 {
 	assert(link != &sentinel.link);
@@ -2690,5 +2690,5 @@
 	 * is already visible to cpu3.	 *
 	 */
-	void *expected = (void*)cur;
+	void *expected = (void *)cur;
 
 	/*
@@ -2697,6 +2697,6 @@
 	 * of explicit memory barriers.
 	 */
-	__atomic_compare_exchange_n((void**)link, &expected, (void *)new, false,
-		__ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
+	__atomic_compare_exchange_n((void **)link, &expected, (void *)new, false,
+	    __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
 
 	return (marked_ptr_t) expected;
