Index: uspace/app/hbench/env.c
===================================================================
--- uspace/app/hbench/env.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/app/hbench/env.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -52,14 +52,14 @@
 }
 
-static size_t param_key_hash(void *key)
+static size_t param_key_hash(const void *key)
 {
-	char *key_str = key;
+	const char *key_str = key;
 	return str_size(key_str);
 }
 
-static bool param_key_equal(void *key, const ht_link_t *item)
+static bool param_key_equal(const void *key, const ht_link_t *item)
 {
 	param_t *param = hash_table_get_inst(item, param_t, link);
-	char *key_str = key;
+	const char *key_str = key;
 
 	return str_cmp(param->key, key_str) == 0;
Index: uspace/app/trace/ipcp.c
===================================================================
--- uspace/app/trace/ipcp.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/app/trace/ipcp.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -72,7 +72,7 @@
 proto_t	*proto_unknown;		/**< Protocol with no known methods. */
 
-static size_t pending_call_key_hash(void *key)
-{
-	cap_call_handle_t *chandle = (cap_call_handle_t *) key;
+static size_t pending_call_key_hash(const void *key)
+{
+	const cap_call_handle_t *chandle = key;
 	return cap_handle_raw(*chandle);
 }
@@ -84,7 +84,7 @@
 }
 
-static bool pending_call_key_equal(void *key, const ht_link_t *item)
-{
-	cap_call_handle_t *chandle = (cap_call_handle_t *) key;
+static bool pending_call_key_equal(const void *key, const ht_link_t *item)
+{
+	const cap_call_handle_t *chandle = key;
 	pending_call_t *hs = hash_table_get_inst(item, pending_call_t, link);
 
Index: uspace/app/trace/proto.c
===================================================================
--- uspace/app/trace/proto.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/app/trace/proto.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -57,7 +57,8 @@
 /* Hash table operations. */
 
-static size_t srv_proto_key_hash(void *key)
-{
-	return *(int *)key;
+static size_t srv_proto_key_hash(const void *key)
+{
+	const int *n = key;
+	return *n;
 }
 
@@ -68,8 +69,9 @@
 }
 
-static bool srv_proto_key_equal(void *key, const ht_link_t *item)
-{
+static bool srv_proto_key_equal(const void *key, const ht_link_t *item)
+{
+	const int *n = key;
 	srv_proto_t *sp = hash_table_get_inst(item, srv_proto_t, link);
-	return sp->srv == *(int *)key;
+	return sp->srv == *n;
 }
 
@@ -82,7 +84,8 @@
 };
 
-static size_t method_oper_key_hash(void *key)
-{
-	return *(int *)key;
+static size_t method_oper_key_hash(const void *key)
+{
+	const int *n = key;
+	return *n;
 }
 
@@ -93,8 +96,9 @@
 }
 
-static bool method_oper_key_equal(void *key, const ht_link_t *item)
-{
+static bool method_oper_key_equal(const void *key, const ht_link_t *item)
+{
+	const int *n = key;
 	method_oper_t *mo = hash_table_get_inst(item, method_oper_t, link);
-	return mo->method == *(int *)key;
+	return mo->method == *n;
 }
 
Index: uspace/lib/block/block.c
===================================================================
--- uspace/lib/block/block.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/block/block.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -241,7 +241,7 @@
 }
 
-static size_t cache_key_hash(void *key)
-{
-	aoff64_t *lba = (aoff64_t *)key;
+static size_t cache_key_hash(const void *key)
+{
+	const aoff64_t *lba = key;
 	return *lba;
 }
@@ -253,7 +253,7 @@
 }
 
-static bool cache_key_equal(void *key, const ht_link_t *item)
-{
-	aoff64_t *lba = (aoff64_t *)key;
+static bool cache_key_equal(const void *key, const ht_link_t *item)
+{
+	const aoff64_t *lba = key;
 	block_t *b = hash_table_get_inst(item, block_t, hash_link);
 	return b->lba == *lba;
Index: uspace/lib/c/generic/adt/hash_table.c
===================================================================
--- uspace/lib/c/generic/adt/hash_table.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/c/generic/adt/hash_table.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -245,5 +245,5 @@
  *
  */
-ht_link_t *hash_table_find(const hash_table_t *h, void *key)
+ht_link_t *hash_table_find(const hash_table_t *h, const void *key)
 {
 	assert(h && h->bucket);
@@ -303,9 +303,8 @@
  * @param key  Array of keys that will be compared against items of
  *             the hash table.
- * @param keys Number of keys in the 'key' array.
  *
  * @return Returns the number of removed items.
  */
-size_t hash_table_remove(hash_table_t *h, void *key)
+size_t hash_table_remove(hash_table_t *h, const void *key)
 {
 	assert(h && h->bucket);
Index: uspace/lib/c/generic/async/ports.c
===================================================================
--- uspace/lib/c/generic/async/ports.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/c/generic/async/ports.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -103,8 +103,8 @@
 static hash_table_t interface_hash_table;
 
-static size_t interface_key_hash(void *key)
-{
-	iface_t iface = *(iface_t *) key;
-	return iface;
+static size_t interface_key_hash(const void *key)
+{
+	const iface_t *iface = key;
+	return *iface;
 }
 
@@ -115,9 +115,9 @@
 }
 
-static bool interface_key_equal(void *key, const ht_link_t *item)
-{
-	iface_t iface = *(iface_t *) key;
+static bool interface_key_equal(const void *key, const ht_link_t *item)
+{
+	const iface_t *iface = key;
 	interface_t *interface = hash_table_get_inst(item, interface_t, link);
-	return iface == interface->iface;
+	return *iface == interface->iface;
 }
 
@@ -131,8 +131,8 @@
 };
 
-static size_t port_key_hash(void *key)
-{
-	port_id_t port_id = *(port_id_t *) key;
-	return port_id;
+static size_t port_key_hash(const void *key)
+{
+	const port_id_t *port_id = key;
+	return *port_id;
 }
 
@@ -143,9 +143,9 @@
 }
 
-static bool port_key_equal(void *key, const ht_link_t *item)
-{
-	port_id_t port_id = *(port_id_t *) key;
+static bool port_key_equal(const void *key, const ht_link_t *item)
+{
+	const port_id_t *port_id = key;
 	port_t *port = hash_table_get_inst(item, port_t, link);
-	return port_id == port->id;
+	return *port_id == port->id;
 }
 
Index: uspace/lib/c/generic/async/server.c
===================================================================
--- uspace/lib/c/generic/async/server.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/c/generic/async/server.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -231,8 +231,8 @@
 static sysarg_t notification_avail = 0;
 
-static size_t client_key_hash(void *key)
-{
-	task_id_t in_task_id = *(task_id_t *) key;
-	return in_task_id;
+static size_t client_key_hash(const void *key)
+{
+	const task_id_t *in_task_id = key;
+	return *in_task_id;
 }
 
@@ -243,9 +243,9 @@
 }
 
-static bool client_key_equal(void *key, const ht_link_t *item)
-{
-	task_id_t in_task_id = *(task_id_t *) key;
+static bool client_key_equal(const void *key, const ht_link_t *item)
+{
+	const task_id_t *in_task_id = key;
 	client_t *client = hash_table_get_inst(item, client_t, link);
-	return in_task_id == client->in_task_id;
+	return *in_task_id == client->in_task_id;
 }
 
@@ -490,8 +490,8 @@
 }
 
-static size_t notification_key_hash(void *key)
-{
-	sysarg_t id = *(sysarg_t *) key;
-	return id;
+static size_t notification_key_hash(const void *key)
+{
+	const sysarg_t *id = key;
+	return *id;
 }
 
@@ -503,10 +503,10 @@
 }
 
-static bool notification_key_equal(void *key, const ht_link_t *item)
-{
-	sysarg_t id = *(sysarg_t *) key;
+static bool notification_key_equal(const void *key, const ht_link_t *item)
+{
+	const sysarg_t *id = key;
 	notification_t *notification =
 	    hash_table_get_inst(item, notification_t, htlink);
-	return id == notification->imethod;
+	return *id == notification->imethod;
 }
 
Index: uspace/lib/c/include/adt/hash_table.h
===================================================================
--- uspace/lib/c/include/adt/hash_table.h	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/c/include/adt/hash_table.h	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -53,5 +53,5 @@
 
 	/** Returns the hash of the key. */
-	size_t (*key_hash)(void *key);
+	size_t (*key_hash)(const void *key);
 
 	/** True if the items are equal (have the same lookup keys). */
@@ -59,5 +59,5 @@
 
 	/** Returns true if the key is equal to the item's lookup key. */
-	bool (*key_equal)(void *key, const ht_link_t *item);
+	bool (*key_equal)(const void *key, const ht_link_t *item);
 
 	/** Hash table item removal callback.
@@ -94,8 +94,8 @@
 extern void hash_table_insert(hash_table_t *, ht_link_t *);
 extern bool hash_table_insert_unique(hash_table_t *, ht_link_t *);
-extern ht_link_t *hash_table_find(const hash_table_t *, void *);
+extern ht_link_t *hash_table_find(const hash_table_t *, const void *);
 extern ht_link_t *hash_table_find_next(const hash_table_t *, ht_link_t *,
     ht_link_t *);
-extern size_t hash_table_remove(hash_table_t *, void *);
+extern size_t hash_table_remove(hash_table_t *, const void *);
 extern void hash_table_remove_item(hash_table_t *, ht_link_t *);
 extern void hash_table_apply(hash_table_t *, bool (*)(ht_link_t *, void *),
Index: uspace/lib/ext4/src/ops.c
===================================================================
--- uspace/lib/ext4/src/ops.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/ext4/src/ops.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -101,7 +101,7 @@
 } node_key_t;
 
-static size_t open_nodes_key_hash(void *key_arg)
-{
-	node_key_t *key = (node_key_t *)key_arg;
+static size_t open_nodes_key_hash(const void *key_arg)
+{
+	const node_key_t *key = key_arg;
 	return hash_combine(key->service_id, key->index);
 }
@@ -113,7 +113,7 @@
 }
 
-static bool open_nodes_key_equal(void *key_arg, const ht_link_t *item)
-{
-	node_key_t *key = (node_key_t *)key_arg;
+static bool open_nodes_key_equal(const void *key_arg, const ht_link_t *item)
+{
+	const node_key_t *key = key_arg;
 	ext4_node_t *enode = hash_table_get_inst(item, ext4_node_t, link);
 
Index: uspace/lib/nic/src/nic_addr_db.c
===================================================================
--- uspace/lib/nic/src/nic_addr_db.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/nic/src/nic_addr_db.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -62,7 +62,7 @@
 } addr_key_t;
 
-static bool nic_addr_key_equal(void *key_arg, const ht_link_t *item)
-{
-	addr_key_t *key = (addr_key_t *)key_arg;
+static bool nic_addr_key_equal(const void *key_arg, const ht_link_t *item)
+{
+	const addr_key_t *key = key_arg;
 	nic_addr_entry_t *entry = member_to_inst(item, nic_addr_entry_t, link);
 
@@ -81,7 +81,7 @@
 }
 
-static size_t nic_addr_key_hash(void *k)
-{
-	addr_key_t *key = (addr_key_t *)k;
+static size_t nic_addr_key_hash(const void *k)
+{
+	const addr_key_t *key = k;
 	return addr_hash(key->len, key->addr);
 }
Index: uspace/lib/nic/src/nic_wol_virtues.c
===================================================================
--- uspace/lib/nic/src/nic_wol_virtues.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/nic/src/nic_wol_virtues.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -45,7 +45,8 @@
  */
 
-static size_t nic_wv_key_hash(void *key)
-{
-	return *(nic_wv_id_t *) key;
+static size_t nic_wv_key_hash(const void *key)
+{
+	const nic_wv_id_t *k = key;
+	return *k;
 }
 
@@ -56,8 +57,9 @@
 }
 
-static bool nic_wv_key_equal(void *key, const ht_link_t *item)
-{
-	nic_wol_virtue_t *virtue = (nic_wol_virtue_t *) item;
-	return (virtue->id == *(nic_wv_id_t *) key);
+static bool nic_wv_key_equal(const void *key, const ht_link_t *item)
+{
+	const nic_wv_id_t *k = key;
+	const nic_wol_virtue_t *virtue = (const nic_wol_virtue_t *) item;
+	return (virtue->id == *k);
 }
 
Index: uspace/srv/devman/devtree.c
===================================================================
--- uspace/srv/devman/devtree.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/devman/devtree.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -42,8 +42,8 @@
 /* hash table operations */
 
-static inline size_t handle_key_hash(void *key)
-{
-	devman_handle_t handle = *(devman_handle_t *)key;
-	return handle;
+static inline size_t handle_key_hash(const void *key)
+{
+	const devman_handle_t *handle = key;
+	return *handle;
 }
 
@@ -60,22 +60,22 @@
 }
 
-static bool devman_devices_key_equal(void *key, const ht_link_t *item)
-{
-	devman_handle_t handle = *(devman_handle_t *)key;
+static bool devman_devices_key_equal(const void *key, const ht_link_t *item)
+{
+	const devman_handle_t *handle = key;
 	dev_node_t *dev = hash_table_get_inst(item, dev_node_t, devman_dev);
-	return dev->handle == handle;
-}
-
-static bool devman_functions_key_equal(void *key, const ht_link_t *item)
-{
-	devman_handle_t handle = *(devman_handle_t *)key;
+	return dev->handle == *handle;
+}
+
+static bool devman_functions_key_equal(const void *key, const ht_link_t *item)
+{
+	const devman_handle_t *handle = key;
 	fun_node_t *fun = hash_table_get_inst(item, fun_node_t, devman_fun);
-	return fun->handle == handle;
-}
-
-static inline size_t service_id_key_hash(void *key)
-{
-	service_id_t service_id = *(service_id_t *)key;
-	return service_id;
+	return fun->handle == *handle;
+}
+
+static inline size_t service_id_key_hash(const void *key)
+{
+	const service_id_t *service_id = key;
+	return *service_id;
 }
 
@@ -86,9 +86,9 @@
 }
 
-static bool loc_functions_key_equal(void *key, const ht_link_t *item)
-{
-	service_id_t service_id = *(service_id_t *)key;
+static bool loc_functions_key_equal(const void *key, const ht_link_t *item)
+{
+	const service_id_t *service_id = key;
 	fun_node_t *fun = hash_table_get_inst(item, fun_node_t, loc_fun);
-	return fun->service_id == service_id;
+	return fun->service_id == *service_id;
 }
 
Index: uspace/srv/fs/cdfs/cdfs_ops.c
===================================================================
--- uspace/srv/fs/cdfs/cdfs_ops.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/cdfs/cdfs_ops.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -285,7 +285,7 @@
 } ht_key_t;
 
-static size_t nodes_key_hash(void *k)
-{
-	ht_key_t *key = (ht_key_t *)k;
+static size_t nodes_key_hash(const void *k)
+{
+	const ht_key_t *key = k;
 	return hash_combine(key->service_id, key->index);
 }
@@ -297,8 +297,8 @@
 }
 
-static bool nodes_key_equal(void *k, const ht_link_t *item)
+static bool nodes_key_equal(const void *k, const ht_link_t *item)
 {
 	cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link);
-	ht_key_t *key = (ht_key_t *)k;
+	const ht_key_t *key = k;
 
 	return key->service_id == node->fs->service_id && key->index == node->index;
Index: uspace/srv/fs/exfat/exfat_idx.c
===================================================================
--- uspace/srv/fs/exfat/exfat_idx.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/exfat/exfat_idx.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -117,7 +117,7 @@
 } pos_key_t;
 
-static inline size_t pos_key_hash(void *key)
-{
-	pos_key_t *pos = (pos_key_t *)key;
+static inline size_t pos_key_hash(const void *key)
+{
+	const pos_key_t *pos = key;
 
 	size_t hash = 0;
@@ -139,7 +139,7 @@
 }
 
-static bool pos_key_equal(void *key, const ht_link_t *item)
-{
-	pos_key_t *pos = (pos_key_t *)key;
+static bool pos_key_equal(const void *key, const ht_link_t *item)
+{
+	const pos_key_t *pos = key;
 	exfat_idx_t *fidx = hash_table_get_inst(item, exfat_idx_t, uph_link);
 
@@ -168,7 +168,7 @@
 } idx_key_t;
 
-static size_t idx_key_hash(void *key_arg)
-{
-	idx_key_t *key = (idx_key_t *)key_arg;
+static size_t idx_key_hash(const void *key_arg)
+{
+	const idx_key_t *key = key_arg;
 	return hash_combine(key->service_id, key->index);
 }
@@ -180,8 +180,8 @@
 }
 
-static bool idx_key_equal(void *key_arg, const ht_link_t *item)
+static bool idx_key_equal(const void *key_arg, const ht_link_t *item)
 {
 	exfat_idx_t *fidx = hash_table_get_inst(item, exfat_idx_t, uih_link);
-	idx_key_t *key = (idx_key_t *)key_arg;
+	const idx_key_t *key = key_arg;
 
 	return key->index == fidx->index && key->service_id == fidx->service_id;
Index: uspace/srv/fs/fat/fat_idx.c
===================================================================
--- uspace/srv/fs/fat/fat_idx.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/fat/fat_idx.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -117,7 +117,7 @@
 } pos_key_t;
 
-static inline size_t pos_key_hash(void *key)
-{
-	pos_key_t *pos = (pos_key_t *)key;
+static inline size_t pos_key_hash(const void *key)
+{
+	const pos_key_t *pos = key;
 
 	size_t hash = 0;
@@ -139,7 +139,7 @@
 }
 
-static bool pos_key_equal(void *key, const ht_link_t *item)
-{
-	pos_key_t *pos = (pos_key_t *)key;
+static bool pos_key_equal(const void *key, const ht_link_t *item)
+{
+	const pos_key_t *pos = key;
 	fat_idx_t *fidx = hash_table_get_inst(item, fat_idx_t, uph_link);
 
@@ -168,7 +168,7 @@
 } idx_key_t;
 
-static size_t idx_key_hash(void *key_arg)
-{
-	idx_key_t *key = (idx_key_t *)key_arg;
+static size_t idx_key_hash(const void *key_arg)
+{
+	const idx_key_t *key = key_arg;
 	return hash_combine(key->service_id, key->index);
 }
@@ -180,8 +180,8 @@
 }
 
-static bool idx_key_equal(void *key_arg, const ht_link_t *item)
+static bool idx_key_equal(const void *key_arg, const ht_link_t *item)
 {
 	fat_idx_t *fidx = hash_table_get_inst(item, fat_idx_t, uih_link);
-	idx_key_t *key = (idx_key_t *)key_arg;
+	const idx_key_t *key = key_arg;
 
 	return key->index == fidx->index && key->service_id == fidx->service_id;
Index: uspace/srv/fs/locfs/locfs_ops.c
===================================================================
--- uspace/srv/fs/locfs/locfs_ops.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/locfs/locfs_ops.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -71,7 +71,8 @@
 /* Implementation of hash table interface for the nodes hash table. */
 
-static size_t services_key_hash(void *key)
-{
-	return *(service_id_t *)key;
+static size_t services_key_hash(const void *key)
+{
+	const service_id_t *k = key;
+	return *k;
 }
 
@@ -82,8 +83,9 @@
 }
 
-static bool services_key_equal(void *key, const ht_link_t *item)
-{
+static bool services_key_equal(const void *key, const ht_link_t *item)
+{
+	const service_id_t *k = key;
 	service_t *dev = hash_table_get_inst(item, service_t, link);
-	return (dev->service_id == *(service_id_t *)key);
+	return (dev->service_id == *k);
 }
 
Index: uspace/srv/fs/mfs/mfs_ops.c
===================================================================
--- uspace/srv/fs/mfs/mfs_ops.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/mfs/mfs_ops.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -100,7 +100,7 @@
 
 static size_t
-open_nodes_key_hash(void *key)
-{
-	node_key_t *node_key = (node_key_t *)key;
+open_nodes_key_hash(const void *key)
+{
+	const node_key_t *node_key = key;
 	return hash_combine(node_key->service_id, node_key->index);
 }
@@ -114,7 +114,7 @@
 
 static bool
-open_nodes_key_equal(void *key, const ht_link_t *item)
-{
-	node_key_t *node_key = (node_key_t *)key;
+open_nodes_key_equal(const void *key, const ht_link_t *item)
+{
+	const node_key_t *node_key = key;
 	struct mfs_node *mnode = hash_table_get_inst(item, struct mfs_node, link);
 
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -147,7 +147,7 @@
 } node_key_t;
 
-static size_t nodes_key_hash(void *k)
-{
-	node_key_t *key = (node_key_t *)k;
+static size_t nodes_key_hash(const void *k)
+{
+	const node_key_t *key = k;
 	return hash_combine(key->service_id, key->index);
 }
@@ -159,8 +159,8 @@
 }
 
-static bool nodes_key_equal(void *key_arg, const ht_link_t *item)
+static bool nodes_key_equal(const void *key_arg, const ht_link_t *item)
 {
 	tmpfs_node_t *node = hash_table_get_inst(item, tmpfs_node_t, nh_link);
-	node_key_t *key = (node_key_t *)key_arg;
+	const node_key_t *key = key_arg;
 
 	return key->service_id == node->service_id && key->index == node->index;
Index: uspace/srv/fs/udf/udf_idx.c
===================================================================
--- uspace/srv/fs/udf/udf_idx.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/fs/udf/udf_idx.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -63,13 +63,13 @@
 }
 
-static size_t udf_idx_key_hash(void *k)
-{
-	udf_ht_key_t *key = (udf_ht_key_t *) k;
+static size_t udf_idx_key_hash(const void *k)
+{
+	const udf_ht_key_t *key = k;
 	return hash_combine(key->service_id, key->index);
 }
 
-static bool udf_idx_key_equal(void *k, const ht_link_t *item)
-{
-	udf_ht_key_t *key = (udf_ht_key_t *) k;
+static bool udf_idx_key_equal(const void *k, const ht_link_t *item)
+{
+	const udf_ht_key_t *key = k;
 	udf_node_t *node = hash_table_get_inst(item, udf_node_t, link);
 
Index: uspace/srv/hid/input/gsp.c
===================================================================
--- uspace/srv/hid/input/gsp.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/hid/input/gsp.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -64,7 +64,7 @@
 } trans_key_t;
 
-static size_t trans_key_hash(void *key)
-{
-	trans_key_t *trans_key = (trans_key_t *)key;
+static size_t trans_key_hash(const void *key)
+{
+	const trans_key_t *trans_key = key;
 	return hash_combine(trans_key->input, trans_key->old_state);
 }
@@ -76,7 +76,7 @@
 }
 
-static bool trans_key_equal(void *key, const ht_link_t *item)
-{
-	trans_key_t *trans_key = (trans_key_t *)key;
+static bool trans_key_equal(const void *key, const ht_link_t *item)
+{
+	const trans_key_t *trans_key = key;
 	gsp_trans_t *t = hash_table_get_inst(item, gsp_trans_t, link);
 
Index: uspace/srv/ns/service.c
===================================================================
--- uspace/srv/ns/service.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/ns/service.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -65,7 +65,8 @@
 } hashed_iface_t;
 
-static size_t service_key_hash(void *key)
-{
-	return *(service_t *) key;
+static size_t service_key_hash(const void *key)
+{
+	const service_t *srv = key;
+	return *srv;
 }
 
@@ -78,15 +79,17 @@
 }
 
-static bool service_key_equal(void *key, const ht_link_t *item)
-{
+static bool service_key_equal(const void *key, const ht_link_t *item)
+{
+	const service_t *srv = key;
 	hashed_service_t *service =
 	    hash_table_get_inst(item, hashed_service_t, link);
 
-	return service->service == *(service_t *) key;
-}
-
-static size_t iface_key_hash(void *key)
-{
-	return *(iface_t *) key;
+	return service->service == *srv;
+}
+
+static size_t iface_key_hash(const void *key)
+{
+	const iface_t *iface = key;
+	return *iface;
 }
 
@@ -99,10 +102,11 @@
 }
 
-static bool iface_key_equal(void *key, const ht_link_t *item)
-{
+static bool iface_key_equal(const void *key, const ht_link_t *item)
+{
+	const iface_t *kiface = key;
 	hashed_iface_t *iface =
 	    hash_table_get_inst(item, hashed_iface_t, link);
 
-	return iface->iface == *(iface_t *) key;
+	return iface->iface == *kiface;
 }
 
Index: uspace/srv/ns/task.c
===================================================================
--- uspace/srv/ns/task.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/ns/task.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -54,10 +54,11 @@
 } hashed_task_t;
 
-static size_t task_key_hash(void *key)
-{
-	return *(task_id_t *)key;
-}
-
-static size_t task_hash(const ht_link_t  *item)
+static size_t task_key_hash(const void *key)
+{
+	const task_id_t *tid = key;
+	return *tid;
+}
+
+static size_t task_hash(const ht_link_t *item)
 {
 	hashed_task_t *ht = hash_table_get_inst(item, hashed_task_t, link);
@@ -65,8 +66,9 @@
 }
 
-static bool task_key_equal(void *key, const ht_link_t *item)
-{
+static bool task_key_equal(const void *key, const ht_link_t *item)
+{
+	const task_id_t *tid = key;
 	hashed_task_t *ht = hash_table_get_inst(item, hashed_task_t, link);
-	return ht->id == *(task_id_t *)key;
+	return ht->id == *tid;
 }
 
@@ -97,8 +99,8 @@
 /* label-to-id hash table operations */
 
-static size_t p2i_key_hash(void *key)
-{
-	sysarg_t label = *(sysarg_t *)key;
-	return label;
+static size_t p2i_key_hash(const void *key)
+{
+	const sysarg_t *label = key;
+	return *label;
 }
 
@@ -109,10 +111,10 @@
 }
 
-static bool p2i_key_equal(void *key, const ht_link_t *item)
-{
-	sysarg_t label = *(sysarg_t *)key;
+static bool p2i_key_equal(const void *key, const ht_link_t *item)
+{
+	const sysarg_t *label = key;
 	p2i_entry_t *entry = hash_table_get_inst(item, p2i_entry_t, link);
 
-	return (label == entry->label);
+	return (*label == entry->label);
 }
 
Index: uspace/srv/vfs/vfs_node.c
===================================================================
--- uspace/srv/vfs/vfs_node.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/srv/vfs/vfs_node.c	(revision 5e801dccc49faadcb18cd8ddee6200633e8f11b8)
@@ -60,7 +60,7 @@
 #define KEY_INDEX	2
 
-static size_t nodes_key_hash(void *);
+static size_t nodes_key_hash(const void *);
 static size_t nodes_hash(const ht_link_t *);
-static bool nodes_key_equal(void *, const ht_link_t *);
+static bool nodes_key_equal(const void *, const ht_link_t *);
 static vfs_triplet_t node_triplet(vfs_node_t *node);
 
@@ -280,7 +280,7 @@
 }
 
-static size_t nodes_key_hash(void *key)
-{
-	vfs_triplet_t *tri = key;
+static size_t nodes_key_hash(const void *key)
+{
+	const vfs_triplet_t *tri = key;
 	size_t hash = hash_combine(tri->fs_handle, tri->index);
 	return hash_combine(hash, tri->service_id);
@@ -294,7 +294,7 @@
 }
 
-static bool nodes_key_equal(void *key, const ht_link_t *item)
-{
-	vfs_triplet_t *tri = key;
+static bool nodes_key_equal(const void *key, const ht_link_t *item)
+{
+	const vfs_triplet_t *tri = key;
 	vfs_node_t *node = hash_table_get_inst(item, vfs_node_t, nh_link);
 	return node->fs_handle == tri->fs_handle &&
