mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	swiotlb: fix implicit debugfs declarations
Factor out the debugfs bits from rmem_swiotlb_device_init() into a separate
rmem_swiotlb_debugfs_init() to fix the implicit debugfs declarations.
Fixes: 461021875c50 ("swiotlb: Add restricted DMA pool initialization")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Claire Chang <tientzu@chromium.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
			
			
This commit is contained in:
		
							parent
							
								
									fec9b62509
								
							
						
					
					
						commit
						09a4a79d42
					
				
					 1 changed files with 16 additions and 5 deletions
				
			
		| 
						 | 
					@ -712,6 +712,21 @@ late_initcall(swiotlb_create_default_debugfs);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_DMA_RESTRICTED_POOL
 | 
					#ifdef CONFIG_DMA_RESTRICTED_POOL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef CONFIG_DEBUG_FS
 | 
				
			||||||
 | 
					static void rmem_swiotlb_debugfs_init(struct reserved_mem *rmem)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct io_tlb_mem *mem = rmem->priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mem->debugfs = debugfs_create_dir(rmem->name, debugfs_dir);
 | 
				
			||||||
 | 
						swiotlb_create_debugfs_files(mem);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					static void rmem_swiotlb_debugfs_init(struct reserved_mem *rmem)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct page *swiotlb_alloc(struct device *dev, size_t size)
 | 
					struct page *swiotlb_alloc(struct device *dev, size_t size)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct io_tlb_mem *mem = dev->dma_io_tlb_mem;
 | 
						struct io_tlb_mem *mem = dev->dma_io_tlb_mem;
 | 
				
			||||||
| 
						 | 
					@ -766,11 +781,7 @@ static int rmem_swiotlb_device_init(struct reserved_mem *rmem,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		rmem->priv = mem;
 | 
							rmem->priv = mem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (IS_ENABLED(CONFIG_DEBUG_FS)) {
 | 
							rmem_swiotlb_debugfs_init(rmem);
 | 
				
			||||||
			mem->debugfs =
 | 
					 | 
				
			||||||
				debugfs_create_dir(rmem->name, debugfs_dir);
 | 
					 | 
				
			||||||
			swiotlb_create_debugfs_files(mem);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev->dma_io_tlb_mem = mem;
 | 
						dev->dma_io_tlb_mem = mem;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue