[PATCH 11/13] iscsi-target: Use list_add_(before|after) macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ken Helias <kenhelias@xxxxxxxxxxx>

Many places in the code uses list_add_tail/list_add to insert an entry
before/after another entry. This confuses the reader because these are usually
used to add an item to a list_head and not an entry. Better use the self
explaining function name.

Signed-off-by: Ken Helias <kenhelias@xxxxxxxxxxx>
Cc: linux-scsi@xxxxxxxxxxxxxxx
Cc: target-devel@xxxxxxxxxxxxxxx
---
 drivers/target/iscsi/iscsi_target_erl1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index cda4d80..1926d0b 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -835,8 +835,8 @@ static int iscsit_attach_ooo_cmdsn(
 					continue;
 
 				/* Insert before this entry */
-				list_add(&ooo_cmdsn->ooo_list,
-					ooo_tmp->ooo_list.prev);
+				list_add_before(&ooo_cmdsn->ooo_list,
+						&ooo_tmp->ooo_list);
 				break;
 			}
 		}
-- 
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux