git: a56ed557f54e - stable/13 - linuxkpi: list_sort()'s callback now takes list arguments

From: Jean-Sébastien Pédron <dumbbell_at_FreeBSD.org>
Date: Thu, 16 Feb 2023 11:56:19 UTC
The branch stable/13 has been updated by dumbbell (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=a56ed557f54ea3216707b1ce4713ea30be1f79f5

commit a56ed557f54ea3216707b1ce4713ea30be1f79f5
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2023-01-11 22:22:07 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2023-02-16 11:55:18 +0000

    linuxkpi: list_sort()'s callback now takes list arguments
    
    This change breaks the API of `list_sort()`. `LINUXKPI_VERSION >= 51300`
    is used to keep the header compatible with both versions of the
    prototype.
    
    Reviewed by:    manu
    Approved by:    manu
    Differential Revision:  https://reviews.freebsd.org/D38082
    
    (cherry picked from commit a83b3ec719eb6c53658656b7b90607564d3c64d3)
---
 sys/compat/linuxkpi/common/include/linux/list.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h
index 80ac57fecf6d..6ec715291807 100644
--- a/sys/compat/linuxkpi/common/include/linux/list.h
+++ b/sys/compat/linuxkpi/common/include/linux/list.h
@@ -504,7 +504,12 @@ static inline int list_is_last(const struct list_head *list,
 	     (pos) && ({ n = (pos)->member.next; 1; });			\
 	     pos = hlist_entry_safe(n, typeof(*(pos)), member))
 
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300
+extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv,
+    const struct list_head *a, const struct list_head *b));
+#else
 extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv,
     struct list_head *a, struct list_head *b));
+#endif
 
 #endif /* _LINUXKPI_LINUX_LIST_H_ */