Issues were detected in Zephyr during CI when integrating the new release v2024.05.0:
[24/182] Building C object zephyr/CMakeFiles/zephyr.dir/lib/open-amp/resource_table.c.obj
In file included from /zephyrproject/zephyr/lib/open-amp/./resource_table.h:11,
from /zephyrproject/zephyr/lib/open-amp/resource_table.c:30:
/zephyrproject/modules/lib/open-amp/open-amp/lib/include/openamp/virtio.h:83:2: warning: #warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined" [-Wcpp]
83 | #warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined"
| ^~~~~~~
[26/182] Building C object CMakeFiles/app.dir/src/main_remote.c.obj
In file included from /zephyrproject/modules/lib/open-amp/open-amp/lib/include/openamp/rpmsg_virtio.h:19,
from /zephyrproject/modules/lib/open-amp/open-amp/lib/include/openamp/open_amp.h:12,
from /zephyrproject/zephyr/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c:16:
/zephyrproject/modules/lib/open-amp/open-amp/lib/include/openamp/virtio.h:83:2: warning: #warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined" [-Wcpp]
83 | #warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined"
| ^~~~~~~
The root cause is that the application can include thevirtio.hheader without defining VIRTIO_DRIVER_SUPPORT or VIRTIO_DEVICE_SUPPORT, which should not result in a warning or error.
This pull request:
Fixes the warning message.
Defines the VIRTIO_ROLE_IS_DEVICE and VIRTIO_ROLE_IS_DRIVER macros based on the definitions of VIRTIO_DEVICE_SUPPORT and VIRTIO_DRIVER_SUPPORT.
Issues were detected in Zephyr during CI when integrating the new release v2024.05.0:
The root cause is that the application can include the
virtio.h
header without defining VIRTIO_DRIVER_SUPPORT or VIRTIO_DEVICE_SUPPORT, which should not result in a warning or error.This pull request:
Fix also unreferenced
endpoint->priv
field, found in Zephyr and introduced inhttps://github.com/OpenAMP/open-amp/commit/9905d67bd96016b62f37b7031ba0723c7b905570