History

lib/string: shrink lib/string.i via IWYU

This diff uses an open source tool include-what-you-use (IWYU) to modify the include list, changing indirect includes to direct includes. IWYU is implemented using the IWYUScripts github repository which is a tool that is currently undergoing development. These changes seek to improve build times. This change to lib/string.c resulted in a preprocessed size of lib/string.i from 26371 lines to 5321 lines (-80%) for the x86 defconfig.

Tanzir Hasan committed 2 years ago

Commit 38b9baf1 parent 66a5c401 file · +9 −8Browse files

Showing the changes to lib/string.c (1 of 1 file). Show all

Unified · Split

lib/string.c+9−8
@@ -15,19 +15,20 @@ · 14 unmodified lines
1515 */
1616
1717 #define __NO_FORTIFY
18−#include <linux/types.h>
19−#include <linux/string.h>
20−#include <linux/ctype.h>
21−#include <linux/kernel.h>
22−#include <linux/export.h>
18+#include <linux/bits.h>
2319 #include <linux/bug.h>
20+#include <linux/ctype.h>
2421 #include <linux/errno.h>
25−#include <linux/slab.h>
22+#include <linux/limits.h>
23+#include <linux/linkage.h>
24+#include <linux/stddef.h>
25+#include <linux/string.h>
26+#include <linux/types.h>
2627
28+#include <asm/page.h>
29+#include <asm/rwonce.h>
2730 #include <asm/unaligned.h>
28−#include <asm/byteorder.h>
2931 #include <asm/word-at-a-time.h>
30−#include <asm/page.h>
3132
3233 #ifndef __HAVE_ARCH_STRNCASECMP
3334 /**