This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit d3461cfb0483ad5b845ca910ebb5fbfaef827381 Author: Andrzej Kaczmarek <andrzej.kaczma...@codecoup.pl> AuthorDate: Wed Oct 12 21:46:30 2022 +0200 hw/ipc_nrf5340: Deprecate ipc_nrf5340_available We have new one with better name ;) --- hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h | 2 ++ hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h index 40c61a577..c30dc96df 100644 --- a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h +++ b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h @@ -119,6 +119,8 @@ uint16_t ipc_nrf5340_read_om(int channel, struct os_mbuf *om, uint16_t len); /** * Returns number of data bytes available in IPC ring buffer. * + * Note: use ipc_nrf5340_data_available_get() instead + * * Note: this function does not use any kind of locking so it's up to caller * to make sure it's not used during write from other context as it may * yield incorrect results. diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c index 53c1d8a26..82ad89607 100644 --- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c +++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c @@ -446,10 +446,7 @@ ipc_nrf5340_read_om(int channel, struct os_mbuf *om, uint16_t len) uint16_t ipc_nrf5340_available(int channel) { - assert(channel < IPC_MAX_CHANS); - - return ipc_nrf5340_shm_get_data_length(shms[channel].head, - shms[channel].tail); + return ipc_nrf5340_data_available_get(channel); } uint16_t