Index: uspace/drv/usbhub/ports.c
===================================================================
--- uspace/drv/usbhub/ports.c	(revision af6136de008f4fcb3a666bcb1be8d411397d47fe)
+++ uspace/drv/usbhub/ports.c	(revision 6ab7f3e94742316cc6a565a1bcb864ad3709c914)
@@ -47,5 +47,4 @@
 #include "port_status.h"
 
-
 /** Information for fibril for device discovery. */
 struct add_device_phase1 {
@@ -65,5 +64,5 @@
  * any function here and must be cleared by hand
  */
-static const int non_handled_changes[] =  {
+static const int non_handled_changes[] = {
 	USB_HUB_FEATURE_C_PORT_ENABLE,
 	USB_HUB_FEATURE_C_PORT_SUSPEND
@@ -71,11 +70,11 @@
 
 static void usb_hub_removed_device(
-	usb_hub_info_t * hub, uint16_t port);
-
-static void usb_hub_port_reset_completed(usb_hub_info_t * hub,
-	uint16_t port, uint32_t status);
-
-static void usb_hub_port_over_current(usb_hub_info_t * hub,
-	uint16_t port, uint32_t status);
+    usb_hub_info_t *hub, uint16_t port);
+
+static void usb_hub_port_reset_completed(usb_hub_info_t *hub,
+    uint16_t port, uint32_t status);
+
+static void usb_hub_port_over_current(usb_hub_info_t *hub,
+    uint16_t port, uint32_t status);
 
 static int get_port_status(usb_pipe_t *ctrl_pipe, size_t port,
@@ -96,7 +95,7 @@
  * @param port port number, starting from 1
  */
-void usb_hub_process_interrupt(usb_hub_info_t * hub,
-	uint16_t port) {
-	usb_log_debug("interrupt at port %zu\n", (size_t) port);
+void usb_hub_process_interrupt(usb_hub_info_t *hub,
+    uint16_t port) {
+	usb_log_debug("Interrupt at port %zu\n", (size_t) port);
 	//determine type of change
 	//usb_pipe_t *pipe = hub->control_pipe;
@@ -134,5 +133,5 @@
 	if (usb_port_is_status(status, USB_HUB_FEATURE_C_PORT_OVER_CURRENT)) {
 		//check if it was not auto-resolved
-		usb_log_debug("overcurrent change on port\n");
+		usb_log_debug("Overcurrent change on port\n");
 		usb_hub_port_over_current(hub, port, status);
 	}
@@ -141,23 +140,24 @@
 		usb_hub_port_reset_completed(hub, port, status);
 	}
-	usb_log_debug("status x%x : %d\n ", status, status);
+	usb_log_debug("Status x%x : %d\n ", status, status);
 
 	usb_port_status_set_bit(
-	    &status, USB_HUB_FEATURE_C_PORT_CONNECTION,false);
+	    &status, USB_HUB_FEATURE_C_PORT_CONNECTION, false);
 	usb_port_status_set_bit(
-	    &status, USB_HUB_FEATURE_C_PORT_RESET,false);
+	    &status, USB_HUB_FEATURE_C_PORT_RESET, false);
 	usb_port_status_set_bit(
-	    &status, USB_HUB_FEATURE_C_PORT_OVER_CURRENT,false);
-	
+	    &status, USB_HUB_FEATURE_C_PORT_OVER_CURRENT, false);
+
 	//clearing not yet handled changes	
 	unsigned int feature_idx;
-	for(feature_idx = 0;feature_idx<non_handled_changes_count;
-	    ++feature_idx){
+	for (feature_idx = 0;
+	    feature_idx < non_handled_changes_count;
+	    ++feature_idx) {
 		unsigned int bit_idx = non_handled_changes[feature_idx];
-		if(status & (1<<bit_idx)){
+		if (status & (1 << bit_idx)) {
 			usb_log_info(
-			    "there was not yet handled change on port %d: %d"
+			    "There was not yet handled change on port %d: %d"
 			    ";clearing it\n",
-			port, bit_idx);
+			    port, bit_idx);
 			int opResult = usb_hub_clear_port_feature(
 			    hub->control_pipe,
@@ -165,18 +165,17 @@
 			if (opResult != EOK) {
 				usb_log_warning(
-				    "could not clear port flag %d: %d\n",
-				    bit_idx, opResult
+				    "Could not clear port flag %d: %s\n",
+				    bit_idx, str_error(opResult)
 				    );
 			}
 			usb_port_status_set_bit(
-			    &status, bit_idx,false);
+			    &status, bit_idx, false);
 		}
 	}
-	if(status>>16){
-		usb_log_info("there is still some unhandled change %X\n",
+	if (status >> 16) {
+		usb_log_info("There is still some unhandled change %X\n",
 		    status);
 	}
 }
-
 
 /**
@@ -190,10 +189,10 @@
  */
 static void usb_hub_removed_device(
-	usb_hub_info_t * hub, uint16_t port) {
+    usb_hub_info_t *hub, uint16_t port) {
 
 	int opResult = usb_hub_clear_port_feature(hub->control_pipe,
-		port, USB_HUB_FEATURE_C_PORT_CONNECTION);
+	    port, USB_HUB_FEATURE_C_PORT_CONNECTION);
 	if (opResult != EOK) {
-		usb_log_warning("could not clear port-change-connection flag\n");
+		usb_log_warning("Could not clear port-change-connection flag\n");
 	}
 	/** \TODO remove device from device manager - not yet implemented in
@@ -231,5 +230,4 @@
 }
 
-
 /**
  * Process port reset change
@@ -241,6 +239,6 @@
  * @param status
  */
-static void usb_hub_port_reset_completed(usb_hub_info_t * hub,
-	uint16_t port, uint32_t status){
+static void usb_hub_port_reset_completed(usb_hub_info_t *hub,
+    uint16_t port, uint32_t status) {
 	usb_log_debug("Port %zu reset complete.\n", (size_t) port);
 	if (usb_port_is_status(status, USB_HUB_FEATURE_PORT_ENABLE)) {
@@ -274,20 +272,20 @@
  * @param port port number, starting from 1
  */
-static void usb_hub_port_over_current(usb_hub_info_t * hub,
-	uint16_t port, uint32_t status) {
+static void usb_hub_port_over_current(usb_hub_info_t *hub,
+    uint16_t port, uint32_t status) {
 	int opResult;
-	if(usb_port_is_status(status, USB_HUB_FEATURE_PORT_OVER_CURRENT)){
+	if (usb_port_is_status(status, USB_HUB_FEATURE_PORT_OVER_CURRENT)) {
 		opResult = usb_hub_clear_port_feature(hub->control_pipe,
-			port, USB_HUB_FEATURE_PORT_POWER);
+		    port, USB_HUB_FEATURE_PORT_POWER);
 		if (opResult != EOK) {
-			usb_log_error("cannot power off port %d;  %d\n",
-				port, opResult);
+			usb_log_error("Cannot power off port %d; %s\n",
+			    port, str_error(opResult));
 		}
-	}else{
+	} else {
 		opResult = usb_hub_set_port_feature(hub->control_pipe,
-			port, USB_HUB_FEATURE_PORT_POWER);
+		    port, USB_HUB_FEATURE_PORT_POWER);
 		if (opResult != EOK) {
-			usb_log_error("cannot power on port %d;  %d\n",
-				port, opResult);
+			usb_log_error("Cannot power on port %d; %s\n",
+			    port, str_error(opResult));
 		}
 	}
@@ -302,6 +300,5 @@
  */
 static int get_port_status(usb_pipe_t *ctrl_pipe, size_t port,
-    usb_port_status_t *status)
-{
+    usb_port_status_t *status) {
 	size_t recv_size;
 	usb_device_request_setup_packet_t request;
@@ -310,6 +307,6 @@
 	usb_hub_set_port_status_request(&request, port);
 	int rc = usb_pipe_control_read(ctrl_pipe,
-	    &request, sizeof(usb_device_request_setup_packet_t),
-	    &status_tmp, sizeof(status_tmp), &recv_size);
+	    &request, sizeof (usb_device_request_setup_packet_t),
+	    &status_tmp, sizeof (status_tmp), &recv_size);
 	if (rc != EOK) {
 		return rc;
@@ -336,6 +333,5 @@
  * @return Error code.
  */
-static int enable_port_callback(int port_no, void *arg)
-{
+static int enable_port_callback(int port_no, void *arg) {
 	usb_hub_info_t *hub = arg;
 	int rc;
@@ -345,5 +341,5 @@
 	usb_hub_set_reset_port_request(&request, port_no);
 	rc = usb_pipe_control_write(hub->control_pipe,
-	    &request, sizeof(request), NULL, 0);
+	    &request, sizeof (request), NULL, 0);
 	if (rc != EOK) {
 		usb_log_warning("Port reset failed: %s.\n", str_error(rc));
@@ -375,6 +371,5 @@
  * @return 0 Always.
  */
-static int add_device_phase1_worker_fibril(void *arg)
-{
+static int add_device_phase1_worker_fibril(void *arg) {
 	struct add_device_phase1 *data
 	    = (struct add_device_phase1 *) arg;
@@ -418,5 +413,4 @@
 }
 
-
 /** Start device adding when connection change is detected.
  *
@@ -429,8 +423,7 @@
  */
 static int create_add_device_fibril(usb_hub_info_t *hub, size_t port,
-    usb_speed_t speed)
-{
+    usb_speed_t speed) {
 	struct add_device_phase1 *data
-	    = malloc(sizeof(struct add_device_phase1));
+	    = malloc(sizeof (struct add_device_phase1));
 	if (data == NULL) {
 		return ENOMEM;
