diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2008-04-29 00:59:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 08:06:04 -0700 |
commit | 95d8c365b2df2adb904963333a93b15414403ed1 (patch) | |
tree | 0ee819420354ecc2ef7091f432319f55b497cf4e | |
parent | 86735118459b46422e20d3b73ee732b1f1f780b1 (diff) | |
download | linux-3.10-95d8c365b2df2adb904963333a93b15414403ed1.tar.gz linux-3.10-95d8c365b2df2adb904963333a93b15414403ed1.tar.bz2 linux-3.10-95d8c365b2df2adb904963333a93b15414403ed1.zip |
lists: add "const" qualifier to first arg of list_splice() operations
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>
-rw-r--r-- | include/linux/list.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index b4a939b6b62..7627508f1b7 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -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); |