This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 02e9ea17e8b987cd14d25be501202fd8134e0fe5 Author: Bowen Wang <[email protected]> AuthorDate: Thu Nov 12 10:11:17 2026 +0800 openamp: restore the virtio_dev_name() declaration open-amp 2025.10.0 dropped the prototype of virtio_dev_name() together with the deprecated virtio_describe(), but the function itself is still built. Add a patch that restores the prototype, so NuttX can print the name of a virtio device. Signed-off-by: Bowen Wang <[email protected]> --- ...o-restore-the-virtio_dev_name-declaration.patch | 38 ++++++++++++++++++++++ openamp/open-amp.cmake | 2 ++ openamp/open-amp.defs | 1 + 3 files changed, 41 insertions(+) diff --git a/openamp/0024-virtio-restore-the-virtio_dev_name-declaration.patch b/openamp/0024-virtio-restore-the-virtio_dev_name-declaration.patch new file mode 100644 index 00000000000..87f3153240c --- /dev/null +++ b/openamp/0024-virtio-restore-the-virtio_dev_name-declaration.patch @@ -0,0 +1,38 @@ +From 377c2f881d48af09aa4d0f9e79da534d8bc91738 Mon Sep 17 00:00:00 2001 +From: Bowen Wang <[email protected]> +Date: Thu, 12 Nov 2026 10:10:59 +0800 +Subject: [PATCH 0024/24] virtio: restore the virtio_dev_name() declaration + +Commit a399378a5d ("virtio: remove deprecated virtio_describe() +function") also dropped the prototype of virtio_dev_name(), which is +not deprecated and is still implemented in lib/virtio/virtio.c. Put the +prototype back so users can print the name of a virtio device. + +Signed-off-by: Bowen Wang <[email protected]> +--- + lib/include/openamp/virtio.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/include/openamp/virtio.h open-amp/lib/include/openamp/virtio.h +index e4d79ec..e6e97cb 100644 +--- a/lib/include/openamp/virtio.h ++++ open-amp/lib/include/openamp/virtio.h +@@ -224,6 +224,15 @@ struct virtio_device { + * Helper functions. + */ + ++/** ++ * @brief Get the name of a virtio device. ++ * ++ * @param devid Id of the device. ++ * ++ * @return pointer to the device name string if found, otherwise null. ++ */ ++const char *virtio_dev_name(uint16_t devid); ++ + /** + * @brief Virtio device dispatcher functions. + * +-- +2.34.1 + diff --git a/openamp/open-amp.cmake b/openamp/open-amp.cmake index ee8216bb387..6266a6bf8c5 100644 --- a/openamp/open-amp.cmake +++ b/openamp/open-amp.cmake @@ -84,6 +84,8 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/open-amp) ${CMAKE_CURRENT_LIST_DIR}/0022-rpmsg_virtio-export-the-rx-buffer-helpers.patch && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} < ${CMAKE_CURRENT_LIST_DIR}/0023-rpmsg_virtio-let-the-caller-provide-the-virtqueue-ca.patch + && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} < + ${CMAKE_CURRENT_LIST_DIR}/0024-virtio-restore-the-virtio_dev_name-declaration.patch DOWNLOAD_NO_PROGRESS true TIMEOUT 30) diff --git a/openamp/open-amp.defs b/openamp/open-amp.defs index 1aac13ee3f3..9fd86a181e0 100644 --- a/openamp/open-amp.defs +++ b/openamp/open-amp.defs @@ -89,6 +89,7 @@ open-amp.zip: $(Q) patch -p0 < 0021-virtio-add-buffer-map-unmap-ops-for-non-coherent-tra.patch $(Q) patch -p0 < 0022-rpmsg_virtio-export-the-rx-buffer-helpers.patch $(Q) patch -p0 < 0023-rpmsg_virtio-let-the-caller-provide-the-virtqueue-ca.patch + $(Q) patch -p0 < 0024-virtio-restore-the-virtio_dev_name-declaration.patch .openamp_headers: open-amp.zip else
