]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbac917a872f4f4e9f6a471023a02ec7b186e7e18
treeb35fbd26b5e9919d53d1cfd393dd17b04973cacf
parent97292ef8d9d66bd996b93b96638f92a03df5688f
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