This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9f4708f643ad8f412661a33111eb0ea6b7c761e3 Author: liaoao <[email protected]> AuthorDate: Mon Apr 21 13:49:55 2025 +0800 drivers/rpmsg_port_spi: fix build error CC: vfs/fs_unlink.c rpmsg/rpmsg_port_spi.c: In function ‘rpmsg_port_spi_complete_handler’: rpmsg/rpmsg_port_spi.c:415:11: warning: implicit declaration of function ‘rpmsg_port_spi_drop_packets’; did you mean ‘rpmsg_port_drop_packets’? [-Wimplicit-function-declaration] 415 | rpmsg_port_spi_drop_packets(rpspi, RPMSG_PORT_SPI_DROP_ALL); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | rpmsg_port_drop_packets rpmsg/rpmsg_port_spi.c:415:46: error: ‘RPMSG_PORT_SPI_DROP_ALL’ undeclared (first use in this function); did you mean ‘RPMSG_PORT_DROP_ALL’? 415 | rpmsg_port_spi_drop_packets(rpspi, RPMSG_PORT_SPI_DROP_ALL); | ^~~~~~~~~~~~~~~~~~~~~~~ | RPMSG_PORT_DROP_ALL rpmsg/rpmsg_port_spi_slave.c:292:5: warning: implicit declaration of function ‘container_of’; did you mean ‘list_container_of’? [-Wimplicit-function-declaration] 292 | container_of(port, struct rpmsg_port_spi_s, port); | ^~~~~~~~~~~~ | list_container_of Signed-off-by: liaoao <[email protected]> --- drivers/rpmsg/rpmsg_port_spi.c | 2 +- drivers/rpmsg/rpmsg_port_spi_slave.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_port_spi.c b/drivers/rpmsg/rpmsg_port_spi.c index c14ae8d5d45..79e427cb197 100644 --- a/drivers/rpmsg/rpmsg_port_spi.c +++ b/drivers/rpmsg/rpmsg_port_spi.c @@ -410,7 +410,7 @@ static void rpmsg_port_spi_complete_handler(FAR void *arg) if (rpspi->rxhdr->cmd == RPMSG_PORT_SPI_CMD_SHUTDOWN) { rpspi->state = RPMSG_PORT_SPI_STATE_DISCONNECTING; - rpmsg_port_spi_drop_packets(rpspi, RPMSG_PORT_SPI_DROP_ALL); + rpmsg_port_drop_packets(&rpspi->port, RPMSG_PORT_DROP_ALL); } rpmsg_port_queue_add_buffer(&rpspi->port.rxq, rpspi->rxhdr); diff --git a/drivers/rpmsg/rpmsg_port_spi_slave.c b/drivers/rpmsg/rpmsg_port_spi_slave.c index 330a451ec5e..755f6a1d942 100644 --- a/drivers/rpmsg/rpmsg_port_spi_slave.c +++ b/drivers/rpmsg/rpmsg_port_spi_slave.c @@ -32,6 +32,7 @@ #include <nuttx/crc16.h> #include <nuttx/kmalloc.h> #include <nuttx/kthread.h> +#include <nuttx/nuttx.h> #include <nuttx/power/pm.h> #include <nuttx/irq.h> #include <nuttx/mutex.h>
