Skip to content

Commit

Permalink
rpmsg: move is_rpmsg_ept_ready to the beginning
Browse files Browse the repository at this point in the history
it's convenient if other inline function want to call it

Signed-off-by: Xiang Xiao <[email protected]>
  • Loading branch information
xiaoxiang781216 committed May 20, 2020
1 parent cc4d4e2 commit da610d0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/include/openamp/rpmsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit da610d0

Please sign in to comment.