Index: kernel/generic/src/adt/avl.c
===================================================================
--- kernel/generic/src/adt/avl.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/adt/avl.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -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 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/adt/cht.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -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;
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/console/cmd.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -923,5 +923,5 @@
 
 	printf("Up %" PRIun " days, %" PRIun " hours, %" PRIun " minutes, %" PRIun " seconds\n",
-		sec / 86400, (sec % 86400) / 3600, (sec % 3600) / 60, sec % 60);
+	    sec / 86400, (sec % 86400) / 3600, (sec % 3600) / 60, sec % 60);
 
 	return 1;
@@ -1088,5 +1088,5 @@
 		    (void *) cmd_call2);
 		printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n",
-		       arg1, arg2, (void *) symaddr, symbol);
+		    arg1, arg2, (void *) symaddr, symbol);
 		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2));
 		interrupts_restore(ipl);
@@ -1125,5 +1125,5 @@
 		    (void *) cmd_call3);
 		printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n",
-		       arg1, arg2, arg3, (void *) symaddr, symbol);
+		    arg1, arg2, arg3, (void *) symaddr, symbol);
 		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2, arg3));
 		interrupts_restore(ipl);
@@ -1188,5 +1188,5 @@
 		pointer = true;
 	} else if (((char *) argv->buffer)[0] >= '0' &&
-		   ((char *) argv->buffer)[0] <= '9') {
+	    ((char *) argv->buffer)[0] <= '9') {
 		uint64_t value;
 		rc = str_uint64_t((char *) argv->buffer, NULL, 0, true, &value);
@@ -1206,5 +1206,5 @@
 		if (pointer)
 			addr = *(uintptr_t *) addr;
-		printf("Writing %#" PRIx32" -> %p\n", arg1, (void *) addr);
+		printf("Writing %#" PRIx32 " -> %p\n", arg1, (void *) addr);
 		*(uint32_t *) addr = arg1;
 	} else
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/console/kconsole.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -86,5 +86,5 @@
 LIST_INITIALIZE(cmd_list);      /**< Command list. */
 
-static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = {};
+static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = { };
 static size_t history_pos = 0;
 
@@ -166,5 +166,5 @@
 const char *cmdtab_enum(const char *name, const char **h, void **ctx)
 {
-	link_t **startpos = (link_t**) ctx;
+	link_t **startpos = (link_t **) ctx;
 	size_t namelen = str_length(name);
 
@@ -376,5 +376,5 @@
 				beg = position - 1;
 				while ((beg > 0) && (!isspace(current[beg])))
-				    beg--;
+					beg--;
 
 				if (isspace(current[beg]))
Index: kernel/generic/src/cpu/cpu.c
===================================================================
--- kernel/generic/src/cpu/cpu.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/cpu/cpu.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -65,5 +65,5 @@
 #endif /* CONFIG_SMP */
 
-		cpus = (cpu_t *) malloc(sizeof(cpu_t) *config.cpu_count,
+		cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count,
 		    FRAME_ATOMIC);
 		if (!cpus)
@@ -71,5 +71,5 @@
 
 		/* Initialize everything */
-		memsetb(cpus, sizeof(cpu_t) *config.cpu_count, 0);
+		memsetb(cpus, sizeof(cpu_t) * config.cpu_count, 0);
 
 		size_t i;
Index: kernel/generic/src/main/main.c
===================================================================
--- kernel/generic/src/main/main.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/main/main.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -121,5 +121,5 @@
 
 /** Boot arguments. */
-char bargs[CONFIG_BOOT_ARGUMENTS_BUFLEN] = {};
+char bargs[CONFIG_BOOT_ARGUMENTS_BUFLEN] = { };
 
 /** Initial user-space tasks */
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/mm/as.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -1006,5 +1006,5 @@
 				pte_t pte;
 				bool found = page_mapping_find(as,
-				     ptr + P2SZ(size), false, &pte);
+				    ptr + P2SZ(size), false, &pte);
 
 				assert(found);
@@ -2196,5 +2196,5 @@
 		backend = &user_backend;
 		if (copy_from_uspace(&backend_data.pager_info, pager_info,
-			sizeof(as_area_pager_info_t)) != EOK) {
+		    sizeof(as_area_pager_info_t)) != EOK) {
 			return (sysarg_t) AS_MAP_FAILED;
 		}
Index: kernel/generic/src/mm/backend_user.c
===================================================================
--- kernel/generic/src/mm/backend_user.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/mm/backend_user.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -118,5 +118,5 @@
 	as_area_pager_info_t *pager_info = &area->backend_data.pager_info;
 
-	ipc_data_t data = {};
+	ipc_data_t data = { };
 	IPC_SET_IMETHOD(data, IPC_M_PAGE_IN);
 	IPC_SET_ARG1(data, upage - area->base);
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/mm/frame.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -198,6 +198,6 @@
 	size_t i = hint;
 	do {
-		if ((zones.info[i].base <= frame)
-		    && (zones.info[i].base + zones.info[i].count >= frame + count))
+		if ((zones.info[i].base <= frame) &&
+		    (zones.info[i].base + zones.info[i].count >= frame + count))
 			return i;
 
@@ -551,6 +551,6 @@
 
 	pfn_t cframes = SIZE2FRAMES(zone_conf_size(
-	    zones.info[z2].base - zones.info[z1].base
-	    + zones.info[z2].count));
+	    zones.info[z2].base - zones.info[z1].base +
+	    zones.info[z2].count));
 
 	/* Allocate merged zone data inside one of the zones */
@@ -704,5 +704,5 @@
 		 * the assert
 		 */
-		assert(confframe != ADDR2PFN((uintptr_t ) NULL));
+		assert(confframe != ADDR2PFN((uintptr_t) NULL));
 
 		/* Update the known end of physical memory. */
@@ -1206,5 +1206,5 @@
 	size_t free_highprio = 0;
 
-	for (size_t i = 0;; i++) {
+	for (size_t i = 0; ; i++) {
 		irq_spinlock_lock(&zones.lock, true);
 
Index: kernel/generic/src/printf/vsnprintf.c
===================================================================
--- kernel/generic/src/printf/vsnprintf.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/printf/vsnprintf.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -170,6 +170,6 @@
 	};
 	printf_spec_t ps = {
-		(int(*) (const char *, size_t, void *)) vsnprintf_str_write,
-		(int(*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write,
+		(int (*) (const char *, size_t, void *)) vsnprintf_str_write,
+		(int (*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write,
 		&data
 	};
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/proc/task.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -112,5 +112,5 @@
 
 #ifdef CONFIG_DEBUG
-		printf("[%"PRIu64"] ", task->taskid);
+		printf("[%" PRIu64 "] ", task->taskid);
 #endif
 
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/proc/thread.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -338,5 +338,5 @@
  *
  */
-thread_t *thread_create(void (* func)(void *), void *arg, task_t *task,
+thread_t *thread_create(void (*func)(void *), void *arg, task_t *task,
     thread_flags_t flags, const char *name)
 {
@@ -524,5 +524,5 @@
 			ipc_cleanup();
 			futex_task_cleanup();
-			LOG("Cleanup of task %" PRIu64" completed.", TASK->taskid);
+			LOG("Cleanup of task %" PRIu64 " completed.", TASK->taskid);
 		}
 	}
@@ -542,5 +542,6 @@
 
 	/* Not reached */
-	while (true);
+	while (true)
+		;
 }
 
@@ -978,5 +979,5 @@
 
 				return (sys_errno_t) rc;
-			 }
+			}
 		}
 
Index: kernel/generic/src/synch/futex.c
===================================================================
--- kernel/generic/src/synch/futex.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/synch/futex.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -171,5 +171,5 @@
 		/* Invoke the blocking cht_destroy in the background. */
 		workq_global_enqueue_noblock(&task->futexes->destroy_work,
-			destroy_task_cache);
+		    destroy_task_cache);
 	} else {
 		/* We can block. Invoke cht_destroy in this thread. */
@@ -182,5 +182,5 @@
 {
 	struct futex_cache *cache =
-		member_to_inst(work, struct futex_cache, destroy_work);
+	    member_to_inst(work, struct futex_cache, destroy_work);
 
 	/*
@@ -319,6 +319,6 @@
 
 	if (futex_ptr_link) {
-		futex_ptr_t *futex_ptr
-			= member_to_inst(futex_ptr_link, futex_ptr_t, cht_link);
+		futex_ptr_t *futex_ptr =
+		    member_to_inst(futex_ptr_link, futex_ptr_t, cht_link);
 
 		futex = futex_ptr->futex;
@@ -485,5 +485,5 @@
 static size_t task_fut_ht_key_hash(void *key)
 {
-	return *(uintptr_t*)key;
+	return *(uintptr_t *)key;
 }
 
@@ -499,5 +499,5 @@
 {
 	const futex_ptr_t *fut_ptr = member_to_inst(item, futex_ptr_t, cht_link);
-	uintptr_t uaddr = *(uintptr_t*)key;
+	uintptr_t uaddr = *(uintptr_t *)key;
 
 	return fut_ptr->uaddr == uaddr;
Index: kernel/generic/src/synch/workqueue.c
===================================================================
--- kernel/generic/src/synch/workqueue.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/synch/workqueue.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -133,5 +133,5 @@
 static void wait_for_workers(struct work_queue *workq);
 static int _workq_enqueue(struct work_queue *workq, work_t *work_item,
-	work_func_t func, bool can_block);
+    work_func_t func, bool can_block);
 static void init_work_item(work_t *work_item, work_func_t func);
 static signal_op_t signal_worker_logic(struct work_queue *workq, bool can_block);
@@ -185,5 +185,5 @@
 
 /** Creates and initializes a work queue. Returns NULL upon failure. */
-struct work_queue * workq_create(const char *name)
+struct work_queue *workq_create(const char *name)
 {
 	struct work_queue *workq = malloc(sizeof(struct work_queue), 0);
@@ -269,5 +269,5 @@
 
 	thread_t *thread = thread_create(worker_thread, workq, TASK,
-		THREAD_FLAG_NONE, workq->name);
+	    THREAD_FLAG_NONE, workq->name);
 
 	if (!thread) {
@@ -428,5 +428,5 @@
  */
 bool workq_enqueue_noblock(struct work_queue *workq, work_t *work_item,
-	work_func_t func)
+    work_func_t func)
 {
 	return _workq_enqueue(workq, work_item, func, false);
@@ -473,5 +473,5 @@
  */
 static int _workq_enqueue(struct work_queue *workq, work_t *work_item,
-	work_func_t func, bool can_block)
+    work_func_t func, bool can_block)
 {
 	assert(!workq_corrupted(workq));
@@ -614,5 +614,5 @@
 
 		size_t remaining_idle =
-			workq->idle_worker_cnt - workq->activate_pending;
+		    workq->idle_worker_cnt - workq->activate_pending;
 
 		/* Idle workers still exist - activate one. */
@@ -628,6 +628,6 @@
 		} else {
 			/* No idle workers remain. Request that a new one be created. */
-			bool need_worker = (active < max_concurrent_workers)
-				&& (workq->cur_worker_cnt < max_worker_cnt);
+			bool need_worker = (active < max_concurrent_workers) &&
+			    (workq->cur_worker_cnt < max_worker_cnt);
 
 			if (need_worker && can_block) {
@@ -780,5 +780,5 @@
 
 	_condvar_wait_timeout_irq_spinlock(&workq->activate_worker,
-		&workq->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
+	    &workq->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
 
 	assert(!workq_corrupted(workq));
@@ -855,28 +855,27 @@
 	bool worker_surplus = worker_unnecessary(workq);
 	const char *load_str = worker_surplus ? "decreasing" :
-		(0 < workq->activate_pending) ? "increasing" : "stable";
+	    (0 < workq->activate_pending) ? "increasing" : "stable";
 
 	irq_spinlock_unlock(&workq->lock, true);
 
 	printf(
-		"Configuration: max_worker_cnt=%zu, min_worker_cnt=%zu,\n"
-		" max_concurrent_workers=%zu, max_items_per_worker=%zu\n"
-		"Workers: %zu\n"
-		"Active:  %zu (workers currently processing work)\n"
-		"Blocked: %zu (work functions sleeping/blocked)\n"
-		"Idle:    %zu (idle workers waiting for more work)\n"
-		"Items:   %zu (queued not yet dispatched work)\n"
-		"Stopping: %d\n"
-		"Load: %s\n",
-		max_worker_cnt, min_worker_cnt,
-		max_concurrent_workers, max_items_per_worker,
-		total,
-		active,
-		blocked,
-		idle,
-		items,
-		stopping,
-		load_str
-	);
+	    "Configuration: max_worker_cnt=%zu, min_worker_cnt=%zu,\n"
+	    " max_concurrent_workers=%zu, max_items_per_worker=%zu\n"
+	    "Workers: %zu\n"
+	    "Active:  %zu (workers currently processing work)\n"
+	    "Blocked: %zu (work functions sleeping/blocked)\n"
+	    "Idle:    %zu (idle workers waiting for more work)\n"
+	    "Items:   %zu (queued not yet dispatched work)\n"
+	    "Stopping: %d\n"
+	    "Load: %s\n",
+	    max_worker_cnt, min_worker_cnt,
+	    max_concurrent_workers, max_items_per_worker,
+	    total,
+	    active,
+	    blocked,
+	    idle,
+	    items,
+	    stopping,
+	    load_str);
 }
 
@@ -896,5 +895,5 @@
 	while (list_empty(&info->work_queues) && !stop) {
 		errno_t ret = _condvar_wait_timeout_irq_spinlock(&info->req_cv,
-			&info->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
+		    &info->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
 
 		stop = (ret == EINTR);
@@ -903,5 +902,5 @@
 	if (!stop) {
 		*pworkq = list_get_instance(list_first(&info->work_queues),
-			struct work_queue, nb_link);
+		    struct work_queue, nb_link);
 
 		assert(!workq_corrupted(*pworkq));
@@ -933,5 +932,5 @@
 
 	nonblock_adder.thread = thread_create(thr_nonblock_add_worker,
-		&nonblock_adder, TASK, THREAD_FLAG_NONE, "kworkq-nb");
+	    &nonblock_adder, TASK, THREAD_FLAG_NONE, "kworkq-nb");
 
 	if (nonblock_adder.thread) {
Index: kernel/generic/src/sysinfo/stats.c
===================================================================
--- kernel/generic/src/sysinfo/stats.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/sysinfo/stats.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -74,8 +74,8 @@
  *
  */
-static load_t load_exp[LOAD_STEPS] = {1884, 2014, 2037};
+static load_t load_exp[LOAD_STEPS] = { 1884, 2014, 2037 };
 
 /** Running average of the number of ready threads */
-static load_t avenrdy[LOAD_STEPS] = {0, 0, 0};
+static load_t avenrdy[LOAD_STEPS] = { 0, 0, 0 };
 
 /** Load calculation lock */
Index: kernel/generic/src/udebug/udebug.c
===================================================================
--- kernel/generic/src/udebug/udebug.c	(revision 1abcf1db7c2a8071caaf9983f1571b2ef88e1be6)
+++ kernel/generic/src/udebug/udebug.c	(revision 3bacee1839e6f355100ab4ea86bb211e9ecf19ed)
@@ -170,5 +170,5 @@
 
 	mutex_unlock(&THREAD->udebug.lock);
-        mutex_unlock(&TASK->udebug.lock);
+	mutex_unlock(&TASK->udebug.lock);
 }
 
