Skip to content

Commit

Permalink
openamp: add error log when ept->cb return error
Browse files Browse the repository at this point in the history
add helpful log when rpmsg endpoint callback return error

Signed-off-by: Guiding Li <[email protected]>
Signed-off-by: Bowen Wang <[email protected]>
  • Loading branch information
GUIDINGLI authored and CV-Bowen committed Nov 3, 2023
1 parent bbefedd commit 9b3d918
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,11 @@ 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, cb %p, return status %d\r\n",
ept->name, ept->cb, status);
RPMSG_ASSERT(0, "unexpected callback status\r\n");
}
}

metal_mutex_acquire(&rdev->lock);
Expand Down

0 comments on commit 9b3d918

Please sign in to comment.