* [PATCH 2/5] iommu: remove redundant NULL check before dma_ops_domain_free().
[not found] <1360641713-24895-1-git-send-email-tipecaml@gmail.com>
@ 2013-02-12 4:01 ` Cyril Roelandt
[not found] ` <1360641713-24895-3-git-send-email-tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Cyril Roelandt @ 2013-02-12 4:01 UTC (permalink / raw)
To: linux-kernel, kernel-janitors; +Cc: Cyril Roelandt, joro, iommu
dma_ops_domain_free on a NULL pointer is a no-op, so the NULL check in
amd_iommu_init_dma_ops() can be removed.
Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
---
drivers/iommu/amd_iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index d33eaaf..98f555d 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3187,8 +3187,7 @@ int __init amd_iommu_init_dma_ops(void)
free_domains:
for_each_iommu(iommu) {
- if (iommu->default_dom)
- dma_ops_domain_free(iommu->default_dom);
+ dma_ops_domain_free(iommu->default_dom);
}
return ret;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/5] iommu: remove redundant NULL check before dma_ops_domain_free().
[not found] ` <1360641713-24895-3-git-send-email-tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-02-13 11:13 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2013-02-13 11:13 UTC (permalink / raw)
To: Cyril Roelandt
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Tue, Feb 12, 2013 at 05:01:50AM +0100, Cyril Roelandt wrote:
> dma_ops_domain_free on a NULL pointer is a no-op, so the NULL check in
> amd_iommu_init_dma_ops() can be removed.
>
> Signed-off-by: Cyril Roelandt <tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/iommu/amd_iommu.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to x86/amd, Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-13 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1360641713-24895-1-git-send-email-tipecaml@gmail.com>
2013-02-12 4:01 ` [PATCH 2/5] iommu: remove redundant NULL check before dma_ops_domain_free() Cyril Roelandt
[not found] ` <1360641713-24895-3-git-send-email-tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-13 11:13 ` 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).