-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remoteproc_virtio_notify return status not used #343
Comments
I hate losing potential error information, but I also can't see what the caller could sanely do in the face of an error. I am not opposed to changing the return status. However, this is an API change that will break existing code, so we have to be careful. @arnopo Do you think we could do this with a CMake setting? |
I can see 2 issues:
=>
=> what to do in case of error? This depends on the virtio backend implementation. The remoteproc_virtio is only one. |
@arnopo Yes, the function pointer should definitely be checked before using it. I will open a PR eventually for this and possibly other remoteproc op function pointers. I think logging the error will be fine for OpenAMP in general, but I think in my particular case, I need to not allow an error to be returned from the driver's notify routine. My driver is just triggering an inter-core interrupt via a register, which won't fail. The potential fail case is if the incoming remoteproc pointer is null. This should have been caught at the API level before getting all the way to the driver. |
This issue has been marked as a stale issue because it has been open (more than) 45 days with no activity. |
The remoteproc_virtio_notify function is used in functions defined in remoteproc_virtio.c as rpvdev->notify. The implementation is ultimately defined by the BSP. This function returns the status of the operation but the status is not checked by any of the calling routines. Should the return status of remoteproc_virtio_notify be changed to void?
The text was updated successfully, but these errors were encountered: