Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/sort.c: move include inside #if 0

The sort function and its helpers don't do memory allocation, so the
slab.h include is redundant. Move it inside the #if 0 protecting the
self-test, similar to how it is done in lib/list_sort.c. This removes
over 450 lines from the generated dependency file.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Rasmus Villemoes and committed by
Linus Torvalds
2ddae683 b8b6db17

+1 -1
+1 -1
lib/sort.c
··· 7 7 #include <linux/types.h> 8 8 #include <linux/export.h> 9 9 #include <linux/sort.h> 10 - #include <linux/slab.h> 11 10 12 11 static void u32_swap(void *a, void *b, int size) 13 12 { ··· 84 85 EXPORT_SYMBOL(sort); 85 86 86 87 #if 0 88 + #include <linux/slab.h> 87 89 /* a simple boot-time regression test */ 88 90 89 91 int cmpint(const void *a, const void *b)