diff devextras.h @ 80:910ded3009f9

lindent
author marty
date Thu, 11 Aug 2005 03:37:49 +0100
parents 2e830ef1597a
children 7d11ae6795e4
line wrap: on
line diff
--- a/devextras.h
+++ b/devextras.h
@@ -20,7 +20,7 @@
  * $Id$
  *
  */
- 
+
 #ifndef __EXTRAS_H__
 #define __EXTRAS_H__
 
@@ -31,12 +31,11 @@
 
 #if !(defined __KERNEL__) || (defined WIN32)
 
-// User space defines
+/* User space defines */
 
-typedef unsigned char   __u8;
-typedef unsigned short  __u16;
-typedef unsigned        __u32;
-
+typedef unsigned char __u8;
+typedef unsigned short __u16;
+typedef unsigned __u32;
 
 /*
  * Simple doubly linked list implementation.
@@ -47,9 +46,8 @@ typedef unsigned        __u32;
  * generate better code by using them directly rather than
  * using the generic single-entry routines.
  */
- 
- #define prefetch(x) 1
- 
+
+#define prefetch(x) 1
 
 struct list_head {
 	struct list_head *next, *prev;
@@ -70,9 +68,9 @@ struct list_head {
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static __inline__ void __list_add(struct list_head * new,
-	struct list_head * prev,
-	struct list_head * next)
+static __inline__ void __list_add(struct list_head *new,
+				  struct list_head *prev,
+				  struct list_head *next)
 {
 	next->prev = new;
 	new->next = next;
@@ -101,7 +99,8 @@ static __inline__ void list_add(struct l
  * Insert a new entry before the specified head.
  * This is useful for implementing queues.
  */
-static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
+static __inline__ void list_add_tail(struct list_head *new,
+				     struct list_head *head)
 {
 	__list_add(new, head->prev, head);
 }
@@ -113,8 +112,8 @@ static __inline__ void list_add_tail(str
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static __inline__ void __list_del(struct list_head * prev,
-				  struct list_head * next)
+static __inline__ void __list_del(struct list_head *prev,
+				  struct list_head *next)
 {
 	next->prev = prev;
 	prev->next = next;
@@ -123,7 +122,8 @@ static __inline__ void __list_del(struct
 /**
  * list_del - deletes entry from list.
  * @entry: the element to delete from the list.
- * Note: list_empty on entry does not return true after this, the entry is in an undefined state.
+ * Note: list_empty on entry does not return true after this, the entry is
+ * in an undefined state.
  */
 static __inline__ void list_del(struct list_head *entry)
 {
@@ -154,7 +154,8 @@ static __inline__ int list_empty(struct 
  * @list: the new list to add.
  * @head: the place to add it in the first list.
  */
-static __inline__ void list_splice(struct list_head *list, struct list_head *head)
+static __inline__ void list_splice(struct list_head *list,
+				   struct list_head *head)
 {
 	struct list_head *first = list->next;
 
@@ -189,7 +190,8 @@ static __inline__ void list_splice(struc
         	pos = pos->next, prefetch(pos->next))
 
 /**
- * list_for_each_safe	-	iterate over a list safe against removal of list entry
+ * list_for_each_safe	-	iterate over a list safe against removal
+ *                              of list entry
  * @pos:	the &struct list_head to use as a loop counter.
  * @n:		another &struct list_head to use as temporary storage
  * @head:	the head for your list.
@@ -198,9 +200,6 @@ static __inline__ void list_splice(struc
 	for (pos = (head)->next, n = pos->next; pos != (head); \
 		pos = n, n = pos->next)
 
-
-
-
 /*
  * File types
  */
@@ -234,22 +233,20 @@ static __inline__ void list_splice(struc
 #define ATTR_FORCE	512	/* Not a change, but a change it */
 #define ATTR_ATTR_FLAG	1024
 
-
 struct iattr {
-	unsigned int	ia_valid;
-	unsigned		ia_mode;
-	unsigned		ia_uid;
-	unsigned		ia_gid;
-	unsigned		ia_size;
-	unsigned		ia_atime;
-	unsigned	ia_mtime;
-	unsigned	ia_ctime;
-	unsigned int	ia_attr_flags;
+	unsigned int ia_valid;
+	unsigned ia_mode;
+	unsigned ia_uid;
+	unsigned ia_gid;
+	unsigned ia_size;
+	unsigned ia_atime;
+	unsigned ia_mtime;
+	unsigned ia_ctime;
+	unsigned int ia_attr_flags;
 };
 
 #define KERN_DEBUG
 
-
 #else
 
 #ifndef WIN32
@@ -261,11 +258,8 @@ struct iattr {
 
 #endif
 
-
-
 #if defined WIN32
 #undef new
-#endif 
+#endif
 
 #endif
-