Constify llist_count() parameter

Counting list entires should not alter the list content: let's make this
obvious from type signature.

Change-Id: I414e67a3de733fab407161b3264d3b89070ba537
This commit is contained in:
Max 2018-12-10 12:46:03 +01:00
parent 6aa20eee29
commit c01cff1a50
1 changed files with 1 additions and 1 deletions

View File

@ -387,7 +387,7 @@ static inline void llist_splice_init(struct llist_head *llist,
* This function is not efficient, mostly useful for small lists and non time
* critical cases like unit tests.
*/
static inline unsigned int llist_count(struct llist_head *head)
static inline unsigned int llist_count(const struct llist_head *head)
{
struct llist_head *entry;
unsigned int i = 0;