lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 05 Jan 2010 12:31:15 +0100 From: Andi Kleen <andi@...stfloor.org> To: Dave Chinner <david@...morbit.com> Cc: xfs@....sgi.com, Artem Bityutskiy <dedekind@...radead.org>, Dave Airlie <airlied@...hat.com>, linux-kernel@...r.kernel.org, Adrian Hunter <adrian.hunter@...ia.com> Subject: Re: [PATCH] sort: Introduce generic list_sort function Dave Chinner <david@...morbit.com> writes: > + > +/** > + * list_sort - sort a list. > + * @priv: private data, passed to @cmp > + * @head: the list to sort > + * @cmp: the elements comparison function > + * > + * This function has been implemented by Mark J Roberts <mjr@...x.org>. It > + * implements "merge sort" which has O(nlog(n)) complexity. The list is sorted > + * in ascending order. > + * > + * The comparison function @cmp is supposed to return a negative value if @a is > + * 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. > + */ > +void list_sort(void *priv, struct list_head *head, > + int (*cmp)(void *priv, struct list_head *a, > + struct list_head *b)) No EXPORT_SYMBOL? Also it would seem cleaner to have it in a own file. -Andi -- ak@...ux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists