linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove unused end_pfn
       [not found] <2017datesandletters@somehostname>
@ 2019-02-08 14:04 ` Tom Murphy
  2019-02-08 16:23   ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Murphy @ 2019-02-08 14:04 UTC (permalink / raw)
  Cc: Tom Murphy, Joerg Roedel, iommu, linux-kernel

This variable is useless.

---
 drivers/iommu/dma-iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 8e04b0603a4a..eff301d5e496 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -291,7 +291,7 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base,
 {
 	struct iommu_dma_cookie *cookie = domain->iova_cookie;
 	struct iova_domain *iovad = &cookie->iovad;
-	unsigned long order, base_pfn, end_pfn;
+	unsigned long order, base_pfn;
 	int attr;
 
 	if (!cookie || cookie->type != IOMMU_DMA_IOVA_COOKIE)
@@ -300,7 +300,6 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base,
 	/* Use the smallest supported page size for IOVA granularity */
 	order = __ffs(domain->pgsize_bitmap);
 	base_pfn = max_t(unsigned long, 1, base >> order);
-	end_pfn = (base + size - 1) >> order;
 
 	/* Check the domain allows at least some access to the device... */
 	if (domain->geometry.force_aperture) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] remove unused end_pfn
  2019-02-08 14:04 ` [PATCH] remove unused end_pfn Tom Murphy
@ 2019-02-08 16:23   ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2019-02-08 16:23 UTC (permalink / raw)
  To: Tom Murphy; +Cc: iommu, linux-kernel

On Fri, Feb 08, 2019 at 02:04:38PM +0000, Tom Murphy wrote:
> This variable is useless.
> 
> ---
>  drivers/iommu/dma-iommu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

A similar change is already in the iommu tree[1].

	Joerg

[1] https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?h=core


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-08 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2017datesandletters@somehostname>
2019-02-08 14:04 ` [PATCH] remove unused end_pfn Tom Murphy
2019-02-08 16:23   ` Joerg Roedel

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).