From da610d09906229f82c89203c76c151588bc07e42 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 20 May 2020 21:24:58 +0800 Subject: [PATCH] rpmsg: move is_rpmsg_ept_ready to the beginning it's convenient if other inline function want to call it Signed-off-by: Xiang Xiao --- lib/include/openamp/rpmsg.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/include/openamp/rpmsg.h b/lib/include/openamp/rpmsg.h index c5ed7da3b..e4f268d3a 100644 --- a/lib/include/openamp/rpmsg.h +++ b/lib/include/openamp/rpmsg.h @@ -110,6 +110,19 @@ struct rpmsg_device { bool support_ns; }; +/** + * is_rpmsg_ept_ready - check if the rpmsg endpoint ready to send + * + * @ept: pointer to rpmsg endpoint + * + * Returns 1 if the rpmsg endpoint has both local addr and destination + * addr set, 0 otherwise + */ +static inline unsigned int is_rpmsg_ept_ready(struct rpmsg_endpoint *ept) +{ + return ept && ept->rdev && ept->dest_addr != RPMSG_ADDR_ANY; +} + /** * rpmsg_send_offchannel_raw() - send a message across to the remote processor, * specifying source and destination address. @@ -332,19 +345,6 @@ int rpmsg_create_ept(struct rpmsg_endpoint *ept, struct rpmsg_device *rdev, */ void rpmsg_destroy_ept(struct rpmsg_endpoint *ept); -/** - * is_rpmsg_ept_ready - check if the rpmsg endpoint ready to send - * - * @ept: pointer to rpmsg endpoint - * - * Returns 1 if the rpmsg endpoint has both local addr and destination - * addr set, 0 otherwise - */ -static inline unsigned int is_rpmsg_ept_ready(struct rpmsg_endpoint *ept) -{ - return ept && ept->rdev && ept->dest_addr != RPMSG_ADDR_ANY; -} - #if defined __cplusplus } #endif