History

mm: reorder includes after introduction of linux/pgtable.h

The replacement of <asm/pgrable.h> with <linux/pgtable.h> made the include of the latter in the middle of asm includes. Fix this up with the aid of the below script and manual adjustments here and there. import sys import re if len(sys.argv) is not 3: print "USAGE: %s <file> <header>" % (sys.argv[0]) sys.exit(1) hdr_to_move="#include <linux/%s>" % sys.argv[2] moved = False in_hdrs = False with open(sys.argv[1], "r") as f: lines = f.readlines() for _line in lines: line = _line.rstrip(' ') if line == hdr_to_move: continue if line.startswith("#include <linux/"): in_hdrs = True elif not moved and in_hdrs: moved = True print hdr_to_move print line

Mike Rapoport committed 6 years ago

Commit 65fddcf1 parent ca5999f265 files · +255 −268Browse files

Showing the changes to include/linux (4 of 265 files). Show all

Unified · Split

4 files
  1. include/linux/crash_dump.h +1 −0
  2. include/linux/io-mapping.h +1 −1
  3. include/linux/kasan.h +1 −1
  4. include/linux/mm.h +1 −1
include/linux/crash_dump.h+1−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 #include <linux/kexec.h>
66 #include <linux/proc_fs.h>
77 #include <linux/elf.h>
8+#include <linux/pgtable.h>
89 #include <uapi/linux/vmcore.h>
910
1011 #include <linux/pgtable.h> /* for pgprot_t */
include/linux/io-mapping.h+1−1
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/slab.h>
1111 #include <linux/bug.h>
1212 #include <linux/io.h>
13+#include <linux/pgtable.h>
1314 #include <asm/page.h>
1415
1516 /*
@@ -99,7 +100,6 @@ io_mapping_unmap(void __iomem *vaddr) · 83 unmodified lines
99100 #else
100101
101102 #include <linux/uaccess.h>
102−#include <linux/pgtable.h>
103103
104104 /* Create the io_mapping object*/
105105 static inline struct io_mapping *
include/linux/kasan.h+1−1
@@ -11,8 +11,8 @@ struct task_struct; · 10 unmodified lines
1111
1212 #ifdef CONFIG_KASAN
1313
14−#include <asm/kasan.h>
1514 #include <linux/pgtable.h>
15+#include <asm/kasan.h>
1616
1717 extern unsigned char kasan_early_shadow_page[PAGE_SIZE];
1818 extern pte_t kasan_early_shadow_pte[PTRS_PER_PTE];
include/linux/mm.h+1−1
@@ -28,6 +28,7 @@ · 27 unmodified lines
2828 #include <linux/overflow.h>
2929 #include <linux/sizes.h>
3030 #include <linux/sched.h>
31+#include <linux/pgtable.h>
3132
3233 struct mempolicy;
3334 struct anon_vma;
@@ -92,7 +93,6 @@ extern int mmap_rnd_compat_bits __read_mostly; · 58 unmodified lines
9293 #endif
9394
9495 #include <asm/page.h>
95−#include <linux/pgtable.h>
9696 #include <asm/processor.h>
9797
9898 /*