login
Header Space

 
 

[PATCH] Standard indentation of arguments

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <torvalds@...>
Cc: <xiyou.wangcong@...>, <linux-kernel@...>, Jianjun Kong <kongjianjun@...>
Date: Wednesday, May 21, 2008 - 1:58 am

Standard indentation of arguments.
I use right blank space to displace the last table, in order to make the arguments alining. For example:

old:
extern void test_fun(struct list_head *new,
			struct list_head *prev,
			struct list_head *next);
new:
extern void test_fun(struct list_head *new,
		     struct list_head *prev,
		     struct list_head *next);

Signed-off-by: Jianjun Kong <kongjianjun@gmail.com>
---
 include/linux/list.h |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/include/linux/list.h b/include/linux/list.h
index 08cf4f6..6d16696 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -49,8 +49,8 @@ static inline void __list_add(struct list_head *new,
 }
 #else
 extern void __list_add(struct list_head *new,
-			      struct list_head *prev,
-			      struct list_head *next);
+		       struct list_head *prev,
+		       struct list_head *next);
 #endif
 
 /**
@@ -91,7 +91,8 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head)
  * the prev/next entries already!
  */
 static inline void __list_add_rcu(struct list_head * new,
-		struct list_head * prev, struct list_head * next)
+				  struct list_head * prev,
+				  struct list_head * next)
 {
 	new->next = next;
 	new->prev = prev;
@@ -138,7 +139,7 @@ static inline void list_add_rcu(struct list_head *new, struct list_head *head)
  * list_for_each_entry_rcu().
  */
 static inline void list_add_tail_rcu(struct list_head *new,
-					struct list_head *head)
+				     struct list_head *head)
 {
 	__list_add_rcu(new, head->prev, head);
 }
@@ -220,7 +221,7 @@ static inline void list_replace(struct list_head *old,
 }
 
 static inline void list_replace_init(struct list_head *old,
-					struct list_head *new)
+				     struct list_head *new)
 {
 	list_replace(old, new);
 	INIT_LIST_HEAD(old);
@@ -235,7 +236,7 @@ static inline void list_replace_init(struct list_head *old,
  * Note: @old should not be empty.
  */
 static inline void list_replace_rcu(struct list_head *old,
-				struct list_head *new)
+				    struct list_head *new)
 {
 	new->next = old->next;
 	new->prev = old->prev;
@@ -284,7 +285,7 @@ static inline void list_move_tail(struct list_head *list,
  * @head: the head of the list
  */
 static inline int list_is_last(const struct list_head *list,
-				const struct list_head *head)
+			       const struct list_head *head)
 {
 	return list->next == head;
 }
@@ -346,7 +347,7 @@ static inline void __list_splice(const struct list_head *list,
  * @head: the place to add it in the first list.
  */
 static inline void list_splice(const struct list_head *list,
-				struct list_head *head)
+			       struct list_head *head)
 {
 	if (!list_empty(list))
 		__list_splice(list, head);
@@ -696,7 +697,7 @@ struct hlist_node {
 };
 
 #define HLIST_HEAD_INIT { .first = NULL }
-#define HLIST_HEAD(name) struct hlist_head name = {  .first = NULL }
+#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
 #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
 static inline void INIT_HLIST_NODE(struct hlist_node *h)
 {
@@ -771,7 +772,7 @@ static inline void hlist_del_init(struct hlist_node *n)
  * The @old entry will be replaced with the @new entry atomically.
  */
 static inline void hlist_replace_rcu(struct hlist_node *old,
-					struct hlist_node *new)
+				     struct hlist_node *new)
 {
 	struct hlist_node *next = old->next;
 
@@ -815,7 +816,7 @@ static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
  * list-traversal primitive must be guarded by rcu_read_lock().
  */
 static inline void hlist_add_head_rcu(struct hlist_node *n,
-					struct hlist_head *h)
+				      struct hlist_head *h)
 {
 	struct hlist_node *first = h->first;
 	n->next = first;
@@ -828,7 +829,7 @@ static inline void hlist_add_head_rcu(struct hlist_node *n,
 
 /* next must be != NULL */
 static inline void hlist_add_before(struct hlist_node *n,
-					struct hlist_node *next)
+				    struct hlist_node *next)
 {
 	n->pprev = next->pprev;
 	n->next = next;
@@ -837,7 +838,7 @@ static inline void hlist_add_before(struct hlist_node *n,
 }
 
 static inline void hlist_add_after(struct hlist_node *n,
-					struct hlist_node *next)
+				   struct hlist_node *next)
 {
 	next->next = n->next;
 	n->next = next;
-- 
1.5.2.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Standard indentation of arguments, Jianjun Kong, (Wed May 21, 1:58 am)
Re: CFD: linux-wanking@vger.kernel.org (was [PATCH] Standard..., Christoph Hellwig, (Wed May 21, 6:32 am)
Re: CFD: linux-wanking@vger.kernel.org, David Miller, (Wed May 21, 3:49 pm)
Re: CFD: linux-wanking@vger.kernel.org, Al Viro, (Wed May 21, 6:03 pm)
Re: CFD: linux-wanking@vger.kernel.org (was [PATCH] Standard..., Arjan van de Ven, (Thu May 22, 11:29 am)
Re: CFD: linux-wanking@vger.kernel.org, David Miller, (Wed May 21, 4:10 pm)
Re: CFD: linux-wanking@vger.kernel.org, Willy Tarreau, (Wed May 21, 5:25 pm)
Re: CFD: linux-wanking@vger.kernel.org, Stefan Richter, (Wed May 21, 5:44 pm)
Re: CFD: linux-wanking@vger.kernel.org, Willy Tarreau, (Wed May 21, 5:56 pm)
Re: CFD: linux-wanking@vger.kernel.org, David Miller, (Wed May 21, 5:19 am)
Re: [PATCH] Standard indentation of arguments, Jiri Slaby, (Wed May 21, 3:19 am)
Re: [PATCH] Standard indentation of arguments, David Newall, (Wed May 21, 7:35 am)
speck-geostationary