1*92ec3cc9SIan Rogers /* SPDX-License-Identifier: GPL-2.0 */ 2*92ec3cc9SIan Rogers #ifndef _LINUX_LIST_SORT_H 3*92ec3cc9SIan Rogers #define _LINUX_LIST_SORT_H 4*92ec3cc9SIan Rogers 5*92ec3cc9SIan Rogers #include <linux/types.h> 6*92ec3cc9SIan Rogers 7*92ec3cc9SIan Rogers struct list_head; 8*92ec3cc9SIan Rogers 9*92ec3cc9SIan Rogers typedef int __attribute__((nonnull(2,3))) (*list_cmp_func_t)(void *, 10*92ec3cc9SIan Rogers const struct list_head *, const struct list_head *); 11*92ec3cc9SIan Rogers 12*92ec3cc9SIan Rogers __attribute__((nonnull(2,3))) 13*92ec3cc9SIan Rogers void list_sort(void *priv, struct list_head *head, list_cmp_func_t cmp); 14*92ec3cc9SIan Rogers #endif 15