Skip to contentSkip to conversation

mm/... convert #include "linux/..." to #include <linux/...>

PATCH In review Joe Perches 2 participants 4 messages Aug 19, 2007 – Aug 20, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/5 mm/... convert #include "linux/..." to #include <linux/...>

(untested)

There are several files that
#include "linux/file" not #include <linux/file>
#include "asm/file" not #include <asm/file>

Here's a little script that converts them:

egrep -i -r -l --include=*.[ch] \
"^[[:space:]]*\#[[:space:]]*include[[:space:]]*\"(linux|asm)/(.*)\"" * \
| xargs sed -i -e 's/^[[:space:]]*#[[:space:]]*include[[:space:]]*"\(linux\|asm\)\/\(.*\)"/#include <\1\/\2>/g'

mm/slab.c +1 -1
index a684778..976aeff 100644
@@ -334,7 +334,7 @@ static __always_inline int index_of(const size_t size)
 		return i; \
 	else \
 		i++;
-#include "linux/kmalloc_sizes.h"
+#include <linux/kmalloc_sizes.h>
 #undef CACHE
 		__bad_size();
 	} else
#1 lore raw

mm/slab.c static __always_inline int index_of(const size_t size) · line 340

Quoted 13 lines · Joe Perches
mm/slab.c +1 -1
index a684778..976aeff 100644
@@ -334,7 +334,7 @@ static __always_inline int index_of(const size_t size)
 		return i; \
 	else \
 		i++;
-#include "linux/kmalloc_sizes.h"
+#include <linux/kmalloc_sizes.h>
 #undef CACHE
 		__bad_size();
 	} else

But I think this was done intentionally to point out that the file includes is *not* a regular include file.

#2 lore raw
Quoted 6 lines · Christoph Lameter

mm/slab.c static __always_inline int index_of(const size_t size) · line 337

Quoted 3 lines · Joe Perches
mm/slab.c +1 -1
-#include "linux/kmalloc_sizes.h"
+#include <linux/kmalloc_sizes.h>

But I think this was done intentionally to point out that the file includes is *not* a regular include file.

Maybe. I think it's just a simple error.

mm/slab.c has 2 other includes of

	#include <linux/kmalloc_sizes.h>

cheers, Joe