Skip to content

Commit 514c603

Browse files
rddunlaptorvalds
authored andcommitted
headers: untangle kmemleak.h from mm.h
Currently <linux/slab.h> #includes <linux/kmemleak.h> for no obvious reason. It looks like it's only a convenience, so remove kmemleak.h from slab.h and add <linux/kmemleak.h> to any users of kmemleak_* that don't already #include it. Also remove <linux/kmemleak.h> from source files that do not use it. This is tested on i386 allmodconfig and x86_64 allmodconfig. It would be good to run it through the 0day bot for other $ARCHes. I have neither the horsepower nor the storage space for the other $ARCHes. Update: This patch has been extensively build-tested by both the 0day bot & kisskb/ozlabs build farms. Both of them reported 2 build failures for which patches are included here (in v2). [ slab.h is the second most used header file after module.h; kernel.h is right there with slab.h. There could be some minor error in the counting due to some #includes having comments after them and I didn't combine all of those. ] [[email protected]: security/keys/big_key.c needs vmalloc.h, per sfr] Link: http://lkml.kernel.org/r/[email protected] Link: http://kisskb.ellerman.id.au/kisskb/head/13396/ Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Reported-by: Michael Ellerman <[email protected]> [2 build failures] Reported-by: Fengguang Wu <[email protected]> [2 build failures] Reviewed-by: Andrew Morton <[email protected]> Cc: Wei Yongjun <[email protected]> Cc: Luis R. Rodriguez <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Mimi Zohar <[email protected]> Cc: John Johansen <[email protected]> Cc: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9124168 commit 514c603

File tree

23 files changed

+11
-14
lines changed

23 files changed

+11
-14
lines changed

arch/powerpc/sysdev/dart_iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <linux/suspend.h>
3939
#include <linux/memblock.h>
4040
#include <linux/gfp.h>
41+
#include <linux/kmemleak.h>
4142
#include <asm/io.h>
4243
#include <asm/prom.h>
4344
#include <asm/iommu.h>

arch/powerpc/sysdev/msi_bitmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/slab.h>
1212
#include <linux/kernel.h>
13+
#include <linux/kmemleak.h>
1314
#include <linux/bitmap.h>
1415
#include <linux/bootmem.h>
1516
#include <asm/msi_bitmap.h>

arch/s390/kernel/nmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/hardirq.h>
1616
#include <linux/log2.h>
1717
#include <linux/kprobes.h>
18-
#include <linux/slab.h>
18+
#include <linux/kmemleak.h>
1919
#include <linux/time.h>
2020
#include <linux/module.h>
2121
#include <linux/sched/signal.h>

arch/s390/kernel/smp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <linux/err.h>
2828
#include <linux/spinlock.h>
2929
#include <linux/kernel_stat.h>
30-
#include <linux/kmemleak.h>
3130
#include <linux/delay.h>
3231
#include <linux/interrupt.h>
3332
#include <linux/irqflags.h>

arch/sparc/kernel/irq_64.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <linux/seq_file.h>
2323
#include <linux/ftrace.h>
2424
#include <linux/irq.h>
25-
#include <linux/kmemleak.h>
2625

2726
#include <asm/ptrace.h>
2827
#include <asm/processor.h>

arch/x86/kernel/pci-dma.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <linux/bootmem.h>
77
#include <linux/gfp.h>
88
#include <linux/pci.h>
9-
#include <linux/kmemleak.h>
109

1110
#include <asm/proto.h>
1211
#include <asm/dma.h>

drivers/iommu/exynos-iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/io.h>
1818
#include <linux/iommu.h>
1919
#include <linux/interrupt.h>
20+
#include <linux/kmemleak.h>
2021
#include <linux/list.h>
2122
#include <linux/of.h>
2223
#include <linux/of_iommu.h>

drivers/iommu/mtk_iommu_v1.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <linux/io.h>
2626
#include <linux/iommu.h>
2727
#include <linux/iopoll.h>
28-
#include <linux/kmemleak.h>
2928
#include <linux/list.h>
3029
#include <linux/of_address.h>
3130
#include <linux/of_iommu.h>

drivers/net/ethernet/ti/cpsw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <linux/of_net.h>
3636
#include <linux/of_device.h>
3737
#include <linux/if_vlan.h>
38+
#include <linux/kmemleak.h>
3839

3940
#include <linux/pinctrl/consumer.h>
4041

drivers/net/wireless/realtek/rtlwifi/pci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "efuse.h"
3232
#include <linux/interrupt.h>
3333
#include <linux/export.h>
34-
#include <linux/kmemleak.h>
3534
#include <linux/module.h>
3635

3736
MODULE_AUTHOR("lizhaoming <[email protected]>");

0 commit comments

Comments
 (0)