From 1e2cae3a2edccfe5a50c255bc2f078e7cae148d8 Mon Sep 17 00:00:00 2001 From: Atul Akella Date: Mon, 3 Aug 2026 21:57:42 +0530 Subject: [PATCH] docs: clarify release_cb initialization requirement Document that callers must zero-initialize the endpoint structure before calling rpmsg_create_ept, including the release_cb field. Fixes #659 Signed-off-by: Atul Akella --- lib/include/openamp/rpmsg.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/include/openamp/rpmsg.h b/lib/include/openamp/rpmsg.h index 8871cfe..d95bc09 100644 --- a/lib/include/openamp/rpmsg.h +++ b/lib/include/openamp/rpmsg.h @@ -562,7 +562,10 @@ static inline int rpmsg_send_nocopy(struct rpmsg_endpoint *ept, * As an option Some rpmsg clients can specify an endpoint with a specific * source address. * - * @param ept Pointer to rpmsg endpoint + * @param ept Pointer to rpmsg endpoint. The release_cb field of the endpoint must be + * explicitly set by the caller: assign it to a valid callback if endpoint + * destruction notification is needed, or set it to NULL otherwise. + * Other fields do not require caller pre-initialization. * @param rdev RPMsg device associated with the endpoint * @param name Service name associated to the endpoint (maximum size \ref RPMSG_NAME_SIZE) * @param src Local address of the endpoint