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 4fccbc1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4fccbc1

Please sign in to comment.