We currently include <linux/kernel.h> in <linux/list.h>, which pulls in definitions that many source files depend on. Include <linux/kernel.h> directly or other more specific files if available in preparation for removing the <linux/kernel.h> include from <linux/list.h>. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- arch/arm/lib32/io.c | 1 + arch/mips/include/asm/dma.h | 1 + commands/bthread.c | 1 + commands/mmc.c | 1 + drivers/clk/at91/at91sam9260.c | 1 + drivers/clk/at91/at91sam9g45.c | 1 + drivers/clk/at91/at91sam9n12.c | 1 + drivers/clk/at91/at91sam9rl.c | 1 + drivers/clk/at91/at91sam9x5.c | 1 + drivers/clk/at91/clk-audio-pll.c | 1 + drivers/clk/at91/clk-generated.c | 1 + drivers/clk/at91/clk-master.c | 1 + drivers/clk/at91/clk-pll.c | 1 + drivers/clk/at91/clk-usb.c | 1 + drivers/clk/at91/sama5d2.c | 1 + drivers/clk/at91/sama5d3.c | 1 + drivers/clk/at91/sama5d4.c | 1 + drivers/clk/rockchip/rst-rk3588.c | 1 + drivers/soc/sifive/sifive_l2_cache.c | 2 ++ drivers/usb/misc/onboard_usb_hub.c | 1 + include/linux/mtd/nand.h | 1 + include/mach/mvebu/debug_ll.h | 1 + lib/idr.c | 2 ++ 23 files changed, 25 insertions(+) diff --git a/arch/arm/lib32/io.c b/arch/arm/lib32/io.c index 780b1083a641..9e3acfe02246 100644 --- a/arch/arm/lib32/io.c +++ b/arch/arm/lib32/io.c @@ -3,6 +3,7 @@ #include <module.h> #include <linux/types.h> #include <asm/unaligned.h> +#include <linux/align.h> #include <io.h> /* diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h index dbcbfa40768d..46fae14ae5aa 100644 --- a/arch/mips/include/asm/dma.h +++ b/arch/mips/include/asm/dma.h @@ -8,6 +8,7 @@ #include <linux/pagemap.h> #include <linux/types.h> +#include <linux/minmax.h> #include <malloc.h> #include <xfuncs.h> #include <asm/addrspace.h> diff --git a/commands/bthread.c b/commands/bthread.c index aaade46e9206..00ff1837cc69 100644 --- a/commands/bthread.c +++ b/commands/bthread.c @@ -11,6 +11,7 @@ #include <getopt.h> #include <clock.h> #include <slice.h> +#include <linux/kernel.h> static int bthread_time(void) { diff --git a/commands/mmc.c b/commands/mmc.c index 041a721d3661..718558f18ba7 100644 --- a/commands/mmc.c +++ b/commands/mmc.c @@ -5,6 +5,7 @@ #include <stdio.h> #include <string.h> #include <getopt.h> +#include <linux/kernel.h> #include <dma.h> static int mmc_enh_area_setmax(struct mci *mci, u8 *ext_csd) diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c index c94cd9556616..b590dc629855 100644 --- a/drivers/clk/at91/at91sam9260.c +++ b/drivers/clk/at91/at91sam9260.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c index fedf96139348..3d2197c7f288 100644 --- a/drivers/clk/at91/at91sam9g45.c +++ b/drivers/clk/at91/at91sam9g45.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c index bb075de9fde6..3899242a33de 100644 --- a/drivers/clk/at91/at91sam9n12.c +++ b/drivers/clk/at91/at91sam9n12.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c index 95b02d86d596..a671c6be541e 100644 --- a/drivers/clk/at91/at91sam9rl.c +++ b/drivers/clk/at91/at91sam9rl.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c index f4dc7ceeea9f..e351848bf7a7 100644 --- a/drivers/clk/at91/at91sam9x5.c +++ b/drivers/clk/at91/at91sam9x5.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/clk-audio-pll.c b/drivers/clk/at91/clk-audio-pll.c index 71976567ea7f..019d68b7b7e7 100644 --- a/drivers/clk/at91/clk-audio-pll.c +++ b/drivers/clk/at91/clk-audio-pll.c @@ -38,6 +38,7 @@ #include <mfd/syscon.h> #include <linux/regmap.h> #include <linux/slab.h> +#include <linux/kernel.h> #include "pmc.h" diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c index e59cff2bdf9f..807c8179c0f1 100644 --- a/drivers/clk/at91/clk-generated.c +++ b/drivers/clk/at91/clk-generated.c @@ -14,6 +14,7 @@ #include <of.h> #include <mfd/syscon.h> #include <linux/regmap.h> +#include <linux/kernel.h> #include "pmc.h" diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c index db5e235b6b8f..ed358257dcb6 100644 --- a/drivers/clk/at91/clk-master.c +++ b/drivers/clk/at91/clk-master.c @@ -11,6 +11,7 @@ #include <mfd/syscon.h> #include <linux/regmap.h> #include <linux/printk.h> +#include <linux/kernel.h> #include "pmc.h" diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c index 027e1fc77349..917b2224fe19 100644 --- a/drivers/clk/at91/clk-pll.c +++ b/drivers/clk/at91/clk-pll.c @@ -9,6 +9,7 @@ #include <of.h> #include <mfd/syscon.h> #include <linux/regmap.h> +#include <linux/kernel.h> #include "pmc.h" diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c index 4473dc7c3491..96a35b5cb09e 100644 --- a/drivers/clk/at91/clk-usb.c +++ b/drivers/clk/at91/clk-usb.c @@ -9,6 +9,7 @@ #include <of.h> #include <mfd/syscon.h> #include <linux/regmap.h> +#include <linux/kernel.h> #include "pmc.h" diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c index 96c0d1f6a46d..cb4e1b78a5e3 100644 --- a/drivers/clk/at91/sama5d2.c +++ b/drivers/clk/at91/sama5d2.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c index 53a1a7413a02..4212afb21827 100644 --- a/drivers/clk/at91/sama5d3.c +++ b/drivers/clk/at91/sama5d3.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c index 8fbd81088349..bd02bdc915f5 100644 --- a/drivers/clk/at91/sama5d4.c +++ b/drivers/clk/at91/sama5d4.c @@ -2,6 +2,7 @@ #include <linux/clk-provider.h> #include <mfd/syscon.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <stdio.h> #include <dt-bindings/clock/at91.h> diff --git a/drivers/clk/rockchip/rst-rk3588.c b/drivers/clk/rockchip/rst-rk3588.c index 7501b92b45f7..fdc83cefc7ad 100644 --- a/drivers/clk/rockchip/rst-rk3588.c +++ b/drivers/clk/rockchip/rst-rk3588.c @@ -6,6 +6,7 @@ */ #include <dt-bindings/reset/rockchip,rk3588-cru.h> +#include <linux/array_size.h> #include "clk.h" /* 0xFD7C0000 + 0x0A00 */ diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c index c404143974fc..239e65292ae2 100644 --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -16,7 +16,9 @@ #include <init.h> #include <soc/sifive/l2_cache.h> #include <asm/barrier.h> +#include <linux/align.h> #include <linux/bitops.h> +#include <linux/bug.h> #define SIFIVE_L2_DIRECCFIX_LOW 0x100 #define SIFIVE_L2_DIRECCFIX_HIGH 0x104 diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 9e94caaa8456..603fd693a137 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -12,6 +12,7 @@ #include <linux/printk.h> #include <of_device.h> #include <regulator.h> +#include <xfuncs.h> #include <linux/usb/usb.h> #include "onboard_usb_hub.h" diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index ef2546490d65..fda55df59a26 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -11,6 +11,7 @@ #define __LINUX_MTD_NAND_H #include <linux/mtd/mtd.h> +#include <linux/minmax.h> struct nand_device; diff --git a/include/mach/mvebu/debug_ll.h b/include/mach/mvebu/debug_ll.h index 9197cd68eb99..cf08776d4fcc 100644 --- a/include/mach/mvebu/debug_ll.h +++ b/include/mach/mvebu/debug_ll.h @@ -5,6 +5,7 @@ #define __MACH_MVEBU_DEBUG_LL_H__ #include <io.h> +#include <linux/bits.h> #define UART_BASE 0xf1012000 #define UARTn_BASE(n) (UART_BASE + ((n) * 0x100)) diff --git a/lib/idr.c b/lib/idr.c index 10a714ac03f0..a25e46b17b95 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -6,6 +6,8 @@ #include <errno.h> #include <linux/idr.h> +#include <malloc.h> +#include <linux/minmax.h> struct idr *__idr_find(struct idr *head, int lookup_id) { -- 2.39.2