* [PATCH] iommu/vt-d: Remove unused dma_to_mm_pfn function
@ 2021-11-07 22:53 Maíra Canal
2021-11-10 20:19 ` Nick Desaulniers
0 siblings, 1 reply; 2+ messages in thread
From: Maíra Canal @ 2021-11-07 22:53 UTC (permalink / raw)
To: dwmw2, baolu.lu, joro, will, nathan, ndesaulniers
Cc: iommu, linux-kernel, llvm
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 <maira.canal@usp.br>
---
drivers/iommu/intel/iommu.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 0bde0c8b4126..35300b5b69f7 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/vt-d: Remove unused dma_to_mm_pfn function
2021-11-07 22:53 [PATCH] iommu/vt-d: Remove unused dma_to_mm_pfn function Maíra Canal
@ 2021-11-10 20:19 ` Nick Desaulniers
0 siblings, 0 replies; 2+ messages in thread
From: Nick Desaulniers @ 2021-11-10 20:19 UTC (permalink / raw)
To: Maíra Canal
Cc: dwmw2, baolu.lu, joro, will, nathan, iommu, linux-kernel, llvm
On Sun, Nov 7, 2021 at 2:53 PM Maíra Canal <maira.canal@usp.br> wrote:
>
> 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)
> ^
Thanks for the patch!
Fixes: dd4e831960e4f ("intel-iommu: Change dma_set_pte_addr() to
dma_set_pte_pfn()")
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> Signed-off-by: Maíra Canal <maira.canal@usp.br>
> ---
> drivers/iommu/intel/iommu.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 0bde0c8b4126..35300b5b69f7 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -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
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-10 20:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-07 22:53 [PATCH] iommu/vt-d: Remove unused dma_to_mm_pfn function Maíra Canal
2021-11-10 20:19 ` Nick Desaulniers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).