Whamcloud - gitweb
LU-6142 libcfs: use list_first_entry() where appropriate. 29/50829/4
authorMr NeilBrown <neilb@suse.de>
Wed, 6 Nov 2019 22:48:25 +0000 (09:48 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 May 2023 19:03:47 +0000 (19:03 +0000)
commit77afee8ae97ae1a44597b0639c53833b5a370375
treede5370b94f4fdc9c0d901db578d22ccedd8284a8
parent01e054b34cb894bd4ad1b9d68819db3e6fce4ed4
LU-6142 libcfs: use list_first_entry() where appropriate.

This patch changes
   list_entry(foo.next, ...)
to
   list_first_entry(&foo, ...)

in cases where 'foo' is a list head, rather than a list member.
It also re-indents following lines where that is needed.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ib7ec3f3ab7f34afb3b39fda0ff9d916514b062ff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50829
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/libcfs_string.c