Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: remove mm.h inclusion from netdevice.h

Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).

To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
Removal of mm.h from scatterlist.h was tried and was found not feasible
on most archs, so the link was cutoff earlier.

Hope people are OK with tiny include file.

Note, that mm_types.h is still dragged in, but it is a separate story.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexey Dobriyan and committed by
David S. Miller
b7f080cf 4003b658

+79 -11
+1
arch/arm/mach-davinci/board-mityomapl138.c
··· 20 20 #include <linux/spi/spi.h> 21 21 #include <linux/spi/flash.h> 22 22 23 + #include <asm/io.h> 23 24 #include <asm/mach-types.h> 24 25 #include <asm/mach/arch.h> 25 26 #include <mach/common.h>
+1
arch/arm/mach-davinci/dm646x.c
··· 8 8 * is licensed "as is" without any warranty of any kind, whether express 9 9 * or implied. 10 10 */ 11 + #include <linux/dma-mapping.h> 11 12 #include <linux/init.h> 12 13 #include <linux/clk.h> 13 14 #include <linux/serial_8250.h>
+1
arch/arm/mach-davinci/pm.c
··· 17 17 18 18 #include <asm/cacheflush.h> 19 19 #include <asm/delay.h> 20 + #include <asm/io.h> 20 21 21 22 #include <mach/da8xx.h> 22 23 #include <mach/sram.h>
+1
arch/arm/mach-imx/dma-v1.c
··· 26 26 #include <linux/init.h> 27 27 #include <linux/kernel.h> 28 28 #include <linux/interrupt.h> 29 + #include <linux/err.h> 29 30 #include <linux/errno.h> 30 31 #include <linux/clk.h> 31 32 #include <linux/scatterlist.h>
+1
arch/arm/mach-imx/mach-mx31_3ds.c
··· 13 13 */ 14 14 15 15 #include <linux/delay.h> 16 + #include <linux/dma-mapping.h> 16 17 #include <linux/types.h> 17 18 #include <linux/init.h> 18 19 #include <linux/clk.h>
+1
arch/arm/mach-iop13xx/setup.c
··· 17 17 * 18 18 */ 19 19 20 + #include <linux/dma-mapping.h> 20 21 #include <linux/serial_8250.h> 21 22 #include <linux/io.h> 22 23 #ifdef CONFIG_MTD_PHYSMAP
+1
arch/arm/mach-mxs/devices/platform-auart.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <asm/sizes.h> 10 11 #include <mach/mx23.h> 11 12 #include <mach/mx28.h>
+1
arch/arm/mach-mxs/devices/platform-dma.c
··· 6 6 * Free Software Foundation. 7 7 */ 8 8 #include <linux/compiler.h> 9 + #include <linux/dma-mapping.h> 9 10 #include <linux/err.h> 10 11 #include <linux/init.h> 11 12
+1
arch/arm/mach-mxs/devices/platform-fec.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <asm/sizes.h> 10 11 #include <mach/mx28.h> 11 12 #include <mach/devices-common.h>
+1
arch/arm/plat-mxc/devices/platform-fec.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <asm/sizes.h> 10 11 #include <mach/hardware.h> 11 12 #include <mach/devices-common.h>
+1
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <mach/hardware.h> 10 11 #include <mach/devices-common.h> 11 12
+1
arch/arm/plat-mxc/devices/platform-imx-fb.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <mach/hardware.h> 10 11 #include <mach/devices-common.h> 11 12
+1
arch/arm/plat-mxc/devices/platform-ipu-core.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <mach/hardware.h> 10 11 #include <mach/devices-common.h> 11 12
+1
arch/arm/plat-mxc/devices/platform-mxc-ehci.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <mach/hardware.h> 10 11 #include <mach/devices-common.h> 11 12
+1
arch/arm/plat-mxc/devices/platform-mxc-mmc.c
··· 6 6 * the terms of the GNU General Public License version 2 as published by the 7 7 * Free Software Foundation. 8 8 */ 9 + #include <linux/dma-mapping.h> 9 10 #include <mach/hardware.h> 10 11 #include <mach/devices-common.h> 11 12
+1
arch/arm/plat-nomadik/include/plat/ste_dma40.h
··· 10 10 #define STE_DMA40_H 11 11 12 12 #include <linux/dmaengine.h> 13 + #include <linux/scatterlist.h> 13 14 #include <linux/workqueue.h> 14 15 #include <linux/interrupt.h> 15 16
+1
arch/x86/kernel/tboot.c
··· 36 36 #include <asm/bootparam.h> 37 37 #include <asm/pgtable.h> 38 38 #include <asm/pgalloc.h> 39 + #include <asm/swiotlb.h> 39 40 #include <asm/fixmap.h> 40 41 #include <asm/proto.h> 41 42 #include <asm/setup.h>
+1
crypto/async_tx/raid6test.c
··· 21 21 */ 22 22 #include <linux/async_tx.h> 23 23 #include <linux/gfp.h> 24 + #include <linux/mm.h> 24 25 #include <linux/random.h> 25 26 26 27 #undef pr
+1
drivers/dma/coh901318.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/kernel.h> /* printk() */ 13 13 #include <linux/fs.h> /* everything... */ 14 + #include <linux/scatterlist.h> 14 15 #include <linux/slab.h> /* kmalloc() */ 15 16 #include <linux/dmaengine.h> 16 17 #include <linux/platform_device.h>
+1
drivers/dma/dmaengine.c
··· 45 45 * See Documentation/dmaengine.txt for more details 46 46 */ 47 47 48 + #include <linux/dma-mapping.h> 48 49 #include <linux/init.h> 49 50 #include <linux/module.h> 50 51 #include <linux/mm.h>
+1
drivers/dma/dmatest.c
··· 8 8 * published by the Free Software Foundation. 9 9 */ 10 10 #include <linux/delay.h> 11 + #include <linux/dma-mapping.h> 11 12 #include <linux/dmaengine.h> 12 13 #include <linux/init.h> 13 14 #include <linux/kthread.h>
+1
drivers/dma/ipu/ipu_idmac.c
··· 9 9 * published by the Free Software Foundation. 10 10 */ 11 11 12 + #include <linux/dma-mapping.h> 12 13 #include <linux/init.h> 13 14 #include <linux/platform_device.h> 14 15 #include <linux/err.h>
+1
drivers/dma/ste_dma40.c
··· 6 6 * License terms: GNU General Public License (GPL) version 2 7 7 */ 8 8 9 + #include <linux/dma-mapping.h> 9 10 #include <linux/kernel.h> 10 11 #include <linux/slab.h> 11 12 #include <linux/dmaengine.h>
+1
drivers/media/dvb/mantis/mantis_ca.c
··· 22 22 #include <linux/slab.h> 23 23 #include <linux/sched.h> 24 24 #include <linux/interrupt.h> 25 + #include <asm/io.h> 25 26 26 27 #include "dmxdev.h" 27 28 #include "dvbdev.h"
+1
drivers/media/dvb/mantis/mantis_evm.c
··· 23 23 #include <linux/signal.h> 24 24 #include <linux/sched.h> 25 25 #include <linux/interrupt.h> 26 + #include <asm/io.h> 26 27 27 28 #include "dmxdev.h" 28 29 #include "dvbdev.h"
+1
drivers/media/dvb/mantis/mantis_hif.c
··· 23 23 #include <linux/sched.h> 24 24 25 25 #include <linux/interrupt.h> 26 + #include <asm/io.h> 26 27 27 28 #include "dmxdev.h" 28 29 #include "dvbdev.h"
+1
drivers/media/dvb/mantis/mantis_ioc.c
··· 24 24 #include <linux/signal.h> 25 25 #include <linux/sched.h> 26 26 #include <linux/interrupt.h> 27 + #include <asm/io.h> 27 28 28 29 #include "dmxdev.h" 29 30 #include "dvbdev.h"
+1
drivers/media/dvb/mantis/mantis_pcmcia.c
··· 23 23 #include <linux/signal.h> 24 24 #include <linux/sched.h> 25 25 #include <linux/interrupt.h> 26 + #include <asm/io.h> 26 27 27 28 #include "dmxdev.h" 28 29 #include "dvbdev.h"
+1
drivers/media/dvb/mantis/mantis_uart.c
··· 20 20 21 21 #include <linux/kernel.h> 22 22 #include <linux/spinlock.h> 23 + #include <asm/io.h> 23 24 24 25 #include <linux/signal.h> 25 26 #include <linux/sched.h>
+1
drivers/media/dvb/mantis/mantis_vp1034.c
··· 21 21 #include <linux/signal.h> 22 22 #include <linux/sched.h> 23 23 #include <linux/interrupt.h> 24 + #include <asm/io.h> 24 25 25 26 #include "dmxdev.h" 26 27 #include "dvbdev.h"
+1
drivers/mmc/host/tmio_mmc_dma.c
··· 11 11 */ 12 12 13 13 #include <linux/device.h> 14 + #include <linux/dma-mapping.h> 14 15 #include <linux/dmaengine.h> 15 16 #include <linux/mfd/tmio.h> 16 17 #include <linux/mmc/host.h>
+1
drivers/mtd/nand/atmel_nand.c
··· 22 22 * 23 23 */ 24 24 25 + #include <linux/dma-mapping.h> 25 26 #include <linux/slab.h> 26 27 #include <linux/module.h> 27 28 #include <linux/moduleparam.h>
+1
drivers/net/arm/ks8695net.c
··· 16 16 * Vincent Sanders <vince@simtec.co.uk> 17 17 */ 18 18 19 + #include <linux/dma-mapping.h> 19 20 #include <linux/module.h> 20 21 #include <linux/ioport.h> 21 22 #include <linux/netdevice.h>
+1
drivers/net/bnx2x/bnx2x.h
··· 14 14 #ifndef BNX2X_H 15 15 #define BNX2X_H 16 16 #include <linux/netdevice.h> 17 + #include <linux/dma-mapping.h> 17 18 #include <linux/types.h> 18 19 19 20 /* compilation time flags */
+1
drivers/net/can/janz-ican3.c
··· 22 22 #include <linux/can/error.h> 23 23 24 24 #include <linux/mfd/janz.h> 25 + #include <asm/io.h> 25 26 26 27 /* the DPM has 64k of memory, organized into 256x 256 byte pages */ 27 28 #define DPM_NUM_PAGES 256
+1
drivers/net/can/softing/softing_fw.c
··· 20 20 #include <linux/firmware.h> 21 21 #include <linux/sched.h> 22 22 #include <asm/div64.h> 23 + #include <asm/io.h> 23 24 24 25 #include "softing.h" 25 26
+1
drivers/net/can/softing/softing_main.c
··· 21 21 #include <linux/module.h> 22 22 #include <linux/init.h> 23 23 #include <linux/interrupt.h> 24 + #include <asm/io.h> 24 25 25 26 #include "softing.h" 26 27
+1
drivers/net/ethoc.c
··· 11 11 * Written by Thierry Reding <thierry.reding@avionic-design.de> 12 12 */ 13 13 14 + #include <linux/dma-mapping.h> 14 15 #include <linux/etherdevice.h> 15 16 #include <linux/crc32.h> 16 17 #include <linux/interrupt.h>
+1
drivers/net/fec_mpc52xx.c
··· 14 14 * 15 15 */ 16 16 17 + #include <linux/dma-mapping.h> 17 18 #include <linux/module.h> 18 19 19 20 #include <linux/kernel.h>
+1
drivers/net/greth.c
··· 22 22 * Marko Isomaki 23 23 */ 24 24 25 + #include <linux/dma-mapping.h> 25 26 #include <linux/module.h> 26 27 #include <linux/uaccess.h> 27 28 #include <linux/init.h>
+1
drivers/net/irda/pxaficp_ir.c
··· 12 12 * Infra-red driver (SIR/FIR) for the PXA2xx embedded microprocessor 13 13 * 14 14 */ 15 + #include <linux/dma-mapping.h> 15 16 #include <linux/interrupt.h> 16 17 #include <linux/module.h> 17 18 #include <linux/netdevice.h>
+1
drivers/net/ks8851_mll.c
··· 35 35 #include <linux/platform_device.h> 36 36 #include <linux/delay.h> 37 37 #include <linux/slab.h> 38 + #include <asm/io.h> 38 39 39 40 #define DRV_NAME "ks8851_mll" 40 41
+1
drivers/net/sgiseeq.c
··· 6 6 7 7 #undef DEBUG 8 8 9 + #include <linux/dma-mapping.h> 9 10 #include <linux/kernel.h> 10 11 #include <linux/module.h> 11 12 #include <linux/slab.h>
+1
drivers/net/stmmac/dwmac1000_core.c
··· 28 28 29 29 #include <linux/crc32.h> 30 30 #include <linux/slab.h> 31 + #include <asm/io.h> 31 32 #include "dwmac1000.h" 32 33 33 34 static void dwmac1000_core_init(void __iomem *ioaddr)
+1
drivers/net/stmmac/dwmac1000_dma.c
··· 26 26 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> 27 27 *******************************************************************************/ 28 28 29 + #include <asm/io.h> 29 30 #include "dwmac1000.h" 30 31 #include "dwmac_dma.h" 31 32
+1
drivers/net/stmmac/dwmac100_core.c
··· 29 29 *******************************************************************************/ 30 30 31 31 #include <linux/crc32.h> 32 + #include <asm/io.h> 32 33 #include "dwmac100.h" 33 34 34 35 static void dwmac100_core_init(void __iomem *ioaddr)
+1
drivers/net/stmmac/dwmac100_dma.c
··· 28 28 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> 29 29 *******************************************************************************/ 30 30 31 + #include <asm/io.h> 31 32 #include "dwmac100.h" 32 33 #include "dwmac_dma.h" 33 34
+1
drivers/net/stmmac/stmmac_ethtool.c
··· 27 27 #include <linux/interrupt.h> 28 28 #include <linux/mii.h> 29 29 #include <linux/phy.h> 30 + #include <asm/io.h> 30 31 31 32 #include "stmmac.h" 32 33 #include "dwmac_dma.h"
+1
drivers/net/stmmac/stmmac_mdio.c
··· 27 27 #include <linux/mii.h> 28 28 #include <linux/phy.h> 29 29 #include <linux/slab.h> 30 + #include <asm/io.h> 30 31 31 32 #include "stmmac.h" 32 33
+1
drivers/net/usb/cdc-phonet.c
··· 21 21 */ 22 22 23 23 #include <linux/kernel.h> 24 + #include <linux/mm.h> 24 25 #include <linux/module.h> 25 26 #include <linux/gfp.h> 26 27 #include <linux/usb.h>
+1
drivers/net/vxge/vxge-config.h
··· 16 16 #include <linux/hardirq.h> 17 17 #include <linux/list.h> 18 18 #include <linux/slab.h> 19 + #include <asm/io.h> 19 20 20 21 #ifndef VXGE_CACHE_LINE_SIZE 21 22 #define VXGE_CACHE_LINE_SIZE 128
+1
drivers/net/wireless/ath/ath5k/base.c
··· 42 42 43 43 #include <linux/module.h> 44 44 #include <linux/delay.h> 45 + #include <linux/dma-mapping.h> 45 46 #include <linux/hardirq.h> 46 47 #include <linux/if.h> 47 48 #include <linux/io.h>
+1
drivers/net/wireless/ath/ath9k/beacon.c
··· 14 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #include <linux/dma-mapping.h> 17 18 #include "ath9k.h" 18 19 19 20 #define FUDGE 2
+1
drivers/net/wireless/ath/ath9k/init.c
··· 14 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #include <linux/dma-mapping.h> 17 18 #include <linux/slab.h> 18 19 #include <linux/ath9k_platform.h> 19 20
+1
drivers/net/wireless/ath/ath9k/recv.c
··· 14 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #include <linux/dma-mapping.h> 17 18 #include "ath9k.h" 18 19 #include "ar9003_mac.h" 19 20
+1
drivers/net/wireless/ath/ath9k/xmit.c
··· 14 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #include <linux/dma-mapping.h> 17 18 #include "ath9k.h" 18 19 #include "ar9003_mac.h" 19 20
+1
drivers/staging/pohmelfs/crypto.c
··· 17 17 #include <linux/highmem.h> 18 18 #include <linux/kthread.h> 19 19 #include <linux/pagemap.h> 20 + #include <linux/scatterlist.h> 20 21 #include <linux/slab.h> 21 22 22 23 #include "netfs.h"
+1
drivers/tty/serial/ifx6x60.c
··· 36 36 * you need to use this driver for another platform. 37 37 * 38 38 *****************************************************************************/ 39 + #include <linux/dma-mapping.h> 39 40 #include <linux/module.h> 40 41 #include <linux/termios.h> 41 42 #include <linux/tty.h>
+1
drivers/usb/gadget/f_phonet.c
··· 20 20 * 02110-1301 USA 21 21 */ 22 22 23 + #include <linux/mm.h> 23 24 #include <linux/slab.h> 24 25 #include <linux/kernel.h> 25 26 #include <linux/device.h>
+1
include/crypto/if_alg.h
··· 16 16 #include <linux/compiler.h> 17 17 #include <linux/completion.h> 18 18 #include <linux/if_alg.h> 19 + #include <linux/scatterlist.h> 19 20 #include <linux/types.h> 20 21 #include <net/sock.h> 21 22
+13
include/linux/dma-direction.h
··· 1 + #ifndef _LINUX_DMA_DIRECTION_H 2 + #define _LINUX_DMA_DIRECTION_H 3 + /* 4 + * These definitions mirror those in pci.h, so they can be used 5 + * interchangeably with their PCI_ counterparts. 6 + */ 7 + enum dma_data_direction { 8 + DMA_BIDIRECTIONAL = 0, 9 + DMA_TO_DEVICE = 1, 10 + DMA_FROM_DEVICE = 2, 11 + DMA_NONE = 3, 12 + }; 13 + #endif
+1 -9
include/linux/dma-mapping.h
··· 4 4 #include <linux/device.h> 5 5 #include <linux/err.h> 6 6 #include <linux/dma-attrs.h> 7 + #include <linux/dma-direction.h> 7 8 #include <linux/scatterlist.h> 8 - 9 - /* These definitions mirror those in pci.h, so they can be used 10 - * interchangeably with their PCI_ counterparts */ 11 - enum dma_data_direction { 12 - DMA_BIDIRECTIONAL = 0, 13 - DMA_TO_DEVICE = 1, 14 - DMA_FROM_DEVICE = 2, 15 - DMA_NONE = 3, 16 - }; 17 9 18 10 struct dma_map_ops { 19 11 void* (*alloc_coherent)(struct device *dev, size_t size,
+3 -1
include/linux/dmaengine.h
··· 23 23 24 24 #include <linux/device.h> 25 25 #include <linux/uio.h> 26 - #include <linux/dma-mapping.h> 26 + #include <linux/dma-direction.h> 27 + 28 + struct scatterlist; 27 29 28 30 /** 29 31 * typedef dma_cookie_t - an opaque DMA cookie
-1
include/linux/netdevice.h
··· 34 34 #include <linux/pm_qos_params.h> 35 35 #include <linux/timer.h> 36 36 #include <linux/delay.h> 37 - #include <linux/mm.h> 38 37 #include <asm/atomic.h> 39 38 #include <asm/cache.h> 40 39 #include <asm/byteorder.h>
+1
net/sched/sch_netem.c
··· 13 13 * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro> 14 14 */ 15 15 16 + #include <linux/mm.h> 16 17 #include <linux/module.h> 17 18 #include <linux/slab.h> 18 19 #include <linux/types.h>
+1
security/apparmor/lib.c
··· 12 12 * License. 13 13 */ 14 14 15 + #include <linux/mm.h> 15 16 #include <linux/slab.h> 16 17 #include <linux/string.h> 17 18 #include <linux/vmalloc.h>