iommu/vt-d: Remove unused dma_to_mm_pfn function
Subsystems (2)
PATCH 1/1 iommu/vt-d: Remove unused dma_to_mm_pfn function
Remove dma_to_buf_pfn function, which is not used in the codebase.
This was pointed by clang with the following warning:
drivers/iommu/intel/iommu.c:136:29: warning: unused function 'dma_to_mm_pfn' [-Wunused-function]
static inline unsigned long dma_to_mm_pfn(unsigned long dma_pfn)
^
Signed-off-by Maíra Canal <[email protected]>
--- drivers/iommu/intel/iommu.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/iommu/intel/iommu.c +0 -5
@@ -133,11 +133,6 @@ static inline unsigned long lvl_to_nr_pages(unsigned int lvl)/* VT-d pages must always be _smaller_ than MM pages. Otherwise things are never going to work. */ -static inline unsigned long dma_to_mm_pfn (unsigned long dma_pfn) -{ -return dma_pfn >> (PAGE_SHIFT -VTD_PAGE_SHIFT ); -} -static inline unsigned long mm_to_dma_pfn (unsigned long mm_pfn) {return mm_pfn << (PAGE_SHIFT -VTD_PAGE_SHIFT );
Signature · 1 line
2.31.1
Quoted 9 lines · Maíra Canal
Remove
dma_to_buf_pfnfunction, which is not used in the codebase.This was pointed by clang with the following warning:
drivers/iommu/intel/iommu.c:136:29: warning: unused function 'dma_to_mm_pfn' [-Wunused-function]
static inline unsigned longdma_to_mm_pfn(unsigned long dma_pfn)^
Thanks for the patch!
Fixes dd4e831960e4f ("intel-iommu: Change dma_set_pte_addr() to
dma_set_pte_pfn()")
Reviewed-by Nick Desaulniers <[email protected]>
Quoted 25 lines
Signed-off-by Maíra Canal <[email protected]>--- drivers/iommu/intel/iommu.c | 5 ----- 1 file changed, 5 deletions(-)drivers/iommu/intel/iommu.c +0
-6@@ -133,11 +133,6 @@ static inline unsigned long lvl_to_nr_pages(unsigned int lvl)/* VT-d pages must always be _smaller_ than MM pages. Otherwise things are never going to work. */ -static inline unsigned long dma_to_mm_pfn (unsigned long dma_pfn) -{ -return dma_pfn >> (PAGE_SHIFT -VTD_PAGE_SHIFT ); -} -static inline unsigned long mm_to_dma_pfn (unsigned long mm_pfn) {return mm_pfn << (PAGE_SHIFT -VTD_PAGE_SHIFT ); --2.31.1
Signature · 2 lines
Thanks, ~Nick Desaulniers