Index: uspace/lib/usbhid/src/hiddescriptor.c
===================================================================
--- uspace/lib/usbhid/src/hiddescriptor.c	(revision d87561c1ab4ed65ef38a64b56ff6713bd8bbe7ab)
+++ uspace/lib/usbhid/src/hiddescriptor.c	(revision 65f77f49a836dcced483f55fa0160a30f7948d1e)
@@ -333,10 +333,6 @@
 	}
 
-	usb_hid_report_description_t *report_des = NULL;
-	
-	list_foreach(report->reports, report_it) {
-		report_des = list_get_instance(report_it,
-				usb_hid_report_description_t, reports_link);
-
+	list_foreach(report->reports, reports_link,
+	    usb_hid_report_description_t, report_des) {
 		// if report id not set, return the first of the type
 		if(((report_des->report_id == report_id) || (report_id == 0)) && 
@@ -902,6 +898,4 @@
 void usb_hid_descriptor_print_list(list_t *list)
 {
-	usb_hid_report_field_t *report_item;
-
 	if(list == NULL || list_empty(list)) {
 	    usb_log_debug("\tempty\n");
@@ -909,8 +903,6 @@
 	}
 
-        list_foreach(*list, item) {
-		report_item = list_get_instance(item, usb_hid_report_field_t,
-				ritems_link);
-
+        list_foreach(*list, ritems_link, usb_hid_report_field_t,
+    	    report_item) {
 		usb_log_debug("\t\tOFFSET: %X\n", report_item->offset);
 		usb_log_debug("\t\tSIZE: %zu\n", report_item->size);
@@ -937,7 +929,5 @@
 
 		usb_log_debug("\n");
-
-	}
-
+	}
 }
 
@@ -951,13 +941,9 @@
 void usb_hid_descriptor_print(usb_hid_report_t *report)
 {
-	if(report == NULL) {
+	if (report == NULL)
 		return;
-	}
-
-	usb_hid_report_description_t *report_des;
-
-	list_foreach(report->reports, report_it) {
-		report_des = list_get_instance(report_it,
-			usb_hid_report_description_t, reports_link);
+
+	list_foreach(report->reports, reports_link,
+	    usb_hid_report_description_t, report_des) {
 		usb_log_debug("Report ID: %d\n", report_des->report_id);
 		usb_log_debug("\tType: %d\n", report_des->type);
Index: uspace/lib/usbhid/src/hidparser.c
===================================================================
--- uspace/lib/usbhid/src/hidparser.c	(revision d87561c1ab4ed65ef38a64b56ff6713bd8bbe7ab)
+++ uspace/lib/usbhid/src/hidparser.c	(revision 65f77f49a836dcced483f55fa0160a30f7948d1e)
@@ -130,9 +130,7 @@
     size_t size, uint8_t *report_id)
 {
-	usb_hid_report_field_t *item;
-
 	usb_hid_report_description_t *report_des;
 	usb_hid_report_type_t type = USB_HID_REPORT_TYPE_INPUT;
-	
+
 	if (report == NULL) {
 		return EINVAL;
@@ -153,15 +151,14 @@
 
 	/* read data */
-	list_foreach(report_des->report_items, list_item) {
-		item = list_get_instance(list_item, usb_hid_report_field_t, 
-		    ritems_link);
+	list_foreach(report_des->report_items, ritems_link,
+	    usb_hid_report_field_t, item) {
 
 		if (USB_HID_ITEM_FLAG_CONSTANT(item->item_flags) == 0) {
-			
+
 			if (USB_HID_ITEM_FLAG_VARIABLE(item->item_flags) == 0) {
 				/* array */
 				item->value = 
 					usb_hid_translate_data(item, data);
-		
+
 				item->usage = USB_HID_EXTENDED_USAGE(
 				    item->usages[item->value -
@@ -184,9 +181,9 @@
 				/* variable item */
 				item->value = usb_hid_translate_data(item, 
-				    data);				
-			}			
+				    data);
+			}
 		}
 	}
-	
+
 	return EOK;
 }
@@ -295,8 +292,6 @@
 	usb_hid_report_description_t *report_des = NULL;
 
-	list_foreach(report->reports, report_it) {
-		report_des = list_get_instance(report_it,
-		    usb_hid_report_description_t, reports_link);
-		
+	list_foreach(report->reports, reports_link,
+	    usb_hid_report_description_t, report_des) {
 		if ((report_des->report_id == report_id) &&
 		    (report_des->type == USB_HID_REPORT_TYPE_OUTPUT)) {
@@ -345,5 +340,5 @@
 	int length;
 	int32_t tmp_value;
-	
+
 	if (report == NULL) {
 		return EINVAL;
@@ -351,5 +346,5 @@
 
 	if (report->use_report_ids != 0) {
-		buffer[0] = report_id;		
+		buffer[0] = report_id;
 	}
 
@@ -357,15 +352,11 @@
 	report_des = usb_hid_report_find_description(report, report_id, 
 	    USB_HID_REPORT_TYPE_OUTPUT);
-	
+
 	if (report_des == NULL) {
 		return EINVAL;
 	}
 
-	usb_hid_report_field_t *report_item;
-
-	list_foreach(report_des->report_items, item) {
-		report_item = list_get_instance(item, usb_hid_report_field_t,
-		    ritems_link);
-
+	list_foreach(report_des->report_items, ritems_link,
+	    usb_hid_report_field_t, report_item) {
 		value = usb_hid_translate_data_reverse(report_item, 
 		    report_item->value);
@@ -373,5 +364,5 @@
 		offset = report_des->bit_length - report_item->offset - 1;
 		length = report_item->size;
-		
+
 		usb_log_debug("\ttranslated value: %x\n", value);
 
@@ -382,7 +373,7 @@
 			}
 			size_t shift = 8 - offset % 8 - length;
-			value = value << shift;							
+			value = value << shift;
 			value = value & (((1 << length) - 1) << shift);
-				
+
 			uint8_t mask = 0;
 			mask = 0xff - (((1 << length) - 1) << shift);
@@ -400,5 +391,5 @@
 
 					tmp_value = tmp_value << (offset % 8);
-	
+
 					mask = ~(((1 << (8 - (offset % 8))) - 1)
 					    << (offset % 8));
@@ -407,5 +398,5 @@
 					    tmp_value;
 				} else if (i == ((offset + length - 1) / 8)) {
-					
+
 					value = value >> (length - 
 					    ((offset + length) % 8));
@@ -413,5 +404,5 @@
 					value = value & ((1 << (length - 
 					    ((offset + length) % 8))) - 1);
-				
+
 					mask = (1 << (length - 
 					    ((offset + length) % 8))) - 1;
@@ -427,5 +418,5 @@
 		report_item->value = 0;
 	}
-	
+
 	return EOK;
 }
Index: uspace/lib/usbhid/src/hidpath.c
===================================================================
--- uspace/lib/usbhid/src/hidpath.c	(revision d87561c1ab4ed65ef38a64b56ff6713bd8bbe7ab)
+++ uspace/lib/usbhid/src/hidpath.c	(revision 65f77f49a836dcced483f55fa0160a30f7948d1e)
@@ -176,9 +176,6 @@
 	usb_log_debug("\tLENGTH: %d\n", path->depth);
 
-	usb_hid_report_usage_path_t *path_item;
-
-	list_foreach(path->items, item) {
-		path_item = list_get_instance(item, usb_hid_report_usage_path_t,
-			rpath_items_link);
+	list_foreach(path->items, rpath_items_link,
+	    usb_hid_report_usage_path_t, path_item) {
 
 		usb_log_debug("\tUSAGE_PAGE: %X\n", path_item->usage_page);
@@ -237,16 +234,15 @@
 			usb_hid_report_usage_path_t, rpath_items_link);
 
-		list_foreach(report_path->items, report_link) {
-			report_item = list_get_instance(report_link,
-				usb_hid_report_usage_path_t, rpath_items_link);
-				
+		list_foreach(report_path->items, rpath_items_link,
+		    usb_hid_report_usage_path_t, report_item) {
+
 			if(USB_HID_SAME_USAGE_PAGE(report_item->usage_page,
 				path_item->usage_page)){
-					
+
 				if(only_page == 0){
 					if(USB_HID_SAME_USAGE(
 						report_item->usage,
 						path_item->usage)) {
-							
+
 						return EOK;
 					}
@@ -266,17 +262,17 @@
 			return 1;
 		}
-		
+
 	/* path is prefix of the report_path */
 	case USB_HID_PATH_COMPARE_BEGIN:
-	
+
 		report_link = report_path->items.head.next;
 		path_link = path->items.head.next;
-			
+
 		while((report_link != &report_path->items.head) && 
 		      (path_link != &path->items.head)) {
-					  
+
 			report_item = list_get_instance(report_link, 
 				usb_hid_report_usage_path_t, rpath_items_link);
-					  
+
 			path_item = list_get_instance(path_link,
        				usb_hid_report_usage_path_t, rpath_items_link);
@@ -286,12 +282,10 @@
 			    !USB_HID_SAME_USAGE(report_item->usage, 
 				path_item->usage))) {
-			
+
 				return 1;
-			} 
-			else {
+			} else {
 				report_link = report_link->next;
-				path_link = path_link->next;			
+				path_link = path_link->next;
 			}
-			
 		}
 
@@ -300,5 +294,5 @@
 		   ((report_link == &report_path->items.head) && 
 			(path_link == &path->items.head))) {
-				
+
 			return EOK;
 		}
@@ -405,5 +399,4 @@
 	usb_hid_report_path_t *usage_path)
 {
-	usb_hid_report_usage_path_t *path_item;
 	usb_hid_report_usage_path_t *new_path_item;
 	usb_hid_report_path_t *new_usage_path = usb_hid_report_path ();
@@ -419,7 +412,6 @@
 	}
 
-	list_foreach(usage_path->items, path_link) {
-		path_item = list_get_instance(path_link,
-			usb_hid_report_usage_path_t, rpath_items_link);
+	list_foreach(usage_path->items, rpath_items_link,
+	    usb_hid_report_usage_path_t, path_item) {
 
 		new_path_item = malloc(sizeof(usb_hid_report_usage_path_t));
