* [PATCH] iommu/amd: remove unused variable flush_addr
@ 2017-10-22 11:49 Colin King
[not found] ` <20171022114945.1479-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-22 11:49 UTC (permalink / raw)
To: Joerg Roedel, iommu; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable flush_addr is being assigned but is never read; it
is redundant and can be removed. Cleans up the clang warning:
drivers/iommu/amd_iommu.c:2388:2: warning: Value stored to 'flush_addr'
is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/iommu/amd_iommu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 5a72f40d6532..a99d41fc3a1d 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2382,11 +2382,9 @@ static void __unmap_single(struct dma_ops_domain *dma_dom,
size_t size,
int dir)
{
- dma_addr_t flush_addr;
dma_addr_t i, start;
unsigned int pages;
- flush_addr = dma_addr;
pages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
dma_addr &= PAGE_MASK;
start = dma_addr;
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/amd: remove unused variable flush_addr
[not found] ` <20171022114945.1479-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2017-10-25 21:54 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2017-10-25 21:54 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Sun, 22 Oct 2017 13:49:45 +0200
Colin King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
> From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
>
> Variable flush_addr is being assigned but is never read; it
> is redundant and can be removed. Cleans up the clang warning:
>
> drivers/iommu/amd_iommu.c:2388:2: warning: Value stored to 'flush_addr'
> is never read
>
> Signed-off-by: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> ---
> drivers/iommu/amd_iommu.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index 5a72f40d6532..a99d41fc3a1d 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -2382,11 +2382,9 @@ static void __unmap_single(struct dma_ops_domain *dma_dom,
> size_t size,
> int dir)
> {
> - dma_addr_t flush_addr;
> dma_addr_t i, start;
> unsigned int pages;
>
> - flush_addr = dma_addr;
> pages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
> dma_addr &= PAGE_MASK;
> start = dma_addr;
Applied to iommu/updates for v4.15, thanks,
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-25 21:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-22 11:49 [PATCH] iommu/amd: remove unused variable flush_addr Colin King
[not found] ` <20171022114945.1479-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2017-10-25 21:54 ` Alex Williamson
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).