On Fri, Jun 11, 2021 at 11:26:47PM +0800, Claire Chang wrote: > Split the debugfs creation to make the code reusable for supporting > different bounce buffer pools, e.g. restricted DMA pool. > > Signed-off-by: Claire Chang <tientzu@xxxxxxxxxxxx> > --- > kernel/dma/swiotlb.c | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > > diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c > index 1a1208c81e85..8a3e2b3b246d 100644 > --- a/kernel/dma/swiotlb.c > +++ b/kernel/dma/swiotlb.c > @@ -64,6 +64,9 @@ > enum swiotlb_force swiotlb_force; > > struct io_tlb_mem *io_tlb_default_mem; > +#ifdef CONFIG_DEBUG_FS > +static struct dentry *debugfs_dir; > +#endif What about moving this declaration into the main CONFIG_DEBUG_FS block near the functions using it? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>