mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Revert "FROMLIST: lib/list_sort: fix function type mismatches"
This reverts commit 9b177a7d1c as CFI is
being removed from the tree to come back later as a "clean" set of
patches.
Bug: 147506196
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie9d1c57c4b1e493aaf1f4654a188c830a414d97f
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include <linux/list.h>
|
||||
|
||||
typedef int __attribute__((nonnull(2,3))) (*cmp_func)(void *,
|
||||
struct list_head *, struct list_head *);
|
||||
struct list_head const *, struct list_head const *);
|
||||
|
||||
/*
|
||||
* Returns a list organized in an intermediate format suited
|
||||
@@ -227,7 +227,7 @@ void list_sort(void *priv, struct list_head *head,
|
||||
if (likely(bits)) {
|
||||
struct list_head *a = *tail, *b = a->prev;
|
||||
|
||||
a = merge(priv, cmp, b, a);
|
||||
a = merge(priv, (cmp_func)cmp, b, a);
|
||||
/* Install the merged result in place of the inputs */
|
||||
a->prev = b->prev;
|
||||
*tail = a;
|
||||
@@ -249,10 +249,10 @@ void list_sort(void *priv, struct list_head *head,
|
||||
|
||||
if (!next)
|
||||
break;
|
||||
list = merge(priv, cmp, pending, list);
|
||||
list = merge(priv, (cmp_func)cmp, pending, list);
|
||||
pending = next;
|
||||
}
|
||||
/* The final merge, rebuilding prev links */
|
||||
merge_final(priv, cmp, head, pending, list);
|
||||
merge_final(priv, (cmp_func)cmp, head, pending, list);
|
||||
}
|
||||
EXPORT_SYMBOL(list_sort);
|
||||
|
||||
Reference in New Issue
Block a user