This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b1e1d047f599ee8d6fc04549a3b025cddd6375f1
Author: Bowen Wang <[email protected]>
AuthorDate: Tue Nov 24 16:57:56 2026 +0800

    drivers/rpmsg: print the endpoint refcount with atomic_load()
    
    rpmsg_dump_epts() passes ept->refcnt, now an atomic_uint, to syslog().
    Reading an atomic object as a variadic argument is an implicit atomic
    load, which clang lowers to the generic __atomic_load libcall that
    NuttX does not provide:
    
      drivers/rpmsg/rpmsg.c:989: undefined reference to `__atomic_load'
    
    Read it with atomic_load() and print it as an unsigned int.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/rpmsg/rpmsg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rpmsg/rpmsg.c b/drivers/rpmsg/rpmsg.c
index e8d9cb07c03..75f9e9e2684 100644
--- a/drivers/rpmsg/rpmsg.c
+++ b/drivers/rpmsg/rpmsg.c
@@ -952,9 +952,9 @@ void rpmsg_dump_epts(FAR struct rpmsg_device *rdev)
     {
       ept = container_of(node, struct rpmsg_endpoint, node);
       syslog(LOG_EMERG, "    ept %s %p: addr=%" PRIu32 " "
-             "dest=%" PRIu32 " refcnt=%" PRIu32 " priority=%" PRIu8
+             "dest=%" PRIu32 " refcnt=%u priority=%" PRIu8
              " priv=%p\n", ept->name, ept, ept->addr, ept->dest_addr,
-             ept->refcnt, ept->priority, ept->priv);
+             atomic_load(&ept->refcnt), ept->priority, ept->priv);
     }
 }
 

Reply via email to