Commit e663d7c9 authored by Denis Vlasenko's avatar Denis Vlasenko Committed by Linus Torvalds

[PATCH] add missing #include

There's a subtle problem with "inline" usage in <linux/string.h>:

 <linux/string.h>:
        this pulls in __constant_c_and_count_memset()

 <linux/mm.h>:
        this pulls <compiler.h>, re-defining
        inline == __inline__ __attribute__((always_inline)).

 But by now it is too late! The compiler has already seen the bare
 "inline" in string.h, and hasn't inlined it.

Result:

	# grep __constant System.map
	c0144670 t __constant_c_and_count_memset
	c0145c60 t __constant_c_and_count_memset
	... many more copies of this function ...

Fixed by including <compiler.h> early enough.
parent d14c946e
......@@ -5,6 +5,7 @@
#ifdef __KERNEL__
#include <linux/compiler.h> /* for inline */
#include <linux/types.h> /* for size_t */
#include <linux/stddef.h> /* for NULL */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment