tipc: unify tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() functions
authorJon Paul Maloy <jon.maloy@ericsson.com>
Tue, 3 Jan 2017 15:55:09 +0000 (10:55 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Jan 2017 16:13:05 +0000 (11:13 -0500)
commit8c44e1af16b2983b3df93117cd0ca40638998ce3
treeb35fbd26b5e9919d53d1cfd393dd17b04973cacf
parentaa276dd7b3fcc04b4a9c056a496d69271b7da8da
tipc: unify tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() functions

The functions tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() are very
similar. The latter function is also called from two locations, and
there will be more in the coming commits, which will all need to test on
different conditions.

Instead of making yet another duplicates of the function, we now
introduce a new macro tipc_wait_for_cond() where the wakeup condition
can be stated as an argument to the call. This macro replaces all
current and future uses of the two functions, which can now be
eliminated.

Acked-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c