iommu/exynos: use list_del_init instead of list_del/INIT_LIST_HEAD
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>
This commit is contained in:
parent
5698bd757d
commit
f8ffcc9279
|
@ -840,8 +840,7 @@ static void exynos_iommu_detach_device(struct iommu_domain *domain,
|
||||||
if (__exynos_sysmmu_disable(data)) {
|
if (__exynos_sysmmu_disable(data)) {
|
||||||
dev_dbg(dev, "%s: Detached IOMMU with pgtable %#lx\n",
|
dev_dbg(dev, "%s: Detached IOMMU with pgtable %#lx\n",
|
||||||
__func__, __pa(priv->pgtable));
|
__func__, __pa(priv->pgtable));
|
||||||
list_del(&data->node);
|
list_del_init(&data->node);
|
||||||
INIT_LIST_HEAD(&data->node);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dev_dbg(dev, "%s: Detaching IOMMU with pgtable %#lx delayed",
|
dev_dbg(dev, "%s: Detaching IOMMU with pgtable %#lx delayed",
|
||||||
|
|
Reference in New Issue