]> git.hungrycats.org Git - linux/commitdiff
kfifo: don't include dma-mapping.h in kfifo.h
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Oct 2024 05:53:04 +0000 (07:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:27 +0000 (13:54 +0100)
[ Upstream commit 44059790a5cb9258ae6137387e4c39b717fd2ced ]

Nothing in kfifo.h directly needs dma-mapping.h, only two macros
use DMA_MAPPING_ERROR when actually instantiated.  Drop the
dma-mapping.h include to reduce include bloat.

Add an explicity <linux/io.h> include to drivers/mailbox/omap-mailbox.c
as that file uses __raw_readl and __raw_writel through a complicated
include chain involving <linux/dma-mapping.h>

Fixes: d52b761e4b1a ("kfifo: add kfifo_dma_out_prepare_mapped()")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241023055317.313234-1-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/omap-mailbox.c
include/linux/kfifo.h
samples/kfifo/dma-example.c

index 7a87424657a158d91b3164114efc5271a247c129..bd0b9762cef4f0983a23c0ce4ccac33897fd0f28 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/kfifo.h>
 #include <linux/err.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
index 564868bdce898b92da33b6b7b8e07128ccb0f972..fd743d4c4b4bdc50f40ff34275bc39ea49244f3b 100644 (file)
@@ -37,7 +37,6 @@
  */
 
 #include <linux/array_size.h>
-#include <linux/dma-mapping.h>
 #include <linux/spinlock.h>
 #include <linux/stddef.h>
 #include <linux/types.h>
index 48df719dac8c6d6fbdcf52bc58e76330f3772ce4..8076ac410161a3af8d77ef8930eb1fe15db9b979 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/kfifo.h>
 #include <linux/module.h>
 #include <linux/scatterlist.h>
+#include <linux/dma-mapping.h>
 
 /*
  * This module shows how to handle fifo dma operations.