* + lib-revise-list_sort-header-comment.patch added to -mm tree
@ 2010-02-01 19:48 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-02-01 19:48 UTC (permalink / raw)
To: mm-commits; +Cc: don.mullis, airlied, andi, david, dedekind
The patch titled
lib: revise list_sort() header comment
has been added to the -mm tree. Its filename is
lib-revise-list_sort-header-comment.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: lib: revise list_sort() header comment
From: Don Mullis <don.mullis@gmail.com>
Clarify and correct header comment of list_sort().
Signed-off-by: Don Mullis <don.mullis@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/list_sort.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff -puN lib/list_sort.c~lib-revise-list_sort-header-comment lib/list_sort.c
--- a/lib/list_sort.c~lib-revise-list_sort-header-comment
+++ a/lib/list_sort.c
@@ -81,17 +81,18 @@ static void merge_and_restore_back_links
}
/**
- * list_sort - sort a list.
- * @priv: private data, passed to @cmp
+ * list_sort - sort a list
+ * @priv: private data, opaque to list_sort(), passed to @cmp
* @head: the list to sort
* @cmp: the elements comparison function
*
- * This function implements "merge sort" which has O(nlog(n)) complexity.
- * The list is sorted in ascending order.
+ * This function implements "merge sort", which has O(nlog(n))
+ * complexity.
*
- * The comparison function @cmp is supposed to return a negative value if @a is
- * less than @b, and a positive value if @a is greater than @b. If @a and @b
- * are equivalent, then it does not matter what this function returns.
+ * The comparison function @cmp must return a negative value if @a
+ * should sort before @b, and a positive value if @a should sort after
+ * @b. If @a and @b are equivalent, and their original relative
+ * ordering is to be preserved, @cmp must return 0.
*/
void list_sort(void *priv, struct list_head *head,
int (*cmp)(void *priv, struct list_head *a,
_
Patches currently in -mm which might be from don.mullis@gmail.com are
lib-more-scalable-list_sort.patch
lib-more-scalable-list_sort-fix.patch
lib-revise-list_sort-header-comment.patch
lib-build-list_sort-only-if-needed.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-01 19:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-01 19:48 + lib-revise-list_sort-header-comment.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.