openamp: add error log when ept->cb return error#519
openamp: add error log when ept->cb return error#519CV-Bowen wants to merge 1 commit intoOpenAMP:mainfrom
Conversation
6e00a17 to
a59efd6
Compare
|
@arnopo Hi, why the docs/readthedocs is always failed. Did I miss some things to do? |
you should rebase your work on main branch, seems that your 6 commits behind |
a59efd6 to
59ee97c
Compare
|
@arnopo Thanks, now CI passed. |
lib/rpmsg/rpmsg_virtio.c
Outdated
| "unexpected callback status\r\n"); | ||
| if (status < 0) { | ||
| metal_log(METAL_LOG_ERROR, | ||
| "ept %s, cb %p, return status %d\r\n", |
There was a problem hiding this comment.
Do we need to print ept->cb function pointer address ? only printing ept->name should be enough.
There was a problem hiding this comment.
Also, you could use "ml_err" macro in place of "metal_log(METAL_LOG_ERROR",
There was a problem hiding this comment.
After some thinking, only print ept->name is enough. Thanks.
59ee97c to
9b3d918
Compare
add helpful log when rpmsg endpoint callback return error Signed-off-by: Guiding Li <liguiding1@xiaomi.com> Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
9b3d918 to
4fccbc1
Compare
|
@arnopo how about this patch? |
we have a duplication with the assert and the error message. The question is what is the expected behavior: Crash on error, just display an error message or both? Another question is why this error message is not displayed in the callback itself? Seems to me that this would be more efficient for the debug. And the user can decide to print an error and return a status 0 to not crash the system. an alternative could be to update the RPMSG_ASSERT macro to have variadic arguments, something like this ( not tested) but sound to me better to display the message in the endpoint callback |
|
@arnopo OK, maybe add error log to the endpoint callback is better although it needs more works. |
|
This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity. |
@CV-Bowen let's update the patch as @arnopo suggestion or close this patch. |
|
This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity. |
Add helpful log when rpmsg endpoint callback return error.