Re: [Patch Part3 V1 19/22] iommu/vt-d: simplify intel_unmap_sg() and kill duplicated code

2014-04-22 Thread Jiang Liu
On 2014/4/22 15:38, David Woodhouse wrote: > On Tue, 2014-04-22 at 15:07 +0800, Jiang Liu wrote: >> + size_t size = 0; >> +#if 0 >> + /* current the third argument of intel_unmap_page is unsued */ >> + int i; >> + struct scatterlist *sg; >> >> - freelist =

Re: [Patch Part3 V1 19/22] iommu/vt-d: simplify intel_unmap_sg() and kill duplicated code

2014-04-22 Thread David Woodhouse
On Tue, 2014-04-22 at 15:07 +0800, Jiang Liu wrote: > + size_t size = 0; > +#if 0 > + /* current the third argument of intel_unmap_page is unsued */ > + int i; > + struct scatterlist *sg; > > - freelist = domain_unmap(domain, start_pfn, last_pfn); > +

[Patch Part3 V1 19/22] iommu/vt-d: simplify intel_unmap_sg() and kill duplicated code

2014-04-22 Thread Jiang Liu
Simplify intel_unmap_sg() by calling intel_unmap_page() and kill duplicated code, no functionality changes. Signed-off-by: Jiang Liu --- drivers/iommu/intel-iommu.c | 63 +-- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git

[Patch Part3 V1 19/22] iommu/vt-d: simplify intel_unmap_sg() and kill duplicated code

2014-04-22 Thread Jiang Liu
Simplify intel_unmap_sg() by calling intel_unmap_page() and kill duplicated code, no functionality changes. Signed-off-by: Jiang Liu jiang@linux.intel.com --- drivers/iommu/intel-iommu.c | 63 +-- 1 file changed, 18 insertions(+), 45 deletions(-)

Re: [Patch Part3 V1 19/22] iommu/vt-d: simplify intel_unmap_sg() and kill duplicated code

2014-04-22 Thread David Woodhouse
On Tue, 2014-04-22 at 15:07 +0800, Jiang Liu wrote: + size_t size = 0; +#if 0 + /* current the third argument of intel_unmap_page is unsued */ + int i; + struct scatterlist *sg; - freelist = domain_unmap(domain, start_pfn, last_pfn); +

Re: [Patch Part3 V1 19/22] iommu/vt-d: simplify intel_unmap_sg() and kill duplicated code

2014-04-22 Thread Jiang Liu
On 2014/4/22 15:38, David Woodhouse wrote: On Tue, 2014-04-22 at 15:07 +0800, Jiang Liu wrote: + size_t size = 0; +#if 0 + /* current the third argument of intel_unmap_page is unsued */ + int i; + struct scatterlist *sg; - freelist = domain_unmap(domain,