From 4fccbc1074661803f627dedd73eb772e0c27e328 Mon Sep 17 00:00:00 2001 From: Guiding Li Date: Fri, 10 Feb 2023 17:05:54 +0800 Subject: [PATCH] openamp: add error log when ept->cb return error add helpful log when rpmsg endpoint callback return error Signed-off-by: Guiding Li Signed-off-by: Bowen Wang --- lib/rpmsg/rpmsg_virtio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c index ea4cc0d9e..e83c0cbba 100644 --- a/lib/rpmsg/rpmsg_virtio.c +++ b/lib/rpmsg/rpmsg_virtio.c @@ -571,8 +571,10 @@ static void rpmsg_virtio_rx_callback(struct virtqueue *vq) status = ept->cb(ept, RPMSG_LOCATE_DATA(rp_hdr), rp_hdr->len, rp_hdr->src, ept->priv); - RPMSG_ASSERT(status >= 0, - "unexpected callback status\r\n"); + if (status < 0) { + metal_err("ept %s, return status %d\r\n", ept->name, status); + RPMSG_ASSERT(0, "unexpected callback status\r\n"); + } } metal_mutex_acquire(&rdev->lock);