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
5#include <linux/kexec.h>5#include <linux/kexec.h>
6#include <linux/proc_fs.h>6#include <linux/proc_fs.h>
7#include <linux/elf.h>7#include <linux/elf.h>
8#include <linux/pgtable.h>
8#include <uapi/linux/vmcore.h>9#include <uapi/linux/vmcore.h>
9 10
10#include <linux/pgtable.h> /* for pgprot_t */11#include <linux/pgtable.h> /* for pgprot_t */
include/linux/io-mapping.h+1−1
@@ -10,6 +10,7 @@ · 9 unmodified lines
10#include <linux/slab.h>10#include <linux/slab.h>
11#include <linux/bug.h>11#include <linux/bug.h>
12#include <linux/io.h>12#include <linux/io.h>
13#include <linux/pgtable.h>
13#include <asm/page.h>14#include <asm/page.h>
14 15
15/*16/*
@@ -99,7 +100,6 @@ io_mapping_unmap(void __iomem *vaddr) · 83 unmodified lines
99#else100#else
100 101
101#include <linux/uaccess.h>102#include <linux/uaccess.h>
102#include <linux/pgtable.h>
103 103
104/* Create the io_mapping object*/104/* Create the io_mapping object*/
105static inline struct io_mapping *105static inline struct io_mapping *
include/linux/kasan.h+1−1
@@ -11,8 +11,8 @@ struct task_struct; · 10 unmodified lines
11 11
12#ifdef CONFIG_KASAN12#ifdef CONFIG_KASAN
13 13
14#include <asm/kasan.h>
15#include <linux/pgtable.h>14#include <linux/pgtable.h>
15#include <asm/kasan.h>
16 16
17extern unsigned char kasan_early_shadow_page[PAGE_SIZE];17extern unsigned char kasan_early_shadow_page[PAGE_SIZE];
18extern pte_t kasan_early_shadow_pte[PTRS_PER_PTE];18extern pte_t kasan_early_shadow_pte[PTRS_PER_PTE];
include/linux/mm.h+1−1
@@ -28,6 +28,7 @@ · 27 unmodified lines
28#include <linux/overflow.h>28#include <linux/overflow.h>
29#include <linux/sizes.h>29#include <linux/sizes.h>
30#include <linux/sched.h>30#include <linux/sched.h>
31#include <linux/pgtable.h>
31 32
32struct mempolicy;33struct mempolicy;
33struct anon_vma;34struct anon_vma;
@@ -92,7 +93,6 @@ extern int mmap_rnd_compat_bits __read_mostly; · 58 unmodified lines
92#endif93#endif
93 94
94#include <asm/page.h>95#include <asm/page.h>
95#include <linux/pgtable.h>
96#include <asm/processor.h>96#include <asm/processor.h>
97 97
98/*98/*