[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd-QRgrRMCab-Co=dU9a524KGU12LKcRape4hVfiYgRxAA@mail.gmail.com>
Date:	Thu, 6 Sep 2012 12:34:09 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	joerg.roedel@....com
Cc:	yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org
Subject: [PATCH] iommu/exynos: use list_del_init instead of list_del/INIT_LIST_HEAD
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
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@...ndmicro.com.cn>
---
 drivers/iommu/exynos-iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 80bad32..7fe44f8 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -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",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
