]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi-target: Use list_first_entry() where appropriate
authorRoland Dreier <roland@purestorage.com>
Wed, 31 Oct 2012 16:16:47 +0000 (09:16 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 7 Nov 2012 04:55:45 +0000 (20:55 -0800)
commit23a3ef9486ff4d55445b8ce910108ff90da47754
treee2e83a261f66d4887b8684134c9cfc1ca57e2a58
parent08085d16aa167b5f1212754b0d52aa21ec4ede9e
iscsi-target: Use list_first_entry() where appropriate

Instead of using the obfuscated pattern of

list_for_each_entry(var, list, ...)
break;

to set var to the first entry of a list, use the straightforward

var = list_first_entry(list, ...);

Reported-by: Joern Engel <joern@logfs.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_tq.c
drivers/target/iscsi/iscsi_target_util.c