]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
lists: add "const" qualifier to first arg of list_splice() operations
authorRobert P. J. Day <rpjday@crashcourse.ca>
Tue, 29 Apr 2008 07:59:29 +0000 (00:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:04 +0000 (08:06 -0700)
Since neither the list_splice() nor __list_splice() routines modify their
first argument, might as well declare them "const".

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/list.h

index b4a939b6b6252349183aadccff2b7c7b9a6008da..7627508f1b741aed30ef52ce76c40d2cc8a0646a 100644 (file)
@@ -328,7 +328,7 @@ static inline int list_is_singular(const struct list_head *head)
        return !list_empty(head) && (head->next == head->prev);
 }
 
-static inline void __list_splice(struct list_head *list,
+static inline void __list_splice(const struct list_head *list,
                                 struct list_head *head)
 {
        struct list_head *first = list->next;
@@ -347,7 +347,8 @@ static inline void __list_splice(struct list_head *list,
  * @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(const struct list_head *list,
+                               struct list_head *head)
 {
        if (!list_empty(list))
                __list_splice(list, head);