Skip to content

Commit

Permalink
iommu/exynos: use list_del_init instead of list_del/INIT_LIST_HEAD
Browse files Browse the repository at this point in the history
Using list_del_init() instead of list_del() + INIT_LIST_HEAD().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Wei Yongjun authored and Joerg Roedel committed Sep 18, 2012
1 parent 5698bd7 commit f8ffcc9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/exynos-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,7 @@ static void exynos_iommu_detach_device(struct iommu_domain *domain,
if (__exynos_sysmmu_disable(data)) {
dev_dbg(dev, "%s: Detached IOMMU with pgtable %#lx\n",
__func__, __pa(priv->pgtable));
list_del(&data->node);
INIT_LIST_HEAD(&data->node);
list_del_init(&data->node);

} else {
dev_dbg(dev, "%s: Detaching IOMMU with pgtable %#lx delayed",
Expand Down

0 comments on commit f8ffcc9

Please sign in to comment.