From: Matthew Wilcox Date: Sun, 18 Jun 2006 03:37:30 +0000 (-0700) Subject: IB/srp: Get rid of unneeded use of list_for_each_entry_safe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=549c5fc2c8149498118f2494a1b6a4938ca05985;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git IB/srp: Get rid of unneeded use of list_for_each_entry_safe() list_for_each_entry_safe() is used in one place where the list isn't modified. So just change it to list_for_each_entry(). Signed-off-by: Matthew Wilcox Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 28d741e7805c..7c0a3d9c9056 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1867,8 +1867,7 @@ static void srp_remove_one(struct ib_device *device) * commands and don't try to reconnect. */ mutex_lock(&host->target_mutex); - list_for_each_entry_safe(target, tmp_target, - &host->target_list, list) { + list_for_each_entry(target, &host->target_list, list) { spin_lock_irqsave(target->scsi_host->host_lock, flags); if (target->state != SRP_TARGET_REMOVED) target->state = SRP_TARGET_REMOVED;