Index: uspace/drv/bus/usb/ehci/ehci_batch.h
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_batch.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/ehci_batch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -63,5 +63,5 @@
 } ehci_transfer_batch_t;
 
-ehci_transfer_batch_t * ehci_transfer_batch_create(endpoint_t *ep);
+ehci_transfer_batch_t *ehci_transfer_batch_create(endpoint_t *ep);
 int ehci_transfer_batch_prepare(ehci_transfer_batch_t *batch);
 void ehci_transfer_batch_commit(const ehci_transfer_batch_t *batch);
@@ -69,5 +69,6 @@
 void ehci_transfer_batch_destroy(ehci_transfer_batch_t *batch);
 
-static inline ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
+static inline ehci_transfer_batch_t *ehci_transfer_batch_get(
+    usb_transfer_batch_t *usb_batch)
 {
 	assert(usb_batch);
Index: uspace/drv/bus/usb/ehci/ehci_bus.c
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_bus.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/ehci_bus.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -54,5 +54,6 @@
 	ehci_endpoint_t *instance = ehci_endpoint_get(ep);
 	if (qh_toggle_from_td(instance->qh))
-		usb_log_warning("EP(%p): Resetting toggle bit for transfer directed EP", instance);
+		usb_log_warning("EP(%p): Resetting toggle bit for transfer "
+		    "directed EP", instance);
 	qh_toggle_set(instance->qh, 0);
 }
@@ -72,5 +73,6 @@
 /** Creates new hcd endpoint representation.
  */
-static endpoint_t *ehci_endpoint_create(device_t *dev, const usb_endpoint_descriptors_t *desc)
+static endpoint_t *ehci_endpoint_create(device_t *dev,
+    const usb_endpoint_descriptors_t *desc)
 {
 	assert(dev);
Index: uspace/drv/bus/usb/ehci/ehci_bus.h
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_bus.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/ehci_bus.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -78,5 +78,5 @@
  * @return Pointer to assigned ehci endpoint structure
  */
-static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep)
+static inline ehci_endpoint_t *ehci_endpoint_get(const endpoint_t *ep)
 {
 	assert(ep);
@@ -84,5 +84,5 @@
 }
 
-static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l)
+static inline ehci_endpoint_t *ehci_endpoint_list_instance(link_t *l)
 {
 	return list_get_instance(l, ehci_endpoint_t, eplist_link);
Index: uspace/drv/bus/usb/ehci/ehci_rh.h
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_rh.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/ehci_rh.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -80,6 +80,6 @@
 } ehci_rh_t;
 
-errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps, ehci_regs_t *regs,
-    fibril_mutex_t *guard, const char *name);
+errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps,
+    ehci_regs_t *regs, fibril_mutex_t *guard, const char *name);
 errno_t ehci_rh_schedule(ehci_rh_t *instance, usb_transfer_batch_t *batch);
 errno_t ehci_rh_interrupt(ehci_rh_t *instance);
Index: uspace/drv/bus/usb/ehci/hc.h
===================================================================
--- uspace/drv/bus/usb/ehci/hc.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/hc.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -104,5 +104,6 @@
 extern errno_t hc_start(hc_device_t *);
 extern errno_t hc_setup_roothub(hc_device_t *);
-extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
+extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *,
+    const hw_res_list_parsed_t *, int *);
 extern errno_t hc_gone(hc_device_t *);
 
Index: uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -72,5 +72,5 @@
 	/* 64 bit struct only */
 	volatile uint32_t extended_bp[7];
-} __attribute__((packed,aligned(32))) itd_t;
+} __attribute__((packed, aligned(32))) itd_t;
 #endif
 /**
Index: uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/queue_head.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/hw_struct/queue_head.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -70,6 +70,5 @@
 	    QH_EP_CHAR_EP_SET(ep->endpoint) |
 	    speed[ep->device->speed] |
-	    QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)
-	);
+	    QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size));
 	if (ep->transfer_type == USB_TRANSFER_CONTROL) {
 		if (ep->device->speed != USB_SPEED_HIGH)
@@ -80,5 +79,5 @@
 	}
 	uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) |
-		    QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
+	    QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
 	if (usb_speed_is_11(ep->device->speed)) {
 		assert(ep->device->tt.dev != NULL);
Index: uspace/drv/bus/usb/ehci/hw_struct/queue_head.h
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/queue_head.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/hw_struct/queue_head.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -143,5 +143,5 @@
 	/* 64 bit struct only */
 	volatile uint32_t extended_bp[5];
-} __attribute__((packed,aligned(32))) qh_t;
+} __attribute__((packed, aligned(32))) qh_t;
 
 static inline void qh_append_qh(qh_t *qh, const qh_t *next)
Index: uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -89,5 +89,5 @@
 	/* 64 bit struct only */
 	volatile uint32_t extended_bp[2];
-} __attribute__((packed,aligned(32))) sitd_t;
+} __attribute__((packed, aligned(32))) sitd_t;
 #endif
 /**
Index: uspace/drv/bus/usb/ohci/hc.h
===================================================================
--- uspace/drv/bus/usb/ohci/hc.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/hc.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,5 +84,5 @@
 } hc_t;
 
-static inline hc_t * hcd_to_hc(hc_device_t *hcd)
+static inline hc_t *hcd_to_hc(hc_device_t *hcd)
 {
 	assert(hcd);
@@ -91,5 +91,6 @@
 
 extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *);
-extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
+extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *,
+    const hw_res_list_parsed_t *, int *);
 extern errno_t hc_gain_control(hc_device_t *);
 extern errno_t hc_start(hc_device_t *);
Index: uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,6 +84,5 @@
 	    | ((ep->endpoint & ED_STATUS_EN_MASK) << ED_STATUS_EN_SHIFT)
 	    | ((dir[ep->direction] & ED_STATUS_D_MASK) << ED_STATUS_D_SHIFT)
-	    | ((ep->max_packet_size & ED_STATUS_MPS_MASK)
-	        << ED_STATUS_MPS_SHIFT));
+	    | ((ep->max_packet_size & ED_STATUS_MPS_MASK) << ED_STATUS_MPS_SHIFT));
 
 	/* Low speed flag */
Index: uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -107,5 +107,5 @@
 #define ED_NEXT_PTR_MASK (0xfffffff0)
 #define ED_NEXT_PTR_SHIFT (0)
-} __attribute__((packed,aligned(32))) ed_t;
+} __attribute__((packed, aligned(32))) ed_t;
 
 void ed_init(ed_t *instance, const endpoint_t *ep, const td_t *td);
@@ -204,5 +204,5 @@
 {
 	assert(instance);
-	return (OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY) ? 1 : 0;
+	return !!(OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY);
 }
 
Index: uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -69,5 +69,5 @@
 #define ITD_OFFSET_CC_SHIFT (12)
 
-} __attribute__((packed,aligned(32))) itd_t;
+} __attribute__((packed, aligned(32))) itd_t;
 
 #endif
Index: uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -90,5 +90,5 @@
 	 */
 	volatile uint32_t be;
-} __attribute__((packed,aligned(32))) td_t;
+} __attribute__((packed, aligned(32))) td_t;
 
 void td_init(td_t *, const td_t *, usb_direction_t, const void *, size_t, int);
@@ -103,6 +103,6 @@
 {
 	assert(instance);
-	const int cc =(OHCI_MEM32_RD(instance->status)
-	    >> TD_STATUS_CC_SHIFT) & TD_STATUS_CC_MASK;
+	const int cc = (OHCI_MEM32_RD(instance->status) >> TD_STATUS_CC_SHIFT)
+		& TD_STATUS_CC_MASK;
 	/* This value is changed on transfer completion,
 	 * either to CC_NOERROR or and error code.
Index: uspace/drv/bus/usb/ohci/ohci_batch.h
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_batch.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/ohci_batch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -65,5 +65,5 @@
 } ohci_transfer_batch_t;
 
-ohci_transfer_batch_t * ohci_transfer_batch_create(endpoint_t *batch);
+ohci_transfer_batch_t *ohci_transfer_batch_create(endpoint_t *batch);
 int ohci_transfer_batch_prepare(ohci_transfer_batch_t *ohci_batch);
 void ohci_transfer_batch_commit(const ohci_transfer_batch_t *batch);
@@ -71,5 +71,6 @@
 void ohci_transfer_batch_destroy(ohci_transfer_batch_t *ohci_batch);
 
-static inline ohci_transfer_batch_t * ohci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
+static inline ohci_transfer_batch_t *ohci_transfer_batch_get(
+    usb_transfer_batch_t *usb_batch)
 {
 	assert(usb_batch);
Index: uspace/drv/bus/usb/ohci/ohci_bus.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_bus.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/ohci/ohci_bus.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -72,5 +72,6 @@
 /** Creates new hcd endpoint representation.
  */
-static endpoint_t *ohci_endpoint_create(device_t *dev, const usb_endpoint_descriptors_t *desc)
+static endpoint_t *ohci_endpoint_create(device_t *dev,
+    const usb_endpoint_descriptors_t *desc)
 {
 	assert(dev);
@@ -82,5 +83,6 @@
 	endpoint_init(&ohci_ep->base, dev, desc);
 
-	const errno_t err = dma_buffer_alloc(&ohci_ep->dma_buffer, sizeof(ed_t) + 2 * sizeof(td_t));
+	const errno_t err = dma_buffer_alloc(&ohci_ep->dma_buffer,
+	    sizeof(ed_t) + 2 * sizeof(td_t));
 	if (err) {
 		free(ohci_ep);
Index: uspace/drv/bus/usb/uhci/hw_struct/queue_head.h
===================================================================
--- uspace/drv/bus/usb/uhci/hw_struct/queue_head.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/uhci/hw_struct/queue_head.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -48,7 +48,10 @@
 	/** Pointer to the next entity (another QH or TD */
 	volatile link_pointer_t next;
-	/** Pointer to the contained entities (execution controlled by vertical flag*/
+	/**
+	 * Pointer to the contained entities
+	 * (execution controlled by vertical flag)
+	 */
 	volatile link_pointer_t element;
-} __attribute__((packed,aligned(16))) qh_t;
+} __attribute__((packed, aligned(16))) qh_t;
 
 /** Initialize queue head structure
Index: uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -95,5 +95,5 @@
 	 * memory just needs to be aligned. We don't use it anyway.
 	 */
-} __attribute__((packed,aligned(16))) td_t;
+} __attribute__((packed, aligned(16))) td_t;
 
 
Index: uspace/drv/bus/usb/uhci/uhci_batch.h
===================================================================
--- uspace/drv/bus/usb/uhci/uhci_batch.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/uhci/uhci_batch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -70,5 +70,5 @@
 } uhci_transfer_batch_t;
 
-uhci_transfer_batch_t * uhci_transfer_batch_create(endpoint_t *);
+uhci_transfer_batch_t *uhci_transfer_batch_create(endpoint_t *);
 int uhci_transfer_batch_prepare(uhci_transfer_batch_t *);
 bool uhci_transfer_batch_check_completed(uhci_transfer_batch_t *);
@@ -79,5 +79,5 @@
  * @return Pointer to the setup buffer.
  */
-static inline void * uhci_transfer_batch_setup_buffer(
+static inline void *uhci_transfer_batch_setup_buffer(
     const uhci_transfer_batch_t *uhci_batch)
 {
@@ -91,5 +91,5 @@
  * @return Pointer to the data buffer.
  */
-static inline void * uhci_transfer_batch_data_buffer(
+static inline void *uhci_transfer_batch_data_buffer(
     const uhci_transfer_batch_t *uhci_batch)
 {
@@ -108,5 +108,6 @@
 }
 
-static inline uhci_transfer_batch_t *uhci_transfer_batch_get(usb_transfer_batch_t *b)
+static inline uhci_transfer_batch_t *uhci_transfer_batch_get(
+    usb_transfer_batch_t *b)
 {
 	assert(b);
Index: uspace/drv/bus/usb/usbdiag/device.h
===================================================================
--- uspace/drv/bus/usb/usbdiag/device.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/usbdiag/device.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -77,8 +77,9 @@
 } usbdiag_dev_t;
 
-errno_t usbdiag_dev_create(usb_device_t *, usbdiag_dev_t **, const usb_endpoint_description_t **);
+errno_t usbdiag_dev_create(usb_device_t *, usbdiag_dev_t **,
+    const usb_endpoint_description_t **);
 void usbdiag_dev_destroy(usbdiag_dev_t *);
 
-static inline usbdiag_dev_t * usb_device_to_usbdiag_dev(usb_device_t *usb_dev)
+static inline usbdiag_dev_t *usb_device_to_usbdiag_dev(usb_device_t *usb_dev)
 {
 	assert(usb_dev);
@@ -86,5 +87,5 @@
 }
 
-static inline usbdiag_dev_t * ddf_dev_to_usbdiag_dev(ddf_dev_t *ddf_dev)
+static inline usbdiag_dev_t *ddf_dev_to_usbdiag_dev(ddf_dev_t *ddf_dev)
 {
 	assert(ddf_dev);
@@ -92,5 +93,5 @@
 }
 
-static inline usbdiag_dev_t * ddf_fun_to_usbdiag_dev(ddf_fun_t *ddf_fun)
+static inline usbdiag_dev_t *ddf_fun_to_usbdiag_dev(ddf_fun_t *ddf_fun)
 {
 	assert(ddf_fun);
Index: uspace/drv/bus/usb/usbdiag/tests.h
===================================================================
--- uspace/drv/bus/usb/usbdiag/tests.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/usbdiag/tests.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -39,6 +39,8 @@
 #include <ddf/driver.h>
 
-errno_t usbdiag_dev_test_in(ddf_fun_t *, const usbdiag_test_params_t *, usbdiag_test_results_t *);
-errno_t usbdiag_dev_test_out(ddf_fun_t *, const usbdiag_test_params_t *, usbdiag_test_results_t *);
+errno_t usbdiag_dev_test_in(ddf_fun_t *, const usbdiag_test_params_t *,
+    usbdiag_test_results_t *);
+errno_t usbdiag_dev_test_out(ddf_fun_t *, const usbdiag_test_params_t *,
+    usbdiag_test_results_t *);
 
 #endif /* USBDIAG_TESTS_H_ */
Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -49,5 +49,8 @@
 #include "status.h"
 
-#define port_log(lvl, port, fmt, ...) do { usb_log_##lvl("(%p-%u): " fmt, (port->hub), (port->port_number), ##__VA_ARGS__); } while (0)
+#define port_log(lvl, port, fmt, ...) do { \
+		usb_log_##lvl("(%p-%u): " fmt, \
+		    (port->hub), (port->port_number), ##__VA_ARGS__); \
+	} while (0)
 
 /** Initialize hub port information.
@@ -55,5 +58,6 @@
  * @param port Port to be initialized.
  */
-void usb_hub_port_init(usb_hub_port_t *port, usb_hub_dev_t *hub, unsigned int port_number)
+void usb_hub_port_init(usb_hub_port_t *port, usb_hub_dev_t *hub,
+    unsigned int port_number)
 {
 	assert(port);
@@ -79,5 +83,6 @@
 	async_exch_t *exch = usb_device_bus_exchange_begin(port->hub->usb_device);
 	if (!exch) {
-		port_log(error, port, "Cannot remove the device, failed creating exchange.");
+		port_log(error, port, "Cannot remove the device, "
+		    "failed creating exchange.");
 		return;
 	}
@@ -85,5 +90,6 @@
 	const errno_t err = usbhc_device_remove(exch, port->port_number);
 	if (err)
-		port_log(error, port, "Failed to remove device: %s", str_error(err));
+		port_log(error, port, "Failed to remove device: %s",
+		    str_error(err));
 
 	usb_device_bus_exchange_end(exch);
@@ -109,5 +115,6 @@
 	err = usb_hub_reserve_default_address(port->hub, exch, &port->base);
 	if (err != EOK) {
-		port_log(error, port, "Failed to reserve default address: %s", str_error(err));
+		port_log(error, port, "Failed to reserve default address: %s",
+		    str_error(err));
 		return err;
 	}
@@ -118,19 +125,25 @@
 
 	port_log(debug, port, "Resetting port.");
-	if ((err = usb_hub_set_port_feature(port->hub, port->port_number, USB_HUB_FEATURE_PORT_RESET))) {
-		port_log(warning, port, "Port reset request failed: %s", str_error(err));
+	if ((err = usb_hub_set_port_feature(port->hub, port->port_number,
+			    USB_HUB_FEATURE_PORT_RESET))) {
+		port_log(warning, port, "Port reset request failed: %s",
+		    str_error(err));
 		goto out_address;
 	}
 
 	if ((err = usb_port_wait_for_enabled(&port->base))) {
-		port_log(error, port, "Failed to reset port: %s", str_error(err));
+		port_log(error, port, "Failed to reset port: %s",
+		    str_error(err));
 		goto out_address;
 	}
 
 	port_log(debug, port, "Enumerating device.");
-	if ((err = usbhc_device_enumerate(exch, port->port_number, port->speed))) {
-		port_log(error, port, "Failed to enumerate device: %s", str_error(err));
+	if ((err = usbhc_device_enumerate(exch, port->port_number,
+			    port->speed))) {
+		port_log(error, port, "Failed to enumerate device: %s",
+		    str_error(err));
 		/* Disable the port */
-		usb_hub_clear_port_feature(port->hub, port->port_number, USB2_HUB_FEATURE_PORT_ENABLE);
+		usb_hub_clear_port_feature(port->hub, port->port_number,
+		    USB2_HUB_FEATURE_PORT_ENABLE);
 		goto out_address;
 	}
@@ -151,17 +164,22 @@
 
 	port_log(debug, port, "Issuing a warm reset.");
-	if ((err = usb_hub_set_port_feature(port->hub, port->port_number, USB3_HUB_FEATURE_BH_PORT_RESET))) {
-		port_log(warning, port, "Port reset request failed: %s", str_error(err));
+	if ((err = usb_hub_set_port_feature(port->hub, port->port_number,
+			    USB3_HUB_FEATURE_BH_PORT_RESET))) {
+		port_log(warning, port, "Port reset request failed: %s",
+		    str_error(err));
 		return err;
 	}
 
 	if ((err = usb_port_wait_for_enabled(&port->base))) {
-		port_log(error, port, "Failed to reset port: %s", str_error(err));
+		port_log(error, port, "Failed to reset port: %s",
+		    str_error(err));
 		return err;
 	}
 
 	port_log(debug, port, "Enumerating device.");
-	if ((err = usbhc_device_enumerate(exch, port->port_number, port->speed))) {
-		port_log(error, port, "Failed to enumerate device: %s", str_error(err));
+	if ((err = usbhc_device_enumerate(exch, port->port_number,
+			    port->speed))) {
+		port_log(error, port, "Failed to enumerate device: %s",
+		    str_error(err));
 		return err;
 	}
@@ -193,5 +211,6 @@
 {
 	const bool connected = !!(status & USB_HUB_PORT_STATUS_CONNECTION);
-	port_log(debug, port, "Connection change: device %s.", connected ? "attached" : "removed");
+	port_log(debug, port, "Connection change: device %s.", connected
+	    ? "attached" : "removed");
 
 	if (connected) {
@@ -212,5 +231,6 @@
 }
 
-static void port_changed_overcurrent(usb_hub_port_t *port, usb_port_status_t status)
+static void port_changed_overcurrent(usb_hub_port_t *port,
+    usb_port_status_t status)
 {
 	const bool overcurrent = !!(status & USB_HUB_PORT_STATUS_OC);
@@ -225,7 +245,9 @@
 
 	if (!overcurrent) {
-		const errno_t err = usb_hub_set_port_feature(port->hub, port->port_number, USB_HUB_FEATURE_PORT_POWER);
+		const errno_t err = usb_hub_set_port_feature(port->hub,
+		    port->port_number, USB_HUB_FEATURE_PORT_POWER);
 		if (err)
-			port_log(error, port, "Failed to set port power after OC: %s.", str_error(err));
+			port_log(error, port, "Failed to set port power "
+			    "after OC: %s.", str_error(err));
 	}
 }
@@ -245,5 +267,6 @@
 
 static void check_port_change(usb_hub_port_t *port, usb_port_status_t *status,
-    change_handler_t handler, usb_port_status_t mask, usb_hub_class_feature_t feature)
+    change_handler_t handler, usb_port_status_t mask,
+    usb_hub_class_feature_t feature)
 {
 	if ((*status & mask) == 0)
@@ -273,12 +296,15 @@
 
 	usb_port_status_t status = 0;
-	const errno_t err = usb_hub_get_port_status(port->hub, port->port_number, &status);
+	const errno_t err = usb_hub_get_port_status(port->hub,
+	    port->port_number, &status);
 	if (err != EOK) {
-		port_log(error, port, "Failed to get port status: %s.", str_error(err));
+		port_log(error, port, "Failed to get port status: %s.",
+		    str_error(err));
 		return;
 	}
 
 	check_port_change(port, &status, &port_changed_connection,
-	    USB_HUB_PORT_STATUS_C_CONNECTION, USB_HUB_FEATURE_C_PORT_CONNECTION);
+	    USB_HUB_PORT_STATUS_C_CONNECTION,
+	    USB_HUB_FEATURE_C_PORT_CONNECTION);
 
 	check_port_change(port, &status, &port_changed_overcurrent,
@@ -290,16 +316,20 @@
 	if (port->hub->speed <= USB_SPEED_HIGH) {
 		check_port_change(port, &status, &port_changed_enabled,
-		    USB2_HUB_PORT_STATUS_C_ENABLE, USB2_HUB_FEATURE_C_PORT_ENABLE);
+		    USB2_HUB_PORT_STATUS_C_ENABLE,
+		    USB2_HUB_FEATURE_C_PORT_ENABLE);
 	} else {
 		check_port_change(port, &status, &port_changed_reset,
-		    USB3_HUB_PORT_STATUS_C_BH_RESET, USB3_HUB_FEATURE_C_BH_PORT_RESET);
+		    USB3_HUB_PORT_STATUS_C_BH_RESET,
+		    USB3_HUB_FEATURE_C_BH_PORT_RESET);
 
 		check_port_change(port, &status, NULL,
-		    USB3_HUB_PORT_STATUS_C_LINK_STATE, USB3_HUB_FEATURE_C_PORT_LINK_STATE);
+		    USB3_HUB_PORT_STATUS_C_LINK_STATE,
+		    USB3_HUB_FEATURE_C_PORT_LINK_STATE);
 	}
 
 	/* Check for changes we ignored */
 	if (status & 0xffff0000) {
-		port_log(debug, port, "Port status change igored. Status: %#08" PRIx32, status);
+		port_log(debug, port, "Port status change igored. "
+		    "Status: %#08" PRIx32, status);
 	}
 }
Index: uspace/drv/bus/usb/usbhub/status.h
===================================================================
--- uspace/drv/bus/usb/usbhub/status.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/usbhub/status.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -59,5 +59,6 @@
 	if (hub_speed == USB_SPEED_SUPER)
 		return USB_SPEED_SUPER;
-	if (hub_speed == USB_SPEED_HIGH && (status & USB2_HUB_PORT_STATUS_HIGH_SPEED))
+	if (hub_speed == USB_SPEED_HIGH
+	    && (status & USB2_HUB_PORT_STATUS_HIGH_SPEED))
 		return USB_SPEED_HIGH;
 	if ((status & USB2_HUB_PORT_STATUS_LOW_SPEED) != 0)
Index: uspace/drv/bus/usb/usbhub/usbhub.h
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/usbhub/usbhub.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,11 +84,15 @@
 
 errno_t usb_hub_set_depth(const usb_hub_dev_t *);
-errno_t usb_hub_get_port_status(const usb_hub_dev_t *, size_t, usb_port_status_t *);
-errno_t usb_hub_set_port_feature(const usb_hub_dev_t *, size_t, usb_hub_class_feature_t);
-errno_t usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t, usb_hub_class_feature_t);
+errno_t usb_hub_get_port_status(const usb_hub_dev_t *, size_t,
+    usb_port_status_t *);
+errno_t usb_hub_set_port_feature(const usb_hub_dev_t *, size_t,
+    usb_hub_class_feature_t);
+errno_t usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t,
+    usb_hub_class_feature_t);
 
 bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, void *);
 
-errno_t usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *, usb_port_t *);
+errno_t usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *,
+    usb_port_t *);
 errno_t usb_hub_release_default_address(usb_hub_dev_t *, async_exch_t *);
 
Index: uspace/drv/bus/usb/usbmid/dump.c
===================================================================
--- uspace/drv/bus/usb/usbmid/dump.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/usbmid/dump.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -54,6 +54,6 @@
 	const int type = data[1];
 	if (type == USB_DESCTYPE_INTERFACE) {
-		usb_standard_interface_descriptor_t *descriptor
-		    = (usb_standard_interface_descriptor_t *) data;
+		usb_standard_interface_descriptor_t *descriptor =
+		    (usb_standard_interface_descriptor_t *) data;
 		usb_log_info("Found interface: %s (0x%02x/0x%02x/0x%02x).",
 		    usb_str_class(descriptor->interface_class),
Index: uspace/drv/bus/usb/vhc/hub/hub.c
===================================================================
--- uspace/drv/bus/usb/vhc/hub/hub.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/vhc/hub/hub.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -68,24 +68,25 @@
 
 /** Convert hub port state to a char. */
-char hub_port_state_to_char(hub_port_state_t state) {
+char hub_port_state_to_char(hub_port_state_t state)
+{
 	switch (state) {
-		case HUB_PORT_STATE_NOT_CONFIGURED:
-			return '-';
-		case HUB_PORT_STATE_POWERED_OFF:
-			return 'O';
-		case HUB_PORT_STATE_DISCONNECTED:
-			return 'X';
-		case HUB_PORT_STATE_DISABLED:
-			return 'D';
-		case HUB_PORT_STATE_RESETTING:
-			return 'R';
-		case HUB_PORT_STATE_ENABLED:
-			return 'E';
-		case HUB_PORT_STATE_SUSPENDED:
-			return 'S';
-		case HUB_PORT_STATE_RESUMING:
-			return 'F';
-		default:
-			return '?';
+	case HUB_PORT_STATE_NOT_CONFIGURED:
+		return '-';
+	case HUB_PORT_STATE_POWERED_OFF:
+		return 'O';
+	case HUB_PORT_STATE_DISCONNECTED:
+		return 'X';
+	case HUB_PORT_STATE_DISABLED:
+		return 'D';
+	case HUB_PORT_STATE_RESETTING:
+		return 'R';
+	case HUB_PORT_STATE_ENABLED:
+		return 'E';
+	case HUB_PORT_STATE_SUSPENDED:
+		return 'S';
+	case HUB_PORT_STATE_RESUMING:
+		return 'F';
+	default:
+		return '?';
 	}
 }
@@ -234,26 +235,26 @@
 
 	switch (state) {
-		case HUB_PORT_STATE_POWERED_OFF:
-			clear_port_status_change(port, HUB_STATUS_C_PORT_CONNECTION);
-			clear_port_status_change(port, HUB_STATUS_C_PORT_ENABLE);
-			clear_port_status_change(port, HUB_STATUS_C_PORT_RESET);
-			break;
-		case HUB_PORT_STATE_RESUMING:
-			port->state = state;
-			set_port_state_delayed(hub, port_index,
-			    10, state, HUB_PORT_STATE_ENABLED);
-			break;
-		case HUB_PORT_STATE_RESETTING:
-			port->state = state;
-			set_port_state_delayed(hub, port_index,
-			    10, state, HUB_PORT_STATE_ENABLED);
-			break;
-		case HUB_PORT_STATE_ENABLED:
-			if (port->state == HUB_PORT_STATE_RESETTING) {
-				set_port_status_change(port, HUB_STATUS_C_PORT_RESET);
-			}
-			break;
-		default:
-			break;
+	case HUB_PORT_STATE_POWERED_OFF:
+		clear_port_status_change(port, HUB_STATUS_C_PORT_CONNECTION);
+		clear_port_status_change(port, HUB_STATUS_C_PORT_ENABLE);
+		clear_port_status_change(port, HUB_STATUS_C_PORT_RESET);
+		break;
+	case HUB_PORT_STATE_RESUMING:
+		port->state = state;
+		set_port_state_delayed(hub, port_index,
+		    10, state, HUB_PORT_STATE_ENABLED);
+		break;
+	case HUB_PORT_STATE_RESETTING:
+		port->state = state;
+		set_port_state_delayed(hub, port_index,
+		    10, state, HUB_PORT_STATE_ENABLED);
+		break;
+	case HUB_PORT_STATE_ENABLED:
+		if (port->state == HUB_PORT_STATE_RESETTING) {
+			set_port_status_change(port, HUB_STATUS_C_PORT_RESET);
+		}
+		break;
+	default:
+		break;
 	}
 
@@ -336,6 +337,5 @@
 	}
 
-	uint32_t status;
-	status = MAKE_BYTE(
+	uint32_t status = MAKE_BYTE(
 	    /* Current connect status. */
 	    port->connected_device == NULL ? 0 : 1,
@@ -344,5 +344,5 @@
 	    /* Suspend. */
 	    (port->state == HUB_PORT_STATE_SUSPENDED)
-		|| (port->state == HUB_PORT_STATE_RESUMING) ? 1 : 0,
+	    || (port->state == HUB_PORT_STATE_RESUMING) ? 1 : 0,
 	    /* Over-current. */
 	    0,
@@ -350,7 +350,7 @@
 	    port->state == HUB_PORT_STATE_RESETTING ? 1 : 0,
 	    /* Reserved. */
-	    0, 0, 0)
-
-	    | (MAKE_BYTE(
+	    0, 0, 0);
+
+	status |= MAKE_BYTE(
 	    /* Port power. */
 	    port->state == HUB_PORT_STATE_POWERED_OFF ? 0 : 1,
@@ -359,5 +359,5 @@
 	    /* Reserved. */
 	    0, 0, 0, 0, 0, 0
-	    )) << 8;
+	    ) << 8;
 
 	status |= (port->status_change << 16);
@@ -463,6 +463,6 @@
 static errno_t set_port_state_delayed_fibril(void *arg)
 {
-	struct delay_port_state_change *change
-	    = (struct delay_port_state_change *) arg;
+	struct delay_port_state_change *change =
+	    (struct delay_port_state_change *) arg;
 
 	async_usleep(change->delay);
@@ -500,6 +500,6 @@
     hub_port_state_t old_state, hub_port_state_t new_state)
 {
-	struct delay_port_state_change *change
-	    = malloc(sizeof(struct delay_port_state_change));
+	struct delay_port_state_change *change =
+	    malloc(sizeof(struct delay_port_state_change));
 
 	change->hub = hub;
Index: uspace/drv/bus/usb/vhc/transfer.c
===================================================================
--- uspace/drv/bus/usb/vhc/transfer.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/vhc/transfer.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -50,6 +50,6 @@
 		return false;
 	}
-	const usb_device_request_setup_packet_t *setup
-		= &transfer->batch.setup.packet;
+	const usb_device_request_setup_packet_t *setup =
+	    &transfer->batch.setup.packet;
 	if (setup->request_type != 0) {
 		return false;
@@ -139,6 +139,7 @@
 	assert(!list_empty(&dev->transfer_queue));
 
-	vhc_transfer_t *transfer = list_get_instance(
-	    list_first(&dev->transfer_queue), vhc_transfer_t, link);
+	vhc_transfer_t *transfer =
+	    list_get_instance(list_first(&dev->transfer_queue),
+	    vhc_transfer_t, link);
 	list_remove(&transfer->link);
 
@@ -258,5 +259,6 @@
 			    dev->dev_local, &data_transfer_size);
 		} else {
-			usb_log_warning("Device has no remote phone nor local node.");
+			usb_log_warning("Device has no remote phone "
+			    "nor local node.");
 			rc = ESTALL;
 		}
@@ -269,5 +271,5 @@
 			if (is_set_address_transfer(transfer)) {
 				usb_device_request_setup_packet_t *setup =
-				    (void*) transfer->batch.setup.buffer;
+				    (void *) transfer->batch.setup.buffer;
 				dev->address = setup->value;
 				usb_log_debug2("Address changed to %d",
Index: uspace/drv/bus/usb/vhc/vhcd.h
===================================================================
--- uspace/drv/bus/usb/vhc/vhcd.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/vhc/vhcd.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -93,5 +93,6 @@
 errno_t vhc_virtdev_plug(vhc_data_t *, async_sess_t *, uintptr_t *);
 errno_t vhc_virtdev_plug_local(vhc_data_t *, usbvirt_device_t *, uintptr_t *);
-errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *, usb_address_t address);
+errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *,
+    usb_address_t address);
 void vhc_virtdev_unplug(vhc_data_t *, uintptr_t);
 
Index: uspace/drv/bus/usb/xhci/bus.h
===================================================================
--- uspace/drv/bus/usb/xhci/bus.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/bus.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -45,9 +45,7 @@
 /** Endpoint management structure */
 typedef struct xhci_bus {
-	bus_t base;		/**< Inheritance. Keep this first. */
-
-	xhci_hc_t *hc;				/**< Pointer to managing HC (to issue commands) */
-
-	xhci_device_t **devices_by_slot;	/**< Devices by Slot ID */
+	bus_t base; /**< Inheritance. Keep this first. */
+	xhci_hc_t *hc; /**< Pointer to managing HC (to issue commands) */
+	xhci_device_t **devices_by_slot; /**< Devices by Slot ID */
 } xhci_bus_t;
 
Index: uspace/drv/bus/usb/xhci/commands.c
===================================================================
--- uspace/drv/bus/usb/xhci/commands.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/commands.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -150,5 +150,6 @@
 
 	while (cmd_link != NULL) {
-		xhci_cmd_t *cmd = list_get_instance(cmd_link, xhci_cmd_t, _header.link);
+		xhci_cmd_t *cmd = list_get_instance(cmd_link, xhci_cmd_t,
+		    _header.link);
 
 		if (cmd->_header.trb_phys == phys)
@@ -158,6 +159,7 @@
 	}
 
-	return cmd_link ? list_get_instance(cmd_link, xhci_cmd_t, _header.link)
-		: NULL;
+	return cmd_link
+	    ? list_get_instance(cmd_link, xhci_cmd_t, _header.link)
+	    : NULL;
 }
 
@@ -167,6 +169,5 @@
 
 	cr->state = state;
-	if (state == XHCI_CR_STATE_OPEN
-	    || state == XHCI_CR_STATE_CLOSED)
+	if (state == XHCI_CR_STATE_OPEN || state == XHCI_CR_STATE_CLOSED)
 		fibril_condvar_broadcast(&cr->state_cv);
 }
@@ -206,5 +207,6 @@
 	}
 
-	usb_log_debug("Sending command %s", xhci_trb_str_type(TRB_TYPE(cmd->_header.trb)));
+	usb_log_debug("Sending command %s",
+	    xhci_trb_str_type(TRB_TYPE(cmd->_header.trb)));
 
 	list_append(&cmd->_header.link, &cr->cmd_list);
@@ -337,5 +339,6 @@
 		usb_log_error("Command resulted in error: %s.", trb_codes[code]);
 	else
-		usb_log_error("Command resulted in reserved or vendor specific error.");
+		usb_log_error("Command resulted in reserved or "
+		    "vendor specific error.");
 }
 
@@ -657,5 +660,6 @@
 	}
 
-	usb_log_error("Timeout while waiting for command: aborting current command.");
+	usb_log_error("Timeout while waiting for command: "
+	    "aborting current command.");
 
 	cr_set_state(cr, XHCI_CR_STATE_CHANGING);
@@ -663,5 +667,6 @@
 	abort_command_ring(hc);
 
-	fibril_condvar_wait_timeout(&cr->stopped_cv, &cr->guard, XHCI_CR_ABORT_TIMEOUT);
+	fibril_condvar_wait_timeout(&cr->stopped_cv, &cr->guard,
+	    XHCI_CR_ABORT_TIMEOUT);
 
 	if (XHCI_REG_RD(hc->op_regs, XHCI_OP_CRR)) {
Index: uspace/drv/bus/usb/xhci/commands.h
===================================================================
--- uspace/drv/bus/usb/xhci/commands.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/commands.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -70,8 +70,8 @@
 
 typedef enum {
-	XHCI_CR_STATE_CLOSED,		/**< Commands are rejected with ENAK. */
-	XHCI_CR_STATE_OPEN,		/**< Commands are enqueued normally. */
-	XHCI_CR_STATE_CHANGING,		/**< Commands wait until state changes. */
-	XHCI_CR_STATE_FULL,		/**< Commands wait until something completes. */
+	XHCI_CR_STATE_CLOSED,	/**< Commands are rejected with ENAK. */
+	XHCI_CR_STATE_OPEN,	/**< Commands are enqueued normally. */
+	XHCI_CR_STATE_CHANGING,	/**< Commands wait until state changes. */
+	XHCI_CR_STATE_FULL,	/**< Commands wait until something completes. */
 } xhci_cr_state_t;
 
Index: uspace/drv/bus/usb/xhci/debug.h
===================================================================
--- uspace/drv/bus/usb/xhci/debug.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/debug.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -63,5 +63,6 @@
 extern void xhci_dump_slot_ctx(const struct xhci_slot_ctx *);
 extern void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *);
-extern void xhci_dump_input_ctx(const struct xhci_hc *, const struct xhci_input_ctx *);
+extern void xhci_dump_input_ctx(const struct xhci_hc *,
+    const struct xhci_input_ctx *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/device.h
===================================================================
--- uspace/drv/bus/usb/xhci/device.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/device.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -62,5 +62,5 @@
 
 #define XHCI_DEV_FMT  "(%s, slot %d)"
-#define XHCI_DEV_ARGS(dev)		 ddf_fun_get_name((dev).base.fun), (dev).slot_id
+#define XHCI_DEV_ARGS(dev)	ddf_fun_get_name((dev).base.fun), (dev).slot_id
 
 /* Bus callbacks */
@@ -72,5 +72,5 @@
 void xhci_setup_slot_context(xhci_device_t *, xhci_slot_ctx_t *);
 
-static inline xhci_device_t * xhci_device_get(device_t *dev)
+static inline xhci_device_t *xhci_device_get(device_t *dev)
 {
 	assert(dev);
Index: uspace/drv/bus/usb/xhci/endpoint.h
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/endpoint.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -76,5 +76,8 @@
 	xhci_trb_ring_t ring;
 
-	/** Primary stream context data array (or NULL if endpoint doesn't use streams). */
+	/**
+	 * Primary stream context data array
+	 * (or NULL if endpoint doesn't use streams).
+	 */
 	xhci_stream_data_t *primary_stream_data_array;
 
@@ -83,5 +86,5 @@
 	dma_buffer_t primary_stream_ctx_dma;
 
-	/** Size of the allocated primary stream data array (and context array). */
+	/** Size of the allocated primary stream data and context array. */
 	uint16_t primary_stream_data_size;
 
@@ -89,14 +92,26 @@
 	uint32_t max_streams;
 
-	/** Maximum number of consecutive USB transactions (0-15) that should be executed per scheduling opportunity */
+	/**
+	 * Maximum number of consecutive USB transactions (0-15) that
+	 * should be executed per scheduling opportunity
+	 */
 	uint8_t max_burst;
 
-	/** Maximum number of bursts within an interval that this endpoint supports */
+	/**
+	 * Maximum number of bursts within an interval that
+	 * this endpoint supports
+	 */
 	uint8_t mult;
 
-	/** Scheduling interval for periodic endpoints, as a number of 125us units. (0 - 2^16) */
+	/**
+	 * Scheduling interval for periodic endpoints,
+	 * as a number of 125us units. (0 - 2^16)
+	 */
 	uint32_t interval;
 
-	/** This field is a valid pointer for (and only for) isochronous transfers. */
+	/**
+	 * This field is a valid pointer for (and only for) isochronous
+	 * endpoints.
+	 */
 	xhci_isoch_t isoch [0];
 } xhci_endpoint_t;
@@ -111,5 +126,6 @@
 extern int xhci_endpoint_type(xhci_endpoint_t *ep);
 
-extern endpoint_t *xhci_endpoint_create(device_t *, const usb_endpoint_descriptors_t *);
+extern endpoint_t *xhci_endpoint_create(device_t *,
+    const usb_endpoint_descriptors_t *);
 extern errno_t xhci_endpoint_register(endpoint_t *);
 extern void xhci_endpoint_unregister(endpoint_t *);
@@ -122,5 +138,5 @@
 extern errno_t xhci_endpoint_clear_halt(xhci_endpoint_t *, unsigned);
 
-static inline xhci_endpoint_t * xhci_endpoint_get(endpoint_t *ep)
+static inline xhci_endpoint_t *xhci_endpoint_get(endpoint_t *ep)
 {
 	assert(ep);
@@ -128,5 +144,5 @@
 }
 
-static inline xhci_device_t * xhci_ep_to_dev(xhci_endpoint_t *ep)
+static inline xhci_device_t *xhci_ep_to_dev(xhci_endpoint_t *ep)
 {
 	assert(ep);
Index: uspace/drv/bus/usb/xhci/hc.h
===================================================================
--- uspace/drv/bus/usb/xhci/hc.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/hc.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -95,7 +95,7 @@
 	bool ac64;
 	bool csz;
-	uint64_t wrap_time;		/** The last time when mfindex wrap happened */
-	uint64_t wrap_count;	/** Amount of mfindex wraps HC has done */
-	unsigned ist;			/**< IST in microframes */
+	uint64_t wrap_time;	/**< The last time when mfindex wrap happened */
+	uint64_t wrap_count;	/**< Amount of mfindex wraps HC has done */
+	unsigned ist;		/**< IST in microframes */
 
 	/** Port speed mapping */
Index: uspace/drv/bus/usb/xhci/hw_struct/context.h
===================================================================
--- uspace/drv/bus/usb/xhci/hw_struct/context.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/hw_struct/context.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -179,5 +179,6 @@
 #define XHCI_CTX_SIZE_SMALL 32
 #define XHCI_ONE_CTX_SIZE(hc) (XHCI_CTX_SIZE_SMALL << hc->csz)
-#define XHCI_GET_CTX_FIELD(type, ctx, hc, ci) (xhci_##type##_ctx_to_charptr(ctx) + (ci) * XHCI_ONE_CTX_SIZE(hc))
+#define XHCI_GET_CTX_FIELD(type, ctx, hc, ci) \
+    (xhci_##type##_ctx_to_charptr(ctx) + (ci) * XHCI_ONE_CTX_SIZE(hc))
 
 /**
@@ -185,6 +186,8 @@
  */
 #define XHCI_DEVICE_CTX_SIZE(hc) ((1 + XHCI_EP_COUNT) * XHCI_ONE_CTX_SIZE(hc))
-#define XHCI_GET_EP_CTX(dev_ctx, hc, dci) ((xhci_ep_ctx_t *)   XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), (dci)))
-#define XHCI_GET_SLOT_CTX(dev_ctx, hc)    ((xhci_slot_ctx_t *) XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), 0))
+#define XHCI_GET_EP_CTX(dev_ctx, hc, dci) \
+    ((xhci_ep_ctx_t *)   XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), (dci)))
+#define XHCI_GET_SLOT_CTX(dev_ctx, hc) \
+    ((xhci_slot_ctx_t *) XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), 0))
 
 /**
@@ -210,8 +213,8 @@
 typedef struct xhci_stream_ctx {
 	uint64_t data [2];
-#define XHCI_STREAM_DCS(ctx)       XHCI_QWORD_EXTRACT((ctx).data[0],  0, 0)
-#define XHCI_STREAM_SCT(ctx)       XHCI_QWORD_EXTRACT((ctx).data[0],  3, 1)
-#define XHCI_STREAM_DEQ_PTR(ctx)   (XHCI_QWORD_EXTRACT((ctx).data[0], 63, 4) << 4)
-#define XHCI_STREAM_EDTLA(ctx)     XHCI_QWORD_EXTRACT((ctx).data[1], 24, 0)
+#define XHCI_STREAM_DCS(ctx)     XHCI_QWORD_EXTRACT((ctx).data[0],  0, 0)
+#define XHCI_STREAM_SCT(ctx)     XHCI_QWORD_EXTRACT((ctx).data[0],  3, 1)
+#define XHCI_STREAM_DEQ_PTR(ctx) (XHCI_QWORD_EXTRACT((ctx).data[0], 63, 4) << 4)
+#define XHCI_STREAM_EDTLA(ctx)   XHCI_QWORD_EXTRACT((ctx).data[1], 24, 0)
 
 #define XHCI_STREAM_SCT_SET(ctx, val) \
@@ -232,5 +235,5 @@
 	uint32_t data [8];
 #define XHCI_INPUT_CTRL_CTX_DROP(ctx, idx) \
-	XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx))
+    XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx))
 
 #define XHCI_INPUT_CTRL_CTX_DROP_SET(ctx, idx) (ctx).data[0] |= (1 << (idx))
@@ -238,12 +241,15 @@
 
 #define XHCI_INPUT_CTRL_CTX_ADD(ctx, idx) \
-	XHCI_DWORD_EXTRACT((ctx).data[1], (idx), (idx))
+    XHCI_DWORD_EXTRACT((ctx).data[1], (idx), (idx))
 
 #define XHCI_INPUT_CTRL_CTX_ADD_SET(ctx, idx) (ctx).data[1] |= (1 << (idx))
 #define XHCI_INPUT_CTRL_CTX_ADD_CLEAR(ctx, idx) (ctx).data[1] &= ~(1 << (idx))
 
-#define XHCI_INPUT_CTRL_CTX_CONFIG_VALUE(ctx)   XHCI_DWORD_EXTRACT((ctx).data[7],  7,  0)
-#define XHCI_INPUT_CTRL_CTX_IFACE_NUMBER(ctx)   XHCI_DWORD_EXTRACT((ctx).data[7], 15,  8)
-#define XHCI_INPUT_CTRL_CTX_ALTER_SETTING(ctx)  XHCI_DWORD_EXTRACT((ctx).data[7], 23, 16)
+#define XHCI_INPUT_CTRL_CTX_CONFIG_VALUE(ctx) \
+    XHCI_DWORD_EXTRACT((ctx).data[7],  7,  0)
+#define XHCI_INPUT_CTRL_CTX_IFACE_NUMBER(ctx) \
+    XHCI_DWORD_EXTRACT((ctx).data[7], 15,  8)
+#define XHCI_INPUT_CTRL_CTX_ALTER_SETTING(ctx) \
+    XHCI_DWORD_EXTRACT((ctx).data[7], 23, 16)
 } __attribute__((packed)) xhci_input_ctrl_ctx_t;
 
@@ -252,6 +258,8 @@
  */
 #define XHCI_INPUT_CTX_SIZE(hc) (XHCI_ONE_CTX_SIZE(hc) + XHCI_DEVICE_CTX_SIZE(hc))
-#define XHCI_GET_CTRL_CTX(ictx, hc)  ((xhci_input_ctrl_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 0))
-#define XHCI_GET_DEVICE_CTX(dev_ctx, hc) ((xhci_device_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 1))
+#define XHCI_GET_CTRL_CTX(ictx, hc) \
+    ((xhci_input_ctrl_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 0))
+#define XHCI_GET_DEVICE_CTX(dev_ctx, hc) \
+    ((xhci_device_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 1))
 
 typedef struct xhci_input_ctx {
Index: uspace/drv/bus/usb/xhci/hw_struct/trb.h
===================================================================
--- uspace/drv/bus/usb/xhci/hw_struct/trb.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/hw_struct/trb.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -160,5 +160,6 @@
  * The Chain bit is valid only in specific TRB types.
  */
-static inline bool xhci_trb_is_chained(xhci_trb_t *trb) {
+static inline bool xhci_trb_is_chained(xhci_trb_t *trb)
+{
 	const int type = TRB_TYPE(*trb);
 	const bool chain_bit = XHCI_DWORD_EXTRACT(trb->control, 4, 4);
Index: uspace/drv/bus/usb/xhci/isoch.h
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/isoch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,5 +84,8 @@
 	fibril_timer_t *reset_timer;
 
-	/** The maximum size of an isochronous transfer and therefore the size of buffers */
+	/**
+	 * The maximum size of an isochronous transfer
+	 * and therefore the size of buffers
+	 */
 	size_t max_size;
 
@@ -123,5 +126,6 @@
 extern errno_t isoch_schedule_out(xhci_transfer_t *);
 extern errno_t isoch_schedule_in(xhci_transfer_t *);
-extern void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *, xhci_trb_t *);
+extern void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *,
+    xhci_trb_t *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/main.c
===================================================================
--- uspace/drv/bus/usb/xhci/main.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/main.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -68,5 +68,6 @@
 }
 
-static errno_t hcd_irq_code_gen(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
+static errno_t hcd_irq_code_gen(irq_code_t *code, hc_device_t *hcd,
+    const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	xhci_hc_t *hc = hcd_to_hc(hcd);
Index: uspace/drv/bus/usb/xhci/streams.h
===================================================================
--- uspace/drv/bus/usb/xhci/streams.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/streams.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -48,5 +48,8 @@
 	xhci_trb_ring_t ring;
 
-	/** Pointer to the array of secondary stream context data for primary data. */
+	/**
+	 * Pointer to the array of secondary stream context data for primary
+	 * data.
+	 */
 	xhci_stream_data_t *secondary_data;
 
@@ -61,12 +64,13 @@
 } xhci_stream_data_t;
 
-extern xhci_stream_data_t *xhci_get_stream_ctx_data(xhci_endpoint_t *ep, uint32_t stream_id);
-extern void xhci_stream_free_ds(xhci_endpoint_t *xhci_ep);
+extern xhci_stream_data_t *xhci_get_stream_ctx_data(xhci_endpoint_t *, uint32_t);
+extern void xhci_stream_free_ds(xhci_endpoint_t *);
 
-extern errno_t xhci_endpoint_remove_streams(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *xhci_ep);
-extern errno_t xhci_endpoint_request_primary_streams(xhci_hc_t *hc, xhci_device_t *dev,
-    xhci_endpoint_t *xhci_ep, unsigned count);
-extern errno_t xhci_endpoint_request_secondary_streams(xhci_hc_t *hc, xhci_device_t *dev,
-    xhci_endpoint_t *xhci_ep, unsigned *sizes, unsigned count);
+extern errno_t xhci_endpoint_remove_streams(xhci_hc_t *, xhci_device_t *,
+    xhci_endpoint_t *);
+extern errno_t xhci_endpoint_request_primary_streams(xhci_hc_t *,
+    xhci_device_t *, xhci_endpoint_t *, unsigned);
+extern errno_t xhci_endpoint_request_secondary_streams(xhci_hc_t *,
+    xhci_device_t *, xhci_endpoint_t *, unsigned *, unsigned);
 
 #endif
Index: uspace/drv/bus/usb/xhci/transfers.h
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/transfers.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -59,5 +59,6 @@
 extern void xhci_transfer_destroy(usb_transfer_batch_t *);
 
-static inline xhci_transfer_t *xhci_transfer_from_batch(usb_transfer_batch_t *batch)
+static inline xhci_transfer_t *xhci_transfer_from_batch(
+    usb_transfer_batch_t *batch)
 {
 	assert(batch);
Index: uspace/drv/bus/usb/xhci/trb_ring.h
===================================================================
--- uspace/drv/bus/usb/xhci/trb_ring.h	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/drv/bus/usb/xhci/trb_ring.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -57,17 +57,17 @@
  */
 typedef struct xhci_trb_ring {
-	list_t segments;                /* List of assigned segments */
-	int segment_count;              /* Number of segments assigned */
+	list_t segments;                /**< List of assigned segments */
+	int segment_count;              /**< Number of segments assigned */
 
-	/*
-	 * As the link TRBs connect physical addresses, we need to keep track of
-	 * active segment in virtual memory. The enqueue ptr should always belong
-	 * to the enqueue segment.
+	/**
+	 * As the link TRBs connect physical addresses, we need to keep track
+	 * of active segment in virtual memory. The enqueue ptr should always
+	 * belong to the enqueue segment.
 	 */
 	trb_segment_t *enqueue_segment;
 	xhci_trb_t *enqueue_trb;
 
-	uintptr_t dequeue;              /* Last reported position of the dequeue pointer */
-	bool pcs;                       /* Producer Cycle State: section 4.9.2 */
+	uintptr_t dequeue; /**< Last reported position of the dequeue pointer */
+	bool pcs;          /**< Producer Cycle State: section 4.9.2 */
 
 	fibril_mutex_t guard;
@@ -76,9 +76,11 @@
 extern errno_t xhci_trb_ring_init(xhci_trb_ring_t *, size_t);
 extern void xhci_trb_ring_fini(xhci_trb_ring_t *);
-extern errno_t xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *, uintptr_t *);
-extern errno_t xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *, size_t, uintptr_t *);
+extern errno_t xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *,
+    uintptr_t *);
+extern errno_t xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *,
+    size_t, uintptr_t *);
 extern size_t xhci_trb_ring_size(xhci_trb_ring_t *);
 
-extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *ring, uintptr_t *addr);
+extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *, uintptr_t *);
 
 /**
@@ -86,5 +88,6 @@
  * pointer inside the ring. Otherwise, the ring will soon show up as full.
  */
-static inline void xhci_trb_ring_update_dequeue(xhci_trb_ring_t *ring, uintptr_t phys)
+static inline void xhci_trb_ring_update_dequeue(xhci_trb_ring_t *ring,
+    uintptr_t phys)
 {
 	ring->dequeue = phys;
@@ -95,14 +98,14 @@
  */
 typedef struct xhci_event_ring {
-	list_t segments;                /* List of assigned segments */
-	int segment_count;              /* Number of segments assigned */
+	list_t segments;                /**< List of assigned segments */
+	int segment_count;              /**< Number of segments assigned */
 
-	trb_segment_t *dequeue_segment; /* Current segment of the dequeue ptr */
-	xhci_trb_t *dequeue_trb;        /* Next TRB to be processed */
-	uintptr_t dequeue_ptr;          /* Physical address of the ERDP to be reported to the HC */
+	trb_segment_t *dequeue_segment; /**< Current segment */
+	xhci_trb_t *dequeue_trb;        /**< Next TRB to be processed */
+	uintptr_t dequeue_ptr;  /**< Physical ERDP to be reported to the HC */
 
-	dma_buffer_t erst;              /* ERST given to the HC */
+	dma_buffer_t erst;      /**< ERST given to the HC */
 
-	bool ccs;                       /* Consumer Cycle State: section 4.9.2 */
+	bool ccs;               /**< Consumer Cycle State: section 4.9.2 */
 
 	fibril_mutex_t guard;
