Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95d8c365 authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Linus Torvalds
Browse files

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: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 86735118
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);