Skip to contentSkip to conversation

swiotlb: move struct io_tlb_slot to swiotlb.c

PATCH New Christoph Hellwig 1 participant 1 message Jul 13, 2022 DMA mapping helpers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swiotlb: move struct io_tlb_slot to swiotlb.c

No need to expose this structure definition in the header.

---
 include/linux/swiotlb.h | 6 +-----
 kernel/dma/swiotlb.c    | 6 ++++++
 2 files changed, 7 insertions(+), 5 deletions(-)
include/linux/swiotlb.h +1 -5
index f65ff19301201..cf2274a8b12f1 100644
@@ -106,11 +106,7 @@ struct io_tlb_mem {
 	unsigned int nareas;
 	unsigned int area_nslabs;
 	struct io_tlb_area *areas;
-	struct io_tlb_slot {
-		phys_addr_t orig_addr;
-		size_t alloc_size;
-		unsigned int list;
-	} *slots;
+	struct io_tlb_slot *slots;
 };
 extern struct io_tlb_mem io_tlb_default_mem;
 
kernel/dma/swiotlb.c +6 -0
index 0e61f4206de21..0ffb23c0e0e8e 100644
@@ -88,6 +88,12 @@ struct io_tlb_area {
 	spinlock_t lock;
 };
 
+struct io_tlb_slot {
+	phys_addr_t orig_addr;
+	size_t alloc_size;
+	unsigned int list;
+};
+
 static void swiotlb_adjust_nareas(unsigned int nareas)
 {
 	if (!is_power_of_2(nareas))
Signature · 1 line
2.30.2