From 8f3a6de313391b6910aa7db185eb9f3e930a51cf Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 5 Oct 2010 23:30:19 +0400 Subject: sunrpc: Turn list_for_each-s into the ..._entry-s Saves some lines of code and some branticks when reading one. Signed-off-by: Pavel Emelyanov Reviewed-by: Chuck Lever Signed-off-by: J. Bruce Fields --- net/sunrpc/xprt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'net/sunrpc/xprt.c') diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 64a4a94fd6dd..4c8f18aff7c3 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -755,13 +755,11 @@ static void xprt_connect_status(struct rpc_task *task) */ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid) { - struct list_head *pos; + struct rpc_rqst *entry; - list_for_each(pos, &xprt->recv) { - struct rpc_rqst *entry = list_entry(pos, struct rpc_rqst, rq_list); + list_for_each_entry(entry, &xprt->recv, rq_list) if (entry->rq_xid == xid) return entry; - } dprintk("RPC: xprt_lookup_rqst did not find xid %08x\n", ntohl(xid)); -- cgit v1.2.2